Skip to content

Commit

Permalink
Add support for Symfony 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
steevanb committed Aug 26, 2024
1 parent f96d4a8 commit 92fe23b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v2
- run: bin/ci/unused-scanner

phpunit:
phpunit-symfony-6:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -65,7 +65,8 @@ jobs:
strategy:
matrix:
php: [--php=8.2, --php=8.3]
symfony: [--symfony=7.0, --symfony=7.1]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/ci-env
- run: bin/ci/phpunit ${{ matrix.php }} --symfony=7.0
- run: bin/ci/phpunit ${{ matrix.php }} ${{ matrix.symfony }}
8 changes: 6 additions & 2 deletions bin/ci/phpunit.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ function createPhpunitProcesses(string $phpVersion = null, string $symfonyVersio
{
$phpVersions = new StringCollection(is_string($phpVersion) ? [$phpVersion] : ['8.1', '8.2', '8.3']);
$symfonyVersions = new StringCollection(
is_string($symfonyVersion) ? [$symfonyVersion] : ['6.1', '6.2', '6.3', '6.4', '7.0']
is_string($symfonyVersion) ? [$symfonyVersion] : ['6.1', '6.2', '6.3', '6.4', '7.0', '7.1']
);

$return = new ProcessInterfaceCollection();
foreach ($phpVersions->toArray() as $loopPhpVersion) {
foreach ($symfonyVersions->toArray() as $loopSymfonyVersion) {
if ($loopSymfonyVersion === '7.0' && in_array($loopPhpVersion, ['8.2', '8.3'], true) === false) {
if (
in_array($loopSymfonyVersion, ['7.0', '7.1'])
&& in_array($loopPhpVersion, ['8.2', '8.3'], true) === false
) {
continue;
}

$return->add(createPhpunitProcess($loopPhpVersion, $loopSymfonyVersion));
}
}
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### master

- Add support for Symfony `7.1`
- Add `ObjectCollectionMaker` and `ObjectNullableCollectionMaker`
- Add `bin/dev/generate-php-collections` and `bin/dev/generate-php-collections.php`
- Add collections for PHP internal classes or interfaces, all in namespace `Steevanb\PhpCollection\ObjectCollection`:
Expand Down
2 changes: 2 additions & 0 deletions docker/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ENV COMPOSER_HOME_SYMFONY_6_2=/composer/symfony-6-2
ENV COMPOSER_HOME_SYMFONY_6_3=/composer/symfony-6-3
ENV COMPOSER_HOME_SYMFONY_6_4=/composer/symfony-6-4
ENV COMPOSER_HOME_SYMFONY_7_0=/composer/symfony-7-0
ENV COMPOSER_HOME_SYMFONY_7_1=/composer/symfony-7-1
ENV PHPSTAN_BIN_PATH=/usr/local/bin/phpstan

COPY docker/ci/composer.json ${COMPOSER_HOME}/composer.json
Expand Down Expand Up @@ -50,6 +51,7 @@ RUN \

&& update-alternatives --set php /usr/bin/php8.2 \
&& COMPOSER_HOME=${COMPOSER_HOME_SYMFONY_7_0} composer global require symfony/serializer:7.0.* \
&& COMPOSER_HOME=${COMPOSER_HOME_SYMFONY_7_1} composer global require symfony/serializer:7.1.* \

# Purge
&& apt-get purge -y software-properties-common \
Expand Down

0 comments on commit 92fe23b

Please sign in to comment.