Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow PHP 8.1 and Symfony 6.1 #66

Merged
merged 15 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,44 @@ jobs:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
dependency:
- ''
- 'lowest'
symfony:
- '4.4.*'
- '5.3.*'
- '5.4.*'
- '6.0.*'
- '6.1.*'
exclude:
- php: '7.2'
symfony: '4.4.*'
dependency: 'lowest'
- php: '7.2'
symfony: '6.0.*'
- php: '7.2'
symfony: '6.1.*'
- php: '7.3'
symfony: '4.4.*'
- php: '7.3'
symfony: '6.0.*'
- php: '7.3'
symfony: '6.1.*'
- php: '7.4'
symfony: '4.4.*'
- php: '7.4'
symfony: '6.0.*'
- php: '7.4'
symfony: '6.1.*'
- php: '8.0'
symfony: '4.4.*'
- php: '8.1'
symfony: '4.4.*'
dependency: 'lowest'
- php: '8.1'
symfony: '5.3.*'
dependency: 'lowest'
fail-fast: false
steps:
- name: Checkout
Expand All @@ -50,8 +65,8 @@ jobs:
- name: Configure Symfony
run: composer config extra.symfony.require "${{ matrix.symfony }}"

- name: Prefer unstable Composer dependencies if Symfony 6.0
if: matrix.symfony == '6.0.*'
- name: Prefer unstable Composer dependencies if Symfony 6.1
if: matrix.symfony == '6.1.*'
run: composer config prefer-stable false

- name: Get Composer Cache Directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
php-version: 8.0
coverage: none
tools: phpstan:0.12.94, cs2pr
tools: phpstan:1.2.0, cs2pr

- name: Download dependencies
uses: ramsey/composer-install@v1
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
- Support for multiple routing files via `TestKernel::addRoutingFile`
- Support for a fully functional symfony kernel with the usage of the `Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait`
- Cleanup of the cache and log directory after kernel shutdown
- Support for PHP 8.1
- Support for Symfony 6.1

### Removed

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
php: [ '7.4', '8.0' ]
symfony: ['^4.4', '^5.3']
php: [ '7.4', '8.0', '8.1' ]
symfony: ['4.4.*', '5.3.*', '5.4.*', '6.0.*', '6.1.*']

steps:
- uses: actions/checkout@master
Expand Down
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "nyholm/symfony-bundle-test",
"type": "library",
"description": "",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Tobias Nyholm",
"email": "[email protected]"
}
],
"require": {
"php": "^7.2 || ^8.0",
"php": "^7.2 || ^8.0 || ^8.1",
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
Expand All @@ -20,6 +20,11 @@
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.4"
},
"conflict": {
"phpunit/phpunit": "<=8.5.14"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Nyholm\\BundleTest\\": "src/"
Expand All @@ -30,8 +35,6 @@
"Nyholm\\BundleTest\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
Expand Down
12 changes: 11 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
parameters:
ignoreErrors:
-
message: "#^Comparison operation \"\\>\\=\" between 50306 and 50100 is always true\\.$#"
message: "#^Call to method import\\(\\) on an unknown class Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#"
count: 1
path: src/TestKernel.php

-
message: "#^Parameter \\$routes of method Nyholm\\\\BundleTest\\\\TestKernel\\:\\:configureRoutes\\(\\) has invalid type Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#"
count: 1
path: src/TestKernel.php

-
message: "#^Comparison operation \"\\>\\=\" between 60001 and 50100 is always true\\.$#"
count: 1
path: src/config/parameters.php

Expand Down
5 changes: 5 additions & 0 deletions psalm.baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.x-dev@">
<file src="src/TestKernel.php">
<UndefinedDocblockClass occurrences="1">
<code>RoutingConfigurator|RouteCollectionBuilder</code>
</UndefinedDocblockClass>
</file>
<file src="src/config/parameters.php">
<UndefinedGlobalVariable occurrences="3">
<code>$container</code>
Expand Down