Skip to content

Commit 46d9717

Browse files
committed
Add support for Symfony 8
1 parent 8709f97 commit 46d9717

File tree

46 files changed

+4943
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4943
-188
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php: [ "8.1", "8.2", "8.3" ]
17+
php: [ "8.2", "8.3" ]
1818
postgres: ["14.6"]
19-
symfony: [ "^6.4", "^7.0" ]
20-
exclude:
21-
- php: "8.1"
22-
symfony: "^7.0"
19+
symfony: [ "^6.4", "^7.4" ]
20+
include:
21+
- php: '8.4'
22+
postgres: "14.6"
23+
symfony: "^8.0"
2324
name: "PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }}"
2425
env:
2526
APP_ENV: test
@@ -33,7 +34,7 @@ jobs:
3334
uses: shivammathur/setup-php@v2
3435
with:
3536
php-version: "${{ matrix.php }}"
36-
tools: symfony
37+
tools: 'symfony, composer:v2, flex'
3738
coverage: none
3839

3940
- name: Shutdown default MySQL
@@ -46,10 +47,7 @@ jobs:
4647
postgresql password: "postgres"
4748

4849
- name: "Restrict packages' versions"
49-
run: |
50-
composer global config --no-plugins allow-plugins.symfony/flex true
51-
composer global require --no-progress --no-scripts --no-plugins "symfony/flex"
52-
composer config extra.symfony.require "${{ matrix.symfony }}"
50+
run: composer config extra.symfony.require "${{ matrix.symfony }}"
5351

