mirror of
https://github.com/friendica/friendica
synced 2026-03-17 03:29:03 +01:00
chore: fix composer scripts, change all php-cs-fixer and rector paths
This commit is contained in:
parent
4675921b58
commit
7ad038b6e5
6 changed files with 15 additions and 22 deletions
6
.github/workflows/code-quality.yml
vendored
6
.github/workflows/code-quality.yml
vendored
|
|
@ -37,12 +37,12 @@ jobs:
|
|||
- name: Clone addon repository
|
||||
run: git clone -b 2025.07-rc --single-branch https://git.friendi.ca/friendica/friendica-addons.git addon
|
||||
|
||||
- name: Install PHP-CS-Fixer
|
||||
run: composer install --working-dir=bin/dev/php-cs-fixer
|
||||
- name: Install Composer dependencies
|
||||
uses: "ramsey/composer-install@v2"
|
||||
|
||||
- name: Run PHP-CS-Fixer
|
||||
continue-on-error: true
|
||||
run: bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run
|
||||
run: vendor/bin/php-cs-fixer fix --diff --dry-run
|
||||
|
||||
phpstan:
|
||||
name: PHPStan (PHP ${{ matrix.php }})
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/bin/dev/php-cs-fixer/vendor/autoload.php';
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
|
|
|
|||
|
|
@ -20,11 +20,14 @@ steps:
|
|||
- '.composer'
|
||||
volumes:
|
||||
- /tmp/drone-cache:/tmp/cache
|
||||
|
||||
composer_install:
|
||||
image: composer
|
||||
image: friendicaci/php8.3:php8.3.17
|
||||
commands:
|
||||
- mkdir addon # create empty addon folder to appease composer
|
||||
- export COMPOSER_HOME=.composer
|
||||
- ./bin/composer.phar run cs:install
|
||||
- ./bin/composer.phar install --prefer-dist
|
||||
|
||||
rebuild_cache:
|
||||
image: meltwater/drone-cache:dev
|
||||
settings:
|
||||
|
|
@ -36,6 +39,7 @@ steps:
|
|||
- '.composer'
|
||||
volumes:
|
||||
- /tmp/drone-cache:/tmp/cache
|
||||
|
||||
check:
|
||||
image: php:8.3
|
||||
commands:
|
||||
|
|
@ -49,4 +53,4 @@ steps:
|
|||
CHANGED_FILES="$(git diff --name-only --diff-filter=ACMRTUXB ${CI_COMMIT_SHA})";
|
||||
fi
|
||||
- EXTRA_ARGS="--path-mode=intersection -- $${CHANGED_FILES}";
|
||||
- ./bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer check --config=.php-cs-fixer.dist.php -v --diff --using-cache=no $${EXTRA_ARGS}
|
||||
- ./vendor/bin/php-cs-fixer check --config=.php-cs-fixer.dist.php -v --diff --using-cache=no $${EXTRA_ARGS}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ SPDX-PackageDownloadLocation = "https://friendi.ca"
|
|||
path = [
|
||||
"database.sql",
|
||||
"composer.*",
|
||||
"bin/dev/php-cs-fixer/composer.*",
|
||||
"bin/dev/rector/composer.*",
|
||||
"doc/**",
|
||||
"spec/*",
|
||||
"tests/**",
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ fi
|
|||
|
||||
EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}");
|
||||
|
||||
./bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer ${COMMAND} --config=.php-cs-fixer.dist.php -v --using-cache=no ${EXTRA_ARGS}
|
||||
./vendor/bin/php-cs-fixer ${COMMAND} --config=.php-cs-fixer.dist.php -v --using-cache=no ${EXTRA_ARGS}
|
||||
|
|
|
|||
|
|
@ -174,21 +174,14 @@
|
|||
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l",
|
||||
"docker:translate": "docker run --rm -v $PWD:/data -w /data friendicaci/transifex bin/run_xgettext.sh",
|
||||
"lang:recreate": "bin/run_xgettext.sh",
|
||||
"cs:install": "@composer install --working-dir=bin/dev/php-cs-fixer",
|
||||
"cs:check": [
|
||||
"@cs:install",
|
||||
"bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer check --diff"
|
||||
],
|
||||
"cs:fix": [
|
||||
"@cs:install",
|
||||
"bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix"
|
||||
],
|
||||
"cs:check": "php-cs-fixer check --diff",
|
||||
"cs:fix": "php-cs-fixer fix",
|
||||
"cs:fix-develop": "TARGET_BRANCH=develop COMMAND=fix bin/dev/fix-codestyle.sh",
|
||||
"rector:install": "@composer install -d bin/dev/rector",
|
||||
"rector:check": "@rector:run --dry-run",
|
||||
"rector:run": "bin/dev/rector/vendor/bin/rector --config=\".rector.php\"",
|
||||
"rector:run": "rector --config=\".rector.php\"",
|
||||
"rectify": [
|
||||
"@rector:run",
|
||||
"@lang:recreate",
|
||||
"@cs:fix-develop"
|
||||
],
|
||||
"db:update-structure": "bin/console.php dbstructure dumpsql > database.sql",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue