Skip to content

Commit

Permalink
Add tests for symfony 6 (#1281)
Browse files Browse the repository at this point in the history
* Test symfony 6

* Use command constant if available
  • Loading branch information
deguif committed Sep 29, 2022
1 parent d8ba5a0 commit 1b92029
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 32 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/continuous-integration.yaml
Expand Up @@ -30,27 +30,19 @@ jobs:

phpunit:
runs-on: 'ubuntu-20.04'
name: 'PHPUnit (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Twig ${{ matrix.twig }})'
name: 'PHPUnit (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})'
timeout-minutes: 10
strategy:
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
symfony:
- '5.*'
twig:
- '3.*'
composer_flags:
- '--no-scripts --prefer-dist --prefer-stable'
php: ['8.1', '8.0']
symfony: ['6.*', '5.*', '4.*']
include:
- php: '7.2'
symfony: '4.4.*'
symfony: '5.*'
twig: '2.*'
- php: '7.2'
symfony: '4.*'
twig: '2.*'
composer_flags: '--no-scripts --prefer-dist --prefer-lowest'
fail-fast: false
steps:
- name: 'Checkout'
Expand Down Expand Up @@ -82,8 +74,9 @@ jobs:
env:
SYMFONY_REQUIRE: '${{ matrix.symfony }}'
run: |
composer require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --no-progress --ansi ${{ matrix.composer_flags }}
composer require --no-progress --no-scripts --no-plugins --no-update symfony/flex
[[ -n "${{ matrix.twig }}" ]] && composer require --no-progress --no-scripts --no-plugins --no-update twig/twig:${{ matrix.twig }} || true
composer update --no-interaction --no-progress --no-scripts --ansi ${{ matrix.composer_flags }}
- name: 'Run unit tests'
run: |
Expand Down
4 changes: 2 additions & 2 deletions Command/BaseBootstrapSymlinkCommand.php
Expand Up @@ -179,7 +179,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
} else {
$this->output->writeln('<error>Could not find composer and manual option not specified!</error>');

return 0;
return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0;
}

// Automatically detect if on Win XP where symlink will allways fail
Expand All @@ -206,7 +206,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$this->output->writeln(' ... <info>OK</info>');

return 0;
return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0;
}

protected function getBootstrapPathsFromUser()
Expand Down
2 changes: 1 addition & 1 deletion Command/InstallFontCommand.php
Expand Up @@ -101,7 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$output->writeln('Font: '.$this->iconSet.' Installed... <info>OK</info>');

return 0;
return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0;
}

public static function installFonts()
Expand Down
24 changes: 12 additions & 12 deletions README.md
Expand Up @@ -14,18 +14,18 @@ To use MopaBootstrapBundle and Twitter's Bootstrap 3 in your project add it via
Versions and dependencies
-------------------------

| MopaBootstrapBundle | Bootstrap | Symfony | PHP |
| -------------------------- | --------- | ------------------------ | -------------- |
| [**3.4**] (**master**) | ^3.0 | ^4.4 \|\| ^5.1 \|\| ^6.1 | ^7.2 \|\| ^8.0 |
| [**3.3**] (**3.3**) | ^3.0 | ^2.3 \|\| ^3.0 \|\| ^4.0 | |
| [**3.2**] (*unmaintained*) | ^3.0 | ^2.3 \|\| ^3.0 | |
| [**3.1**] (*unmaintained*) | ^3.0 | ^2.3 \|\| ^3.0 | |
| [**3.0**] (*unmaintained*) | ^3.0 | ^2.3 \|\| ^3.0 | |
| [**2.3**] (*unmaintained*) | ^2.0 | ^2.3 | |
| [**2.2**] (*unmaintained*) | ^2.0 | >=2.1,<2.4 | |
| [**2.1**] (*unmaintained*) | ^2.0 | ~2.1.0 | |
| [**2.0**] (*unmaintained*) | ^2.0 | ~2.0.0 | |
| [**1.x**] (*unmaintained*) | ^1.0 | ^2.0 | |
| MopaBootstrapBundle | Bootstrap | Symfony | PHP |
|----------------------------|-----------|------------------------------------------|------------------------|
| [**3.4**] (**master**) | ^3.0 | ^4.4 &#124;&#124; ^5.1 &#124;&#124; ^6.0 | ^7.2 &#124;&#124; ^8.0 |
| [**3.3**] (**3.3**) | ^3.0 | ^2.3 &#124;&#124; ^3.0 &#124;&#124; ^4.0 | |
| [**3.2**] (*unmaintained*) | ^3.0 | ^2.3 &#124;&#124; ^3.0 | |
| [**3.1**] (*unmaintained*) | ^3.0 | ^2.3 &#124;&#124; ^3.0 | |
| [**3.0**] (*unmaintained*) | ^3.0 | ^2.3 &#124;&#124; ^3.0 | |
| [**2.3**] (*unmaintained*) | ^2.0 | ^2.3 | |
| [**2.2**] (*unmaintained*) | ^2.0 | >=2.1,<2.4 | |
| [**2.1**] (*unmaintained*) | ^2.0 | ~2.1.0 | |
| [**2.0**] (*unmaintained*) | ^2.0 | ~2.0.0 | |
| [**1.x**] (*unmaintained*) | ^1.0 | ^2.0 | |

Updates
-------
Expand Down

0 comments on commit 1b92029

Please sign in to comment.