Skip to content

Commit

Permalink
Fix SF 7 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Nov 25, 2023
1 parent 58cb94c commit dbe7861
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1', '8.2']
symfony: ['4.4.*', '5.4.*', '6.0.*', '6.1.*', '6.2.*', '6.3.*']
symfony: ['4.4.*', '5.4.*', '6.0.*', '6.1.*', '6.2.*', '6.3.*', '6.4.*', '7.0.*']
composer-flags: ['--prefer-stable']
can-fail: [false]
extensions: ['curl, iconv, mbstring, mongodb, pdo, pdo_sqlite, sqlite, zip']
Expand All @@ -29,18 +29,28 @@ jobs:
symfony: '6.2.*'
- php: '7.4'
symfony: '6.3.*'
- php: '7.4'
symfony: '6.4.*'
- php: '7.4'
symfony: '7.0.*'
- php: '8.0'
symfony: '6.1.*'
- php: '8.0'
symfony: '6.2.*'
- php: '8.0'
symfony: '6.3.*'
- php: '8.0'
symfony: '6.4.*'
- php: '8.0'
symfony: '7.0.*'
- php: '8.1'
symfony: '7.0.*'

name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -63,8 +73,8 @@ jobs:
version: '5.0'
topology: server

- name: Remove Guard
if: contains(fromJSON('["6.0.*", "6.1.*", "6.2.*", "6.3.*"]'), matrix.symfony)
- name: Remove Guard (Symfony >=6.0)
if: contains(fromJSON('["6.0.*", "6.1.*", "6.2.*", "6.3.*", "6.4.*", "7.0.*"]'), matrix.symfony)
run: composer remove --dev --no-update symfony/security-guard

- name: Install dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ public function testAttachesTheTokenToTheResponseBodyOnCredentialsAuth()

public function testDoesNothingWhenThereIsNotAUser()
{
if ((new \ReflectionClass(AuthenticationSuccessEvent::class))->getMethod('getUser')->hasReturnType()) {
$this->markTestSkipped(sprintf('%s::getUser() has a non-nullable return type in LexikJWTAuthenticationBundle 3.x', AuthenticationSuccessEvent::class));
}

/** @var AuthenticationSuccessEvent|MockObject $event */
$event = $this->createMock(AuthenticationSuccessEvent::class);

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"doctrine/cache": "^1.11|^2.0",
"doctrine/mongodb-odm": "^2.2",
"doctrine/orm": "^2.7",
"matthiasnoback/symfony-config-test": "^4.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.2",
"matthiasnoback/symfony-config-test": "^4.2|^5.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.2|^5.0",
"phpunit/phpunit": "^9.5",
"symfony/cache": "^4.4|^5.4|^6.0|^7.0",
"symfony/security-guard": "^4.4|^5.4|^6.0|^7.0"
"symfony/security-guard": "^4.4|^5.4"
},
"conflict": {
"doctrine/mongodb-odm": "<2.2",
Expand Down

0 comments on commit dbe7861

Please sign in to comment.