Skip to content

Commit

Permalink
UHF-10713: Remove VersionChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrsky committed Dec 17, 2024
1 parent e7230d8 commit 05e044a
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 922 deletions.
16 changes: 0 additions & 16 deletions config/optional/rest.resource.helfi_debug_package_version.yml

This file was deleted.

11 changes: 0 additions & 11 deletions documentation/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,3 @@ See [src/Plugin/DebugDataItem/Composer.php](/src/Plugin/DebugDataItem/Composer.p
At minimum, you need:
- A plugin class that implements `\Drupal\helfi_debug\DebugDataItemInterface`
- A plugin specific template (`debug-item--{plugin_id}.html.twig`). See [templates/debug-item.html.twig](/templates/debug-item.html.twig) for more information.

## Package version checker

The `/api/v1/version` endpoint can be used to fetch the latest version of a composer package.

For example:

Request `GET /api/v1/version?package=drupal/helfi_api_base&version=1.2.0` will respond with:

- The latest version number
- Whether the given version is the latest version
10 changes: 10 additions & 0 deletions helfi_api_base.install
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,13 @@ function _helfi_api_base_process_links(ContentEntityInterface $entity, string $f
$entity->save();
}
}

/**
* UHF-10713 Remove VersionChecker.
*/
function helfi_api_base_update_9023(): void {
\Drupal::entityTypeManager()
->getStorage('rest_resource_config')
->load('helfi_debug_package_version')
->delete();
}
2 changes: 2 additions & 0 deletions helfi_api_base.permissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ view remote entities:
title: View remote entities
edit remote entities:
title: Edit remote entities
access debug page:
title: Access debug page
2 changes: 1 addition & 1 deletion helfi_api_base.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ helfi_api_base.debug_list:
_title: 'Debug'
_controller: '\Drupal\helfi_api_base\Controller\DebugController::build'
requirements:
_permission: 'restful get helfi_debug_package_version'
_permission: 'access debug page'
15 changes: 0 additions & 15 deletions helfi_api_base.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,6 @@ services:
class: Drupal\helfi_api_base\DebugDataItemPluginManager
parent: default_plugin_manager

Drupal\helfi_api_base\Package\VersionChecker: '@helfi_api_base.package_version_checker'
helfi_api_base.package_version_checker:
class: Drupal\helfi_api_base\Package\VersionChecker
arguments: []
tags:
- { name: service_collector, call: add, tag: helfi_api_base.version_checker }

Drupal\helfi_api_base\Package\ComposerOutdatedProcess: ~

Drupal\helfi_api_base\Package\HelfiPackage: '@helfi_api_base.helfi_package_version_checker'
helfi_api_base.helfi_package_version_checker:
class: Drupal\helfi_api_base\Package\HelfiPackage
tags:
- { name: helfi_api_base.version_checker }

Drupal\helfi_api_base\EventSubscriber\EnvironmentResponseSubscriber: '@helfi_api_base.environment_response_subscriber'
helfi_api_base.environment_response_subscriber:
class: Drupal\helfi_api_base\EventSubscriber\EnvironmentResponseSubscriber
Expand Down
30 changes: 0 additions & 30 deletions src/Package/ComposerOutdatedProcess.php

This file was deleted.

88 changes: 0 additions & 88 deletions src/Package/HelfiPackage.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/Package/Version.php

This file was deleted.

128 changes: 0 additions & 128 deletions src/Package/VersionChecker.php

This file was deleted.

Loading

0 comments on commit 05e044a

Please sign in to comment.