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

Raise dependencies

- PHP >= 8.1
- Composer >= 2
Code cleanup
parent b8299b55
No related branches found
No related tags found
1 merge request!9Merging develop into main [MINOR_VERSION]
......@@ -12,6 +12,3 @@ indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{composer.json,composer.lock}]
indent_size = 4
include:
- project: 'gitlab-ci-cd/composer-packages'
- project: 'gitlab-ci-cd/drupal'
ref: main
file: '/composer-packages.yml'
file: '/private-modules.yml'
......@@ -25,7 +25,7 @@ abstract class BaseCommand extends ComposerBaseCommand implements BaseCommandInt
*/
protected function execute(InputInterface $input, OutputInterface $output): int {
$class = $this->getHandlerClass();
$this->handler = new $class($this->getComposer(), $this->getIO());
$this->handler = new $class($this->requireComposer(), $this->getIO());
$this->handler->setInput($input);
return 0;
}
......
......@@ -117,7 +117,7 @@ abstract class BaseHandler implements BaseHandlerInterface {
/**
* {@inheritdoc}
*/
public function setEvent(Event $event): BaseHandler {
public function setEvent(Event $event): self {
$this->event = $event;
return $this;
}
......@@ -192,9 +192,11 @@ abstract class BaseHandler implements BaseHandlerInterface {
/**
* {@inheritdoc}
*
* @phpcs:disable Squiz.NamingConventions.VaildMethodName.NotCamelCaps
*/
public function gitLFS(string $pattern): void {
Utils::gitLFS($pattern);
public function gitLfs(string $pattern): void {
Utils::gitLfs($pattern);
}
}
......@@ -104,6 +104,6 @@ interface BaseHandlerInterface {
* @param string $pattern
* The pattern which should be added.
*/
public function gitLFS(string $pattern);
public function gitLfs(string $pattern);
}
......@@ -5,10 +5,10 @@ namespace LakeDrops\Component\Composer;
use Composer\Json\JsonFile;
use Seld\JsonLint\ParsingException;
use Symfony\Component\Yaml\Yaml;
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
/**
......
......@@ -74,7 +74,7 @@ final class Utils {
* @param string $pattern
* The pattern to be added.
*/
public static function gitLFS(string $pattern): void {
public static function gitLfs(string $pattern): void {
if (!isset(self::$lfsGitPatterns)) {
self::gitInit();
$output = [];
......
{
"name": "lakedrops/composer-json-utils",
"description": "Composer Library to provide utilities to work with project's own composer.json file",
"type": "library",
"keywords": ["Drupal", "Development", "Composer"],
"homepage": "https://gitlab.lakedrops.com/composer/library/composer-json-utils",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Jürgen Haas",
"email": "juergen.haas@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"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/library/composer-json-utils/issues",
"source": "https://gitlab.lakedrops.com/composer/library/composer-json-utils/tree/main",
"docs": "https://devops-tools.docs.lakedrops.com/composer/library/composer-json-utils/"
"name": "lakedrops/composer-json-utils",
"description": "Composer Library to provide utilities to work with project's own composer.json file",
"type": "library",
"keywords": [
"Drupal",
"Development",
"Composer"
],
"homepage": "https://gitlab.lakedrops.com/composer/library/composer-json-utils",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Jürgen Haas",
"email": "juergen.haas@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
},
"require": {
"php": ">=7.4",
"ext-json": "*",
"symfony/dotenv": "^3.4||^4.4||^5.0||^6.0",
"symfony/yaml": "^3.4||^4.4||^5.0||^6.0",
"twig/twig": "^2.12||^3.4"
{
"name": "Daniel Speicher",
"email": "daniel.speicher@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
},
"require-dev": {
"composer/composer": "^1||^2",
"drupal/coder": "^8.3",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.7"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": { "LakeDrops\\Component\\Composer\\": "" }
{
"name": "Richard Papp",
"email": "richard.papp@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
}
],
"support": {
"issues": "https://gitlab.lakedrops.com/composer/library/composer-json-utils/issues",
"source": "https://gitlab.lakedrops.com/composer/library/composer-json-utils/tree/main",
"docs": "https://devops-tools.docs.lakedrops.com/composer/library/composer-json-utils/"
},
"require": {
"php": ">=8.1",
"ext-json": "*",
"composer-plugin-api": "^2",
"symfony/dotenv": "*",
"symfony/yaml": "*",
"twig/twig": "*"
},
"require-dev": {
"composer/composer": "^2",
"roave/security-advisories": "dev-latest"
},
"autoload": {
"psr-4": {
"LakeDrops\\Component\\Composer\\": ""
}
}
}
parameters:
level: 6
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
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