Skip to content

Commit

Permalink
Split dependencies in dedicated folder using 'bamarni/composer-bin-pl…
Browse files Browse the repository at this point in the history
…ugin'.
  • Loading branch information
laurentmuller committed Nov 12, 2024
1 parent b562b2c commit 9d27ce1
Show file tree
Hide file tree
Showing 31 changed files with 9,369 additions and 3,286 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* text=auto eol=lf
*.{png,jpg,jpeg,gif,webp,woff,woff2} binary
/vendor-bin/**/composer.lock binary
32 changes: 0 additions & 32 deletions .github/workflows/composer_diff.yaml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/php-cs-fixer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ jobs:
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install PHP CS Fixer
working-directory: ./vendor-bin/php-cs-fixer
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --diff --dry-run --show-progress=none
run: vendor-bin/php-cs-fixer/vendor/bin/php-cs-fixer --diff --dry-run --show-progress=none
6 changes: 5 additions & 1 deletion .github/workflows/php_stan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ jobs:
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install PHPStan
working-directory: ./vendor-bin/phpstan
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run PHPStan
run: vendor/bin/phpstan analyze --no-progress
run: vendor-bin/phpstan/vendor/bin/phpstan --no-progress
6 changes: 5 additions & 1 deletion .github/workflows/php_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ jobs:
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install PHPUnit
working-directory: ./vendor-bin/phpunit
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run PHPUnit
run: vendor/bin/phpunit --display-skipped --no-progress --coverage-clover ./clover.xml
run: vendor-bin/phpunit/vendor/bin/phpunit --display-skipped --no-progress --coverage-clover ./clover.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.6.0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pslam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ jobs:
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install Psalm
working-directory: ./vendor-bin/psalm
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run Psalm
run: vendor/bin/psalm --config=psalm.xml --no-progress
run: vendor-bin/psalm/vendor/bin/psalm --config=psalm.xml --no-progress
6 changes: 5 additions & 1 deletion .github/workflows/rector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ jobs:
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install Rector
working-directory: ./vendor-bin/rector
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run Rector
run: vendor/bin/rector process --dry-run --no-progress-bar
run: vendor-bin/rector/vendor/bin/rector process --dry-run --no-progress-bar
6 changes: 5 additions & 1 deletion .github/workflows/twig-cs-fixer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ jobs:
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install Twig-CS-Fixer
working-directory: ./vendor-bin/twig-cs-fixer
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run Twig-CS-Fixer
run: vendor/bin/twig-cs-fixer lint --config=.twig-cs-fixer.php
run: vendor-bin/twig-cs-fixer/vendor/bin/twig-cs-fixer lint --config=.twig-cs-fixer.php
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
symfony.lock
/var/
/vendor/
/vendor-bin/**/vendor/
###< symfony/framework-bundle ###

