Skip to content

Commit

Permalink
IBX-8470: Upgraded codebase to Symfony 6 (#9)
Browse files Browse the repository at this point in the history
* [Composer] Bumped Symfony packages requirements to ^6.4
* [Composer][CS] Bumped Ibexa Code Style to ~2.0.0
* [CS] Fixed outstanding CS issue in EndpointRequestDefinitionTest
* [Composer] Bumped PHP requirement to >=8.3
* [CI] Switched GHA jobs to run on PHP 8.3 only
* [CI] Bumped versions of 3rd party GHA actions
* [Security] Refactored Symfony User mocking for Symfony 6
  • Loading branch information
alongosz authored Feb 4, 2025
1 parent a212385 commit 5a25efe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
strategy:
matrix:
php:
- '8.0'
- '8.3'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -26,7 +26,7 @@ jobs:
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- uses: ramsey/composer-install@v2
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand All @@ -42,13 +42,10 @@ jobs:
fail-fast: false
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -58,7 +55,7 @@ jobs:
extensions: pdo_sqlite, gd
tools: cs2pr

- uses: ramsey/composer-install@v2
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.4 || ^8.0",
"ext-json": "*",
"php": ">=8.3",
"ext-dom": "*",
"ext-json": "*",
"ibexa/test-core": "~5.0.x-dev",
"justinrainbow/json-schema": "^5.2",
"symfony/browser-kit": "^5.4",
"symfony/mime": "^5.4",
"symfony/proxy-manager-bridge": "^5.4",
"symfony/translation": "^5.4",
"symfony/validator": "^5.4"
"symfony/browser-kit": "^6.4",
"symfony/mime": "^6.4",
"symfony/proxy-manager-bridge": "^6.4",
"symfony/translation": "^6.4",
"symfony/validator": "^6.4"
},
"require-dev": {
"ibexa/code-style": "^1.1",
"ibexa/code-style": "~2.0.0",
"ibexa/core": "~5.0.x-dev",
"ibexa/doctrine-schema": "~5.0.x-dev",
"phpstan/phpstan": "^1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/WebTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private function getUser(): UserWrapped
$apiUser = $userService->loadUserByLogin('admin');
$symfonyUser = $this->createMock(UserInterface::class);
$symfonyUser->method('getRoles')->willReturn(['ROLE_USER']);
$symfonyUser->method('getUsername')->willReturn('admin');
$symfonyUser->method('getUserIdentifier')->willReturn('admin');

return new UserWrapped($symfonyUser, $apiUser);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Request/Value/EndpointRequestDefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
final class EndpointRequestDefinitionTest extends TestCase
{
/**
* @return iterable<string, array{null|string, 'xml'|'json'}>
* @return iterable<string, array{string|null, 'xml'|'json'}>
*/
public function getDataForTestExtractFormatFromAcceptHeader(): iterable
{
Expand Down

0 comments on commit 5a25efe

Please sign in to comment.