chore(deps): Move cs-fixer into a composer bin

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2023-09-08 07:41:57 +02:00
Родитель 0b72ab8686
Коммит e6833a74ea
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CC42AC2A7F0E56D8
7 изменённых файлов: 220 добавлений и 105 удалений

11
.github/dependabot.yml поставляемый
Просмотреть файл

@ -11,6 +11,17 @@ updates:
labels: labels:
- 3. to review - 3. to review
- dependencies - dependencies
- package-ecosystem: composer
directory: "/vendor-bin/cs-fixer"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: npm - package-ecosystem: npm
directory: "/" directory: "/"
schedule: schedule:

1
.gitignore поставляемый
Просмотреть файл

@ -59,6 +59,7 @@ nbproject
/tests/js/run.sh /tests/js/run.sh
/tests/karma-coverage /tests/karma-coverage
/vendor /vendor
/vendor-bin/*/vendor
/.php-cs-fixer.cache /.php-cs-fixer.cache
# Vue.js # Vue.js

Просмотреть файл

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
require_once './vendor/autoload.php'; require_once './vendor-bin/cs-fixer/vendor/autoload.php';
use Nextcloud\CodingStandard\Config; use Nextcloud\CodingStandard\Config;

Просмотреть файл

@ -8,7 +8,10 @@
"platform": { "platform": {
"php": "8.0" "php": "8.0"
}, },
"sort-packages": true "sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
@ -18,18 +21,32 @@
}, },
"scripts": { "scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "vendor/bin/php-cs-fixer fix --dry-run --diff", "cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "vendor/bin/php-cs-fixer fix", "cs:fix": "php-cs-fixer fix",
"psalm": "psalm.phar --threads=1", "psalm": "psalm.phar --threads=1",
"psalm:update-baseline": "psalm.phar--threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml", "psalm:update-baseline": "psalm.phar--threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"psalm:clear": "psalm.phar--clear-cache && psalm.phar--clear-global-cache", "psalm:clear": "psalm.phar--clear-cache && psalm.phar--clear-global-cache",
"psalm:fix": "psalm.phar--alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType", "psalm:fix": "psalm.phar--alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"test:unit": "vendor/bin/phpunit -c tests/phpunit.xml --color --fail-on-warning --fail-on-risky" "test:unit": "vendor/bin/phpunit -c tests/phpunit.xml --color --fail-on-warning --fail-on-risky",
"post-install-cmd": [
"@composer bin all install --ansi"
],
"post-update-cmd": [
"@composer bin all update --ansi"
]
}, },
"require-dev": { "require-dev": {
"nextcloud/coding-standard": "^1.0.0",
"nextcloud/ocp": "dev-master", "nextcloud/ocp": "dev-master",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"psalm/phar": "^5.15" "psalm/phar": "^5.15"
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
}
},
"require": {
"bamarni/composer-bin-plugin": "^1.8"
} }
} }

163
composer.lock сгенерированный
Просмотреть файл

@ -4,8 +4,66 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "25a19628605ade7b6fad58e613bccf06", "content-hash": "8946fd08dd17a1a9c4cb497d315158fe",
"packages": [], "packages": [
{
"name": "bamarni/composer-bin-plugin",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2.5 || ^8.0"
},
"require-dev": {
"composer/composer": "^2.0",
"ext-json": "*",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.5",
"symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
},
"type": "composer-plugin",
"extra": {
"class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
},
"autoload": {
"psr-4": {
"Bamarni\\Composer\\Bin\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "No conflicts for your bin dependencies",
"keywords": [
"composer",
"conflict",
"dependency",
"executable",
"isolation",
"tool"
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
"source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
},
"time": "2022-10-31T08:38:03+00:00"
}
],
"packages-dev": [ "packages-dev": [
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -136,59 +194,18 @@
], ],
"time": "2023-03-08T13:26:56+00:00" "time": "2023-03-08T13:26:56+00:00"
}, },
{
"name": "nextcloud/coding-standard",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/nextcloud/coding-standard.git",
"reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb",
"reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0",
"php-cs-fixer/shim": "^3.17"
},
"type": "library",
"autoload": {
"psr-4": {
"Nextcloud\\CodingStandard\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christoph Wurst",
"email": "christoph@winzerhof-wurst.at"
}
],
"description": "Nextcloud coding standards for the php cs fixer",
"support": {
"issues": "https://github.com/nextcloud/coding-standard/issues",
"source": "https://github.com/nextcloud/coding-standard/tree/v1.1.1"
},
"time": "2023-06-01T12:05:01+00:00"
},
{ {
"name": "nextcloud/ocp", "name": "nextcloud/ocp",
"version": "dev-master", "version": "dev-master",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nextcloud-deps/ocp.git", "url": "https://github.com/nextcloud-deps/ocp.git",
"reference": "cb36d570c3b7aae1735599cc4b3614b9ce5c9c79" "reference": "0a5f3a379cda862d4341c15eb7b2c880025b120e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/cb36d570c3b7aae1735599cc4b3614b9ce5c9c79", "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/0a5f3a379cda862d4341c15eb7b2c880025b120e",
"reference": "cb36d570c3b7aae1735599cc4b3614b9ce5c9c79", "reference": "0a5f3a379cda862d4341c15eb7b2c880025b120e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -220,7 +237,7 @@
"issues": "https://github.com/nextcloud-deps/ocp/issues", "issues": "https://github.com/nextcloud-deps/ocp/issues",
"source": "https://github.com/nextcloud-deps/ocp/tree/master" "source": "https://github.com/nextcloud-deps/ocp/tree/master"
}, },
"time": "2023-08-26T00:28:49+00:00" "time": "2023-09-06T00:30:37+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
@ -389,58 +406,6 @@
}, },
"time": "2022-02-21T01:04:05+00:00" "time": "2022-02-21T01:04:05+00:00"
}, },
{
"name": "php-cs-fixer/shim",
"version": "v3.23.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/shim.git",
"reference": "ddca9b342374087121e44cca3b7d8aca8f121fa7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/ddca9b342374087121e44cca3b7d8aca8f121fa7",
"reference": "ddca9b342374087121e44cca3b7d8aca8f121fa7",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^7.4 || ^8.0"
},
"replace": {
"friendsofphp/php-cs-fixer": "self.version"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters."
},
"bin": [
"php-cs-fixer",
"php-cs-fixer.phar"
],
"type": "application",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Dariusz Rumiński",
"email": "dariusz.ruminski@gmail.com"
}
],
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/PHP-CS-Fixer/shim/issues",
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.23.0"
},
"time": "2023-08-14T12:28:46+00:00"
},
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.27", "version": "9.2.27",

Просмотреть файл

@ -0,0 +1,9 @@
{
"platform": {
"php": "8.0"
},
"sort-packages": true,
"require-dev": {
"nextcloud/coding-standard": "^1.1"
}
}

112
vendor-bin/cs-fixer/composer.lock сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,112 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "29631ef900965e2ca760c33e75a459dc",
"packages": [],
"packages-dev": [
{
"name": "nextcloud/coding-standard",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/nextcloud/coding-standard.git",
"reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb",
"reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0",
"php-cs-fixer/shim": "^3.17"
},
"type": "library",
"autoload": {
"psr-4": {
"Nextcloud\\CodingStandard\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christoph Wurst",
"email": "christoph@winzerhof-wurst.at"
}
],
"description": "Nextcloud coding standards for the php cs fixer",
"support": {
"issues": "https://github.com/nextcloud/coding-standard/issues",
"source": "https://github.com/nextcloud/coding-standard/tree/v1.1.1"
},
"time": "2023-06-01T12:05:01+00:00"
},
{
"name": "php-cs-fixer/shim",
"version": "v3.25.1",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/shim.git",
"reference": "448b7c1a3bf190c14fadc5c67e9d93373bfe0aee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/448b7c1a3bf190c14fadc5c67e9d93373bfe0aee",
"reference": "448b7c1a3bf190c14fadc5c67e9d93373bfe0aee",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^7.4 || ^8.0"
},
"replace": {
"friendsofphp/php-cs-fixer": "self.version"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters."
},
"bin": [
"php-cs-fixer",
"php-cs-fixer.phar"
],
"type": "application",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Dariusz Rumiński",
"email": "dariusz.ruminski@gmail.com"
}
],
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/PHP-CS-Fixer/shim/issues",
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.25.1"
},
"time": "2023-09-04T01:23:51+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.6.0"
}