###> resources ###
###> resources and vendor ###
/public/images/users/*
/public/vendor/
/resources/fontawesome/
Expand All @@ -33,3 +34,13 @@ symfony.lock
.phpunit.result.cache
.twig-cs-fixer.cache
###< ci ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
2 changes: 0 additions & 2 deletions .twig-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@

declare(strict_types=1);

use App\Twig\TokenParser\SwitchTokenParser;
use TwigCsFixer\Config\Config;

$config = new Config();
$config->allowNonFixableRules()
->addTokenParser(new SwitchTokenParser())
->getFinder()
->in('templates');

Expand Down
42 changes: 21 additions & 21 deletions all_batch.bat
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@ECHO OFF
SET STA__TIME=%TIME: =0%
ECHO ----- START BATCH %STA__TIME% ------------------------------------ && ^
ECHO ----- SYMFONY ---------------------------------------------------- && ^
php bin/console lint:yaml translations config && ^
php bin/console lint:twig templates && ^
php bin/console lint:xliff translations && ^
php bin/console lint:container && ^
php bin/console doctrine:schema:validate --skip-sync --no-interaction && ^
composer validate --strict && ^
ECHO ----- PHP-CS-FIXER ----------------------------------------------- && ^
.\vendor\bin\php-cs-fixer.bat fix --diff --dry-run && ^
ECHO ----- PHP-PSALM -------------------------------------------------- && ^
.\vendor\bin\psalm.bat --config=psalm.xml && ^
ECHO ----- PHP-STAN --------------------------------------------------- && ^
.\vendor\bin\phpstan.bat analyse --memory-limit=2G && ^
ECHO ----- PHP-RECTOR ------------------------------------------------- && ^
.\vendor\bin\rector.bat process --dry-run --config=rector.php && ^
ECHO ----- PHP-TWIG-CS-FIXER ------------------------------------------ && ^
.\vendor\bin\twig-cs-fixer.bat lint --config=.twig-cs-fixer.php && ^
ECHO ----- PHP-UNIT --------------------------------------------------- && ^
.\vendor\bin\phpunit.bat
ECHO ----- START BATCH %STA__TIME% ----------------------------------------------------- && ^
ECHO ----- SYMFONY --------------------------------------------------------------------- && ^
php bin/console lint:yaml translations config && ^
php bin/console lint:twig templates && ^
php bin/console lint:xliff translations && ^
php bin/console lint:container && ^
php bin/console doctrine:schema:validate --skip-sync --no-interaction && ^
composer validate --strict && ^
ECHO ----- PHP-CS-FIXER ---------------------------------------------------------------- && ^
.\vendor-bin\php-cs-fixer\vendor\bin\php-cs-fixer.bat fix --diff --dry-run && ^
ECHO ----- PHP-PSALM ------------------------------------------------------------------- && ^
.\vendor-bin\psalm\vendor\bin\psalm.bat --config=psalm.xml && ^
ECHO ----- PHP-STAN -------------------------------------------------------------------- && ^
.\vendor-bin\phpstan\vendor\bin\phpstan.bat analyse --memory-limit=2G && ^
ECHO ----- PHP-RECTOR ------------------------------------------------------------------ && ^
.\vendor-bin\rector\vendor\bin\rector.bat --dry-run --config=rector.php && ^
ECHO ----- PHP-TWIG-CS-FIXER ----------------------------------------------------------- && ^
.\vendor-bin\twig-cs-fixer\vendor\bin\twig-cs-fixer.bat lint --config=.twig-cs-fixer.php && ^
ECHO ----- PHP-UNIT -------------------------------------------------------------------- && ^
.\vendor-bin\phpunit\vendor\bin\phpunit.bat
SET STA__TIME=%TIME: =0%
ECHO ----- END BATCH %STA__TIME% --------------------------------------
ECHO ----- END BATCH %STA__TIME% -------------------------------------------------------
52 changes: 23 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,36 +88,23 @@
"vich/uploader-bundle": "^2.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"fortawesome/font-awesome": "^6.6",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-doctrine": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^10.0",
"psalm/plugin-phpunit": "^0.19",
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^1.0",
"symfony/browser-kit": "7.1.*",
"symfony/css-selector": "7.1.*",
"symfony/debug-bundle": "7.1.*",
"symfony/maker-bundle": "^1.0",
"symfony/phpunit-bridge": "7.1.*",
"symfony/stopwatch": "7.1.*",
"symfony/var-dumper": "7.1.*",
"symfony/web-profiler-bundle": "7.1.*",
"vimeo/psalm": "^5.0",
"vincentlanglet/twig-cs-fixer": "^3.0",
"weirdan/doctrine-psalm-plugin": "^2.0"
"phpunit/phpunit": "^11.0",
"symfony/phpunit-bridge": "7.1.*"
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php70" : "*",
"symfony/polyfill-php71" : "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
Expand Down Expand Up @@ -145,17 +132,22 @@
"platform-check": true,
"discard-changes": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"composer/package-versions-deprecated": true,
"symfony/runtime": true,
"symfony/flex": true,
"phpstan/extension-installer": true
"symfony/runtime": true
}
},
"extra": {
"symfony": {
"allow-contrib": true,
"require": "7.1.*",
"docker": false
},
"bamarni-bin": {
"bin-links": false,
"forward-command": true,
"target-directory": "vendor-bin"
}
},
"autoload": {
Expand All @@ -169,22 +161,24 @@
}
},
"scripts": {
"post-install-cmd": "@composer bin all install --ansi",
"post-update-cmd": "@composer bin all update --ansi",
"app-lint": [
"@php bin/console lint:yaml translations .github/workflows --parse-tags",
"@php bin/console lint:twig templates",
"@php bin/console lint:container",
"@php bin/console doctrine:schema:validate --skip-sync",
"@composer validate --strict"
],
"app-fixer-fix": "vendor/bin/php-cs-fixer fix --diff",
"app-rector-fix": "vendor/bin/rector process --config rector.php",
"app-twig-fix": "vendor/bin/twig-cs-fixer lint --fix --config=.twig-cs-fixer.php",
"app-fixer": "vendor/bin/php-cs-fixer fix --diff --dry-run",
"app-psalm": "vendor/bin/psalm --config psalm.xml",
"app-stan": "vendor/bin/phpstan analyse --configuration phpstan.neon --memory-limit 2G",
"app-rector": "vendor/bin/rector process --dry-run --config rector.php",
"app-twig": "vendor/bin/twig-cs-fixer lint --config=.twig-cs-fixer.php",
"app-test": "phpunit",
"app-fixer": "vendor-bin/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run",
"app-fixer-fix": "vendor-bin/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff",
"app-rector": "vendor-bin/rector/vendor/bin/rector process --dry-run --config rector.php",
"app-rector-fix": "vendor-bin/rector/vendor/bin/rector process --config rector.php",
"app-twig": "vendor-bin/twig-cs-fixer/vendor/bin/twig-cs-fixer lint --config=.twig-cs-fixer.php",
"app-twig-fix": "vendor-bin/twig-cs-fixer/vendor/bin/twig-cs-fixer lint --fix --config=.twig-cs-fixer.php",
"app-psalm": "vendor-bin/psalm/vendor/bin/psalm --config psalm.xml",
"app-stan": "vendor-bin/phpstan/vendor/bin/phpstan analyse --configuration phpstan.neon --memory-limit 2G",
"app-test": "vendor-bin/phpunit/vendor/bin/phpunit",
"app-markdown": "markdownlint-cli2",
"app-all": [
"@app-lint",
Expand Down
Loading

0 comments on commit 9d27ce1

Please sign in to comment.