Skip to content

Commit

Permalink
minor #5330 Don't require symfony/flex globally (javiereguiluz, alexi…
Browse files Browse the repository at this point in the history
…slefebvre)

This PR was merged into the 4.x branch.

Discussion
----------

Don't require symfony/flex globally

All this work was done by `@alexislefebvre`. He cannot submit a PR directly because of the temporary restrictions of this repository, so I'm creating the PR on his behalf. Thanks!

Commits
-------

f5ed83d CI: use “composer config …” instead of “SYMFONY_REQUIRE”
3611c1a CI: don't require symfony/flex globally
2f32bea Revert "Fix the usage of Composer plugins in GitHub actions"
622f663 Allow some Composer plugin
  • Loading branch information
javiereguiluz committed Jul 11, 2022
2 parents fa10b5e + f5ed83d commit 66c16a0
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 21 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test-upcoming-symfony.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ jobs:
ini-values: date.timezone=UTC

- name: 'Install project dependencies'
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer config extra.symfony.require "${{ matrix.symfony-version }}"
composer update --no-interaction --prefer-dist --optimize-autoloader || exit 0
vendor/bin/simple-phpunit install || exit 0
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:

- name: 'Install project dependencies'
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
vendor/bin/simple-phpunit install
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests-lowest-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:

- name: 'Install project dependencies'
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable --prefer-lowest
vendor/bin/simple-phpunit install
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:

- name: 'Install project dependencies'
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
vendor/bin/simple-phpunit install
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/tests-maintained-symfony.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ jobs:
ini-values: date.timezone=UTC

- name: 'Install project dependencies'
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer config extra.symfony.require "${{ matrix.symfony-version }}"
composer update --no-interaction --prefer-dist --optimize-autoloader
vendor/bin/simple-phpunit install
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/tests-upcoming-php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ jobs:
ini-values: date.timezone=UTC

- name: 'Install project dependencies'
env:
SYMFONY_REQUIRE: 5.4
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer config extra.symfony.require "5.4"
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable --ignore-platform-req=php
vendor/bin/simple-phpunit install
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:

- name: 'Install project dependencies'
run: |
composer config --global --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
vendor/bin/simple-phpunit install
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
"symfony/phpunit-bridge": "^5.4|^6.0"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true
}
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 66c16a0

Please sign in to comment.