Skip to content

Commit 1b92029

Browse files
authored
Add tests for symfony 6 (#1281)
* Test symfony 6 * Use command constant if available
1 parent d8ba5a0 commit 1b92029

File tree

4 files changed

+25
-32
lines changed

4 files changed

+25
-32
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,19 @@ jobs:
3030

3131
phpunit:
3232
runs-on: 'ubuntu-20.04'
33-
name: 'PHPUnit (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Twig ${{ matrix.twig }})'
33+
name: 'PHPUnit (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})'
3434
timeout-minutes: 10
3535
strategy:
3636
matrix:
37-
php:
38-
- '7.2'
39-
- '7.3'
40-
- '7.4'
41-
- '8.0'
42-
- '8.1'
43-
symfony:
44-
- '5.*'
45-
twig:
46-
- '3.*'
47-
composer_flags:
48-
- '--no-scripts --prefer-dist --prefer-stable'
37+
php: ['8.1', '8.0']
38+
symfony: ['6.*', '5.*', '4.*']
4939
include:
5040
- php: '7.2'
51-
symfony: '4.4.*'
41+
symfony: '5.*'
42+
twig: '2.*'
43+
- php: '7.2'
44+
symfony: '4.*'
5245
twig: '2.*'
53-
composer_flags: '--no-scripts --prefer-dist --prefer-lowest'
5446
fail-fast: false
5547
steps:
5648
- name: 'Checkout'
@@ -82,8 +74,9 @@ jobs:
8274
env:
8375
SYMFONY_REQUIRE: '${{ matrix.symfony }}'
8476
run: |
85-
composer require --no-progress --no-scripts --no-plugins symfony/flex
86-
composer update --no-interaction --no-progress --ansi ${{ matrix.composer_flags }}
77+
composer require --no-progress --no-scripts --no-plugins --no-update symfony/flex
78+
[[ -n "${{ matrix.twig }}" ]] && composer require --no-progress --no-scripts --no-plugins --no-update twig/twig:${{ matrix.twig }} || true
79+
composer update --no-interaction --no-progress --no-scripts --ansi ${{ matrix.composer_flags }}
8780
8881
- name: 'Run unit tests'
8982
run: |

Command/BaseBootstrapSymlinkCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
179179
} else {
180180
$this->output->writeln('<error>Could not find composer and manual option not specified!</error>');
181181

182-
return 0;
182+
return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0;
183183
}
184184

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

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

209-
return 0;
209+
return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0;
210210
}
211211

212212
protected function getBootstrapPathsFromUser()

Command/InstallFontCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
101101

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

104-
return 0;
104+
return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0;
105105
}
106106

107107
public static function installFonts()

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ To use MopaBootstrapBundle and Twitter's Bootstrap 3 in your project add it via
1414
Versions and dependencies
1515
-------------------------
1616

17-
| MopaBootstrapBundle | Bootstrap | Symfony | PHP |
18-
| -------------------------- | --------- | ------------------------ | -------------- |
19-
| [**3.4**] (**master**) | ^3.0 | ^4.4 \|\| ^5.1 \|\| ^6.1 | ^7.2 \|\| ^8.0 |
20-
| [**3.3**] (**3.3**) | ^3.0 | ^2.3 \|\| ^3.0 \|\| ^4.0 | |
21-
| [**3.2**] (*unmaintained*) | ^3.0 | ^2.3 \|\| ^3.0 | |
22-
| [**3.1**] (*unmaintained*) | ^3.0 | ^2.3 \|\| ^3.0 | |
23-
| [**3.0**] (*unmaintained*) | ^3.0 | ^2.3 \|\| ^3.0 | |
24-
| [**2.3**] (*unmaintained*) | ^2.0 | ^2.3 | |
25-
| [**2.2**] (*unmaintained*) | ^2.0 | >=2.1,<2.4 | |
26-
| [**2.1**] (*unmaintained*) | ^2.0 | ~2.1.0 | |
27-
| [**2.0**] (*unmaintained*) | ^2.0 | ~2.0.0 | |
28-
| [**1.x**] (*unmaintained*) | ^1.0 | ^2.0 | |
17+
| MopaBootstrapBundle | Bootstrap | Symfony | PHP |
18+
|----------------------------|-----------|------------------------------------------|------------------------|
19+
| [**3.4**] (**master**) | ^3.0 | ^4.4 &#124;&#124; ^5.1 &#124;&#124; ^6.0 | ^7.2 &#124;&#124; ^8.0 |
20+
| [**3.3**] (**3.3**) | ^3.0 | ^2.3 &#124;&#124; ^3.0 &#124;&#124; ^4.0 | |
21+
| [**3.2**] (*unmaintained*) | ^3.0 | ^2.3 &#124;&#124; ^3.0 | |
22+
| [**3.1**] (*unmaintained*) | ^3.0 | ^2.3 &#124;&#124; ^3.0 | |
23+
| [**3.0**] (*unmaintained*) | ^3.0 | ^2.3 &#124;&#124; ^3.0 | |
24+
| [**2.3**] (*unmaintained*) | ^2.0 | ^2.3 | |
25+
| [**2.2**] (*unmaintained*) | ^2.0 | >=2.1,<2.4 | |
26+
| [**2.1**] (*unmaintained*) | ^2.0 | ~2.1.0 | |
27+
| [**2.0**] (*unmaintained*) | ^2.0 | ~2.0.0 | |
28+
| [**1.x**] (*unmaintained*) | ^1.0 | ^2.0 | |
2929

3030
Updates
3131
-------

0 commit comments

Comments
 (0)