Skip to content
Snippets Groups Projects
Commit 4049d3a9 authored by jurgenhaas's avatar jurgenhaas
Browse files

Raise dependencies

- PHP >= 8.1
- Composer >= 2
Code cleanup
parent b53b8a41
No related branches found
No related tags found
2 merge requests!6Merging develop into main [MINOR_VERSION],!5Merging develop into main [MINOR_VERSION]
Pipeline #1165457 failed
...@@ -12,6 +12,3 @@ indent_size = 2 ...@@ -12,6 +12,3 @@ indent_size = 2
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[{composer.json,composer.lock}]
indent_size = 4
include: include:
- project: 'gitlab-ci-cd/composer-packages' - project: 'gitlab-ci-cd/drupal'
ref: main ref: main
file: '/composer-packages.yml' file: '/private-modules.yml'
{ {
"name": "lakedrops/ahoy", "name": "lakedrops/ahoy",
"description": "This plugin collects available ahoy scripts from installed LakeDrops plugins and configures ahy in the project root.", "description": "This plugin collects available ahoy scripts from installed LakeDrops plugins and configures ahy in the project root.",
"type": "composer-plugin", "type": "composer-plugin",
"keywords": [ "keywords": [
"Ahoy", "Ahoy",
"Drupal", "Drupal",
"Development", "Development",
"Install", "Install",
"Update" "Update"
], ],
"homepage": "https://gitlab.lakedrops.com/composer/plugin/ahoy", "homepage": "https://gitlab.lakedrops.com/composer/plugin/ahoy",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"authors": [ "authors": [
{ {
"name": "Jürgen Haas", "name": "Jürgen Haas",
"email": "juergen.haas@lakedrops.com", "email": "juergen.haas@lakedrops.com",
"homepage": "https://www.lakedrops.com", "homepage": "https://www.lakedrops.com",
"role": "Drupal Expert" "role": "Drupal Expert"
},
{
"name": "Daniel Speicher",
"email": "daniel.speicher@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
},
{
"name": "Richard Papp",
"email": "richard.papp@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
}
],
"support": {
"issues": "https://gitlab.lakedrops.com/composer/plugin/ahoy/issues",
"source": "https://gitlab.lakedrops.com/composer/plugin/ahoy/tree/main",
"docs": "https://devops-tools.docs.lakedrops.com/composer/plugin/ahoy/"
}, },
"require": { {
"php": ">=7.4", "name": "Daniel Speicher",
"composer-plugin-api": "^1||^2", "email": "daniel.speicher@lakedrops.com",
"lakedrops/composer-json-utils": "^2.0||dev-develop", "homepage": "https://www.lakedrops.com",
"symfony/yaml": "^3.4||^4.4||^5.0||^6.0" "role": "Drupal Expert"
}, },
"require-dev": { {
"composer/composer": "^1||^2", "name": "Richard Papp",
"drupal/coder": "^8.3", "email": "richard.papp@lakedrops.com",
"phpunit/phpunit": "^9.5", "homepage": "https://www.lakedrops.com",
"roave/security-advisories": "dev-master", "role": "Drupal Expert"
"squizlabs/php_codesniffer": "^3.7" }
}, ],
"config": { "support": {
"allow-plugins": { "issues": "https://gitlab.lakedrops.com/composer/plugin/ahoy/issues",
"dealerdirect/phpcodesniffer-composer-installer": true "source": "https://gitlab.lakedrops.com/composer/plugin/ahoy/tree/main",
} "docs": "https://devops-tools.docs.lakedrops.com/composer/plugin/ahoy/"
}, },
"minimum-stability": "dev", "require": {
"prefer-stable": true, "php": ">=8.1",
"autoload": { "lakedrops/composer-json-utils": "^2.5||dev-develop",
"psr-4": { "symfony/yaml": "*"
"LakeDrops\\Ahoy\\": "src/" },
} "require-dev": {
}, "composer/composer": "^2",
"extra": { "roave/security-advisories": "dev-latest"
"class": "LakeDrops\\Ahoy\\Plugin" },
"autoload": {
"psr-4": {
"LakeDrops\\Ahoy\\": "src/"
} }
},
"extra": {
"class": "LakeDrops\\Ahoy\\Plugin"
}
} }
parameters:
level: 6
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
...@@ -4,6 +4,11 @@ namespace LakeDrops\Ahoy; ...@@ -4,6 +4,11 @@ namespace LakeDrops\Ahoy;
use Composer\Plugin\Capability\CommandProvider as CommandProviderCapability; use Composer\Plugin\Capability\CommandProvider as CommandProviderCapability;
/**
* Composer Command Provider for Ahoy.
*
* @package LakeDrops\Ahoy
*/
class CommandProvider implements CommandProviderCapability { class CommandProvider implements CommandProviderCapability {
/** /**
......
...@@ -6,9 +6,9 @@ use LakeDrops\Component\Composer\BaseHandler; ...@@ -6,9 +6,9 @@ use LakeDrops\Component\Composer\BaseHandler;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
/** /**
* Class Handler. * Handler class to setup Drupal projects for Behat tests.
* *
* @package LakeDrops\Drupal8Scaffold * @package LakeDrops\Ahoy
*/ */
class Handler extends BaseHandler { class Handler extends BaseHandler {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace LakeDrops\Ahoy; namespace LakeDrops\Ahoy;
use Composer\Plugin\Capability\CommandProvider as ComposerCommandProvider;
use Composer\Script\Event; use Composer\Script\Event;
use Composer\Script\ScriptEvents; use Composer\Script\ScriptEvents;
use LakeDrops\Component\Composer\BasePlugin; use LakeDrops\Component\Composer\BasePlugin;
...@@ -22,20 +23,20 @@ class Plugin extends BasePlugin { ...@@ -22,20 +23,20 @@ class Plugin extends BasePlugin {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getCapabilities(): array { public function getCapabilities(): array {
return array( return [
\Composer\Plugin\Capability\CommandProvider::class => CommandProvider::class, ComposerCommandProvider::class => CommandProvider::class,
); ];
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static function getSubscribedEvents(): array { public static function getSubscribedEvents(): array {
return array( return [
ScriptEvents::POST_CREATE_PROJECT_CMD => 'updateScripts', ScriptEvents::POST_CREATE_PROJECT_CMD => 'updateScripts',
ScriptEvents::POST_INSTALL_CMD => 'updateScripts', ScriptEvents::POST_INSTALL_CMD => 'updateScripts',
ScriptEvents::POST_UPDATE_CMD => 'updateScripts', ScriptEvents::POST_UPDATE_CMD => 'updateScripts',
); ];
} }
/** /**
...@@ -45,11 +46,10 @@ class Plugin extends BasePlugin { ...@@ -45,11 +46,10 @@ class Plugin extends BasePlugin {
* The event that triggered the plugin. * The event that triggered the plugin.
*/ */
public function updateScripts(Event $event): void { public function updateScripts(Event $event): void {
/** @var Handler $handler */ /** @var \LakeDrops\Ahoy\Handler $handler */
$handler = $this->handler; $handler = $this->handler;
$handler $handler->setEvent($event);
->setEvent($event) $handler->updateScripts();
->updateScripts();
} }
} }
...@@ -6,6 +6,11 @@ use LakeDrops\Component\Composer\BaseCommand; ...@@ -6,6 +6,11 @@ use LakeDrops\Component\Composer\BaseCommand;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
/**
* Composer Update Command for Ahoy.
*
* @package LakeDrops\Ahoy
*/
class UpdateCommand extends BaseCommand { class UpdateCommand extends BaseCommand {
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment