Skip to content

Commit

Permalink
Merge pull request #124 from coopTilleuls/fix/ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
vincentchalamon authored Apr 5, 2023
2 parents 146f68a + d1d4635 commit 5aed784
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,45 +32,38 @@ jobs:
# Only Symfony supported versions: https://symfony.com/releases
- '4.4.*'
- '5.4.*'
- '6.0.*'
- '6.1.*'
- '6.2.*'
api-platform:
# Only API Platform supported versions
- '^2.6'
- '^2.7'
- '^3.0'
- '^3.1'
include:
# Ensure the bundle is bootable
- php: '8.2'
symfony: '6.2.*'
bootable: true
quality: true
api-platform: '^3.1'
# Fix laminas/laminas-code support
- php: '8.0'
symfony: '4.4.*'
laminas: true
# Waiting for php-cs-fixer to support PHP 8.2
- php: '8.1'
quality: true
exclude:
# Symfony 6.1.* requires PHP >= 8.1
- symfony: '6.1.*'
# Symfony 6 requires PHP >= 8.1
- symfony: '6.2.*'
php: '8.0'
# Symfony 6.2.* requires PHP >= 8.1
- symfony: '6.2.*'
php: '8.0'
# API Platform 3.0 requires PHP >= 8.1 and Symfony >= 6.1.*
- api-platform: '^3.0'
# API Platform 3.1 requires PHP >= 8.1 and Symfony >= 6.1.*
- api-platform: '^3.1'
php: '8.0'
- api-platform: '^3.0'
- api-platform: '^3.1'
symfony: '4.4.*'
- api-platform: '^3.0'
- api-platform: '^3.1'
symfony: '5.4.*'
- api-platform: '^3.0'
symfony: '6.0.*'
fail-fast: false
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -89,16 +82,14 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Configure Symfony
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
run: composer config extra.symfony.require "${{ matrix.symfony }}"
- name: Configure Laminas
if: matrix.laminas
run: composer require laminas/laminas-zendframework-bridge --no-install --no-update --no-progress --no-scripts
- name: Configure API Platform
run: composer require api-platform/core:${{ matrix.api-platform }} --dev --no-install --no-update --no-progress --no-scripts
- name: Update project dependencies
run: composer update --no-progress --ansi --prefer-stable --prefer-dist
run: composer update --no-progress --ansi --prefer-stable --prefer-dist --no-scripts
- name: Bundle is bootable
if: ${{ matrix.bootable && github.event_name == 'push' && github.ref_name == 'main' }}
run: |
Expand All @@ -107,8 +98,11 @@ jobs:
composer config extra.symfony.allow-contrib true
composer req --ignore-platform-reqs tilleuls/forgot-password-bundle:dev-${{ github.ref_name }}
- name: Run php-cs-fixer tests
run: php-cs-fixer fix --diff --dry-run
if: matrix.quality
env:
# PHP CS Fixer does not support PHP 8.2 yet
PHP_CS_FIXER_IGNORE_ENV: 1
run: php-cs-fixer fix --diff --dry-run
- name: Run PHPUnit tests
run: vendor/bin/simple-phpunit --colors=always --testdox
- name: Run Behat tests
Expand Down
1 change: 1 addition & 0 deletions features/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ protected function configureContainer($container, LoaderInterface $loader): void
new Reference('test.client'),
new Reference('doctrine'),
new Reference('coop_tilleuls_forgot_password.manager.password_token'),
new Reference('coop_tilleuls_forgot_password.provider_chain'),
new Reference('kernel'),
]))->setPublic(true));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ public function load(array $configs, ContainerBuilder $container): void
$loader->load('api_platform.xml');
}

$container
->setAlias('coop_tilleuls_forgot_password.manager', $defaultProvider['manager'])
->setDeprecated('tilleuls/forgot-password-bundle', '1.5', 'Alias "%alias_id%" is deprecated and will be removed without replacement in 2.0.');
$alias = $container->setAlias('coop_tilleuls_forgot_password.manager', $defaultProvider['manager']);
if (method_exists(Definition::class, 'getDeprecation')) {
$alias->setDeprecated('tilleuls/forgot-password-bundle', '1.5', 'Alias "%alias_id%" is deprecated and will be removed without replacement in 2.0.');
} else {
$alias->setDeprecated(true, 'Alias "%alias_id%" is deprecated and will be removed without replacement in 2.0.');
}

// Build normalizer
$class = true === $config['use_jms_serializer'] ? JMSNormalizer::class : SymfonyNormalizer::class;
Expand Down

0 comments on commit 5aed784

Please sign in to comment.