5452
- name: Get Composer cache directory
5553
id: composer-cache
@@ -102,9 +100,7 @@ jobs:
102100
103101
- name: "Restrict packages' versions (Admin Ui)"
104102
run: |
105-
(cd src/AdminUi/ && composer global config --no-plugins allow-plugins.symfony/flex true)
106-
(cd src/AdminUi/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
107-
(cd src/AdminUi/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
103+
(cd src/AdminUi/ && composer config --no-plugins allow-plugins.symfony/runtime true)
108104
(cd src/AdminUi/ && composer config extra.symfony.require "${{ matrix.symfony }}")
109105
110106
- name: "Install dependencies (Admin Ui)"
@@ -115,9 +111,7 @@ jobs:
115111

116112
- name: "Restrict packages' versions (Bootstrap Admin Ui)"
117113
run: |
118-
(cd src/BootstrapAdminUi/ && composer global config --no-plugins allow-plugins.symfony/flex true)
119-
(cd src/BootstrapAdminUi/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
120-
(cd src/BootstrapAdminUi/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
114+
(cd src/BootstrapAdminUi/ && composer config --no-plugins allow-plugins.symfony/runtime true)
121115
(cd src/BootstrapAdminUi/ && composer config extra.symfony.require "${{ matrix.symfony }}")
122116
123117
- name: "Install dependencies (Bootstrap Admin Ui)"
@@ -128,9 +122,7 @@ jobs:
128122

129123
- name: "Restrict packages' versions (Twig Hooks)"
130124
run: |
131-
(cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/flex true)
132-
(cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
133-
(cd src/TwigHooks/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
125+
(cd src/TwigHooks/ && composer config --no-plugins allow-plugins.symfony/runtime true)
134126
(cd src/TwigHooks/ && composer config extra.symfony.require "${{ matrix.symfony }}")
135127
136128
- name: "Install dependencies (Twig Hooks)"
@@ -141,9 +133,7 @@ jobs:
141133

142134
- name: "Restrict packages' versions (Twig Extra)"
143135
run: |
144-
(cd src/TwigExtra/ && composer global config --no-plugins allow-plugins.symfony/flex true)
145-
(cd src/TwigExtra/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
146-
(cd src/TwigExtra/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
136+
(cd src/TwigExtra/ && composer config --no-plugins allow-plugins.symfony/runtime true)
147137
(cd src/TwigExtra/ && composer config extra.symfony.require "${{ matrix.symfony }}")
148138
149139
- name: "Install dependencies (Twig Extra)"
@@ -154,9 +144,7 @@ jobs:
154144

155145
- name: "Restrict packages' versions (Ui Translations)"
156146
run: |
157-
(cd src/UiTranslations/ && composer global config --no-plugins allow-plugins.symfony/flex true)
158-
(cd src/UiTranslations/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
159-
(cd src/UiTranslations/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
147+
(cd src/UiTranslations/ && composer config --no-plugins allow-plugins.symfony/runtime true)
160148
(cd src/UiTranslations/ && composer config extra.symfony.require "${{ matrix.symfony }}")
161149
162150
- name: "Install dependencies (Ui Translations)"

app/Factory/BookFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
namespace App\Factory;
1515

1616
use App\Entity\Book;
17-
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
17+
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
1818

1919
/**
20-
* @extends PersistentProxyObjectFactory<Book>
20+
* @extends PersistentObjectFactory<Book>
2121
*/
22-
final class BookFactory extends PersistentProxyObjectFactory
22+
final class BookFactory extends PersistentObjectFactory
2323
{
2424
public static function class(): string
2525
{

app/Factory/ConferenceFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
namespace App\Factory;
1515

1616
use App\Entity\Conference;
17-
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
17+
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
1818

1919
/**
20-
* @extends PersistentProxyObjectFactory<Conference>
20+
* @extends PersistentObjectFactory<Conference>
2121
*/
22-
final class ConferenceFactory extends PersistentProxyObjectFactory
22+
final class ConferenceFactory extends PersistentObjectFactory
2323
{
2424
public static function class(): string
2525
{

app/Factory/SpeakerFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
use App\Entity\SpeakerAvatar;
1818
use Symfony\Component\Filesystem\Filesystem;
1919
use Symfony\Component\HttpFoundation\File\UploadedFile;
20-
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
20+
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
2121

2222
/**
23-
* @extends PersistentProxyObjectFactory<Speaker>
23+
* @extends PersistentObjectFactory<Speaker>
2424
*/
25-
final class SpeakerFactory extends PersistentProxyObjectFactory
25+
final class SpeakerFactory extends PersistentObjectFactory
2626
{
2727
public static function class(): string
2828
{

app/Factory/TalkFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
use App\Enum\Track;
2020
use function Zenstruck\Foundry\lazy;
2121
use Zenstruck\Foundry\Persistence\Exception\NotEnoughObjects;
22-
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
22+
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
2323
use Zenstruck\Foundry\Persistence\Proxy;
2424

2525
/**
26-
* @extends PersistentProxyObjectFactory<Talk>
26+
* @extends PersistentObjectFactory<Talk>
2727
*/
28-
final class TalkFactory extends PersistentProxyObjectFactory
28+
final class TalkFactory extends PersistentObjectFactory
2929
{
3030
public static function class(): string
3131
{

app/Factory/UserFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
use App\Entity\User;
1717
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
18-
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
18+
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
1919

2020
/**
21-
* @extends PersistentProxyObjectFactory<User>
21+
* @extends PersistentObjectFactory<User>
2222
*/
23-
final class UserFactory extends PersistentProxyObjectFactory
23+
final class UserFactory extends PersistentObjectFactory
2424
{
2525
public function __construct(
2626
private UserPasswordHasherInterface $userPasswordHasher,

composer.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@
1515
],
1616
"require": {
1717
"php": "^8.1",
18-
"doctrine/dbal": "^3",
19-
"doctrine/doctrine-bundle": "^2.12",
20-
"doctrine/orm": "^2.0",
18+
"doctrine/dbal": "^3 || ^4",
19+
"doctrine/doctrine-bundle": "^2.13 || ^3.0 || ^4.0",
20+
"doctrine/orm": "^3.3 || ^4.0",
2121
"knplabs/knp-menu-bundle": "^3.0",
2222
"laminas/laminas-stdlib": "^3.18",
2323
"pagerfanta/doctrine-orm-adapter": "^4.6",
2424
"pagerfanta/twig": "^4.6",
25-
"sylius/grid-bundle": "^1.13",
26-
"sylius/resource-bundle": "^1.11",
27-
"symfony/asset": "^6.4 || ^7.0",
28-
"symfony/asset-mapper": "^6.4 || ^7.0",
29-
"symfony/config": "^6.4 || ^7.0",
30-
"symfony/dependency-injection": "^6.4 || ^7.0",
31-
"symfony/expression-language": "^6.4 || ^7.0",
32-
"symfony/filesystem": "^6.4 || ^7.0",
33-
"symfony/http-client": "^6.4 || ^7.0",
34-
"symfony/http-kernel": "^6.4 || ^7.0",
35-
"symfony/security-bundle": "^6.4 || ^7.0",
36-
"symfony/security-http": "^6.4 || ^7.0",
37-
"symfony/stopwatch": "^6.4 || ^7.0",
38-
"symfony/twig-bundle": "^6.4 || ^7.0",
25+
"sylius/grid-bundle": "^1.13 || ^1.15@alpha",
26+
"sylius/resource-bundle": "dev-symfony-8 as 1.14.0",
27+
"symfony/asset": "^6.4 || ^7.4 || ^8.0",
28+
"symfony/asset-mapper": "^6.4 || ^7.4 || ^8.0",
29+
"symfony/config": "^6.4 || ^7.4 || ^8.0",
30+
"symfony/dependency-injection": "^6.4 || ^7.4 || ^8.0",
31+
"symfony/expression-language": "^6.4 || ^7.4 || ^8.0",
32+
"symfony/filesystem": "^6.4 || ^7.4 || ^8.0",
33+
"symfony/http-client": "^6.4 || ^7.4 || ^8.0",
34+
"symfony/http-kernel": "^6.4 || ^7.4 || ^8.0",
35+
"symfony/security-bundle": "^6.4 || ^7.4 || ^8.0",
36+
"symfony/security-http": "^6.4 || ^7.4 || ^8.0",
37+
"symfony/stopwatch": "^6.4 || ^7.4 || ^8.0",
38+
"symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0",
3939
"symfony/ux-autocomplete": "^2.17",
4040
"symfony/ux-icons": "^2.20",
4141
"symfony/ux-live-component": "^2.17",
@@ -44,26 +44,26 @@
4444
"webmozart/assert": "^1.9"
4545
},
4646
"require-dev": {
47-
"doctrine/doctrine-fixtures-bundle": "^3.6",
48-
"matthiasnoback/symfony-config-test": "^5.1",
49-
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
47+
"doctrine/doctrine-fixtures-bundle": "^4.3",
48+
"matthiasnoback/symfony-config-test": "^6.1",
49+
"matthiasnoback/symfony-dependency-injection-test": "^6.1.0",
5050
"phpstan/phpstan": "^1.10",
5151
"phpstan/phpstan-symfony": "^1.3",
52-
"phpunit/phpunit": "^9.6",
52+
"phpunit/phpunit": "^10.5",
5353
"sylius-labs/coding-standard": "^4.0",
54-
"symfony/browser-kit": "^6.4 || ^7.0",
55-
"symfony/console": "^6.4 || ^7.0",
56-
"symfony/css-selector": "^6.4 || ^7.0",
57-
"symfony/debug-bundle": "^6.4 || ^7.0",
58-
"symfony/dom-crawler": "^6.4 || ^7.0",
59-
"symfony/dotenv": "^6.4 || ^7.0",
54+
"symfony/browser-kit": "^6.4 || ^7.4 || ^8.0",
55+
"symfony/console": "^6.4 || ^7.4 || ^8.0",
56+
"symfony/css-selector": "^6.4 || ^7.4 || ^8.0",
57+
"symfony/debug-bundle": "^6.4 || ^7.4 || ^8.0",
58+
"symfony/dom-crawler": "^6.4 || ^7.4 || ^8.0",
59+
"symfony/dotenv": "^6.4 || ^7.4 || ^8.0",
6060
"symfony/flex": "^2.4",
61-
"symfony/framework-bundle": "^6.4 || ^7.0",
61+
"symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0",
6262
"symfony/maker-bundle": "^1.61",
63-
"symfony/runtime": "^6.4 || ^7.0",
64-
"symfony/translation": "^6.4 || ^7.0",
65-
"symfony/web-profiler-bundle": "^6.4 || ^7.0",
66-
"symfony/yaml": "^6.4 || ^7.0",
63+
"symfony/runtime": "^6.4 || ^7.4 || ^8.0",
64+
"symfony/translation": "^6.4 || ^7.4 || ^8.0",
65+
"symfony/web-profiler-bundle": "^6.4 || ^7.4 || ^8.0",
66+
"symfony/yaml": "^6.4 || ^7.4 || ^8.0",
6767
"symplify/monorepo-builder": "11.2.*",
6868
"vich/uploader-bundle": "^2.4",
6969
"zenstruck/foundry": "^2.0"
@@ -109,7 +109,7 @@
109109
},
110110
"extra": {
111111
"symfony": {
112-
"require": "7.1.*"
112+
"require": "8.0.*"
113113
}
114114
},
115115
"scripts": {

config/packages/doctrine.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ doctrine:
77
#server_version: '16'
88

99
profiling_collect_backtrace: '%kernel.debug%'
10-
use_savepoints: true
1110
orm:
12-
auto_generate_proxy_classes: true
13-
enable_lazy_ghost_objects: true
14-
report_fields_where_declared: true
1511
validate_xml_mapping: true
1612
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
1713
auto_mapping: true

0 commit comments

Comments
 (0)