diff --git a/.github/workflows/composer-lint.yml b/.github/workflows/composer-lint.yml new file mode 100644 index 0000000..aff94ca --- /dev/null +++ b/.github/workflows/composer-lint.yml @@ -0,0 +1,18 @@ +name: "Composer Lint" + +on: + pull_request: + branches: + - "*.x" + paths: + - "composer.json" + push: + branches: + - "*.x" + paths: + - "composer.json" + +jobs: + composer-lint: + name: "Composer Lint" + uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.0.1" diff --git a/composer.json b/composer.json index dc959f9..d4d9a7b 100644 --- a/composer.json +++ b/composer.json @@ -1,17 +1,43 @@ { "name": "doctrine/inflector", - "type": "library", "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "keywords": ["php", "strings", "words", "manipulation", "inflector", "inflection", "uppercase", "lowercase", "singular", "plural"], - "homepage": "https://www.doctrine-project.org/projects/inflector.html", "license": "MIT", + "type": "library", + "keywords": [ + "php", + "strings", + "words", + "manipulation", + "inflector", + "inflection", + "uppercase", + "lowercase", + "singular", + "plural" + ], "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } ], + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "require": { "php": "^7.2 || ^8.0" }, @@ -36,6 +62,7 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true - } + }, + "sort-packages": true } } diff --git a/psalm.xml b/psalm.xml index 1dc898a..99a93f3 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,8 @@ patterns = $patterns; - $patterns = array_map(static function (Pattern $pattern): string { return $pattern->getPattern(); - }, $this->patterns); + }, $patterns); $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; }