Skip to content

Commit 92557d2

Browse files
committed
chore: test Symfony 8
1 parent 11355a9 commit 92557d2

25 files changed

+396
-84
lines changed

bin/tools/phpstan/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"phpstan/phpstan-symfony": "^2.0",
66
"phpstan/extension-installer": "^1.2",
77
"phpstan/phpstan-doctrine": "^2.0",
8-
"phpstan/phpstan-phpunit": "^2.0"
8+
"phpstan/phpstan-phpunit": "^2.0",
9+
"symfony/var-exporter": "^7"
910
},
1011
"config": {
1112
"allow-plugins": {

bin/tools/phpstan/composer.lock

Lines changed: 161 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,33 @@
2020
"fakerphp/faker": "^1.23",
2121
"symfony/deprecation-contracts": "^2.2|^3.0",
2222
"symfony/polyfill-php84": "^1.32",
23-
"symfony/property-access": "^6.4|^7.0|^8.0",
24-
"symfony/property-info": "^6.4|^7.0|^8.0",
23+
"symfony/property-access": "^8.0",
24+
"symfony/property-info": "^8.0",
2525
"symfony/var-exporter": "^6.4.9|~7.0.9|^7.1.2|^8.0",
2626
"zenstruck/assert": "^1.4"
2727
},
2828
"require-dev": {
2929
"bamarni/composer-bin-plugin": "^1.8",
30-
"brianium/paratest": "^6|^7",
3130
"dama/doctrine-test-bundle": "^8.0",
3231
"doctrine/collections": "^1.7|^2.0",
3332
"doctrine/common": "^3.2.2",
34-
"doctrine/doctrine-bundle": "^2.10",
35-
"doctrine/doctrine-migrations-bundle": "^2.2|^3.0",
36-
"doctrine/mongodb-odm": "^2.4",
37-
"doctrine/mongodb-odm-bundle": "^4.6|^5.0",
38-
"doctrine/orm": "^2.16|^3.0",
33+
"doctrine/doctrine-bundle": "3.1.x-dev",
34+
"doctrine/mongodb-odm": "2.15.x-dev",
35+
"doctrine/mongodb-odm-bundle": "5.5.x-dev",
36+
"doctrine/orm": "3.5.x-dev",
3937
"doctrine/persistence": "^2.0|^3.0|^4.0",
4038
"phpunit/phpunit": "^9.5.0 || ^10.0 || ^11.0 || ^12.0",
41-
"symfony/browser-kit": "^6.4|^7.0|^8.0",
42-
"symfony/console": "^6.4|^7.0|^8.0",
43-
"symfony/dotenv": "^6.4|^7.0|^8.0",
44-
"symfony/framework-bundle": "^6.4|^7.0|^8.0",
45-
"symfony/maker-bundle": "^1.55",
46-
"symfony/phpunit-bridge": "^6.4|^7.0|^8.0",
47-
"symfony/routing": "^6.4|^7.0|^8.0",
48-
"symfony/runtime": "^6.4|^7.0|^8.0",
39+
"symfony/browser-kit": "^8.0",
40+
"symfony/console": "^8.0",
41+
"symfony/dotenv": "^8.0",
42+
"symfony/framework-bundle": "^8.0",
43+
"symfony/phpunit-bridge": "^8.0",
44+
"symfony/routing": "^8.0",
45+
"symfony/runtime": "^8.0",
4946
"symfony/translation-contracts": "^3.4",
50-
"symfony/uid": "^6.4|^7.0|^8.0",
51-
"symfony/var-dumper": "^6.4|^7.0|^8.0",
52-
"symfony/yaml": "^6.4|^7.0|^8.0",
47+
"symfony/uid": "^8.0",
48+
"symfony/var-dumper": "^8.0",
49+
"symfony/yaml": "^8.0",
5350
"webmozart/assert": "^1.11"
5451
},
5552
"autoload": {
@@ -94,11 +91,19 @@
9491
},
9592
"psalm": {
9693
"pluginClass": "Zenstruck\\Foundry\\Psalm\\FoundryPlugin"
94+
},
95+
"symfony": {
96+
"require": "8.0.*",
97+
"docker": false
9798
}
9899
},
99100
"scripts": {
100-
"post-install-cmd": ["@composer bin phpstan install", "@composer bin phpbench install"]
101+
"post-install-cmd": ["@composer bin phpstan install", "@composer bin phpbench install"],
102+
"auto-scripts": {
103+
"cache:clear": "symfony-cmd",
104+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
105+
}
101106
},
102-
"minimum-stability": "dev",
107+
"minimum-stability": "beta",
103108
"prefer-stable": true
104109
}

phpunit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ check_phpunit_version() {
1717
fi
1818
}
1919

20+
can_use_legacy_proxies() {
21+
INSTALLED_SYMFONY_VERSION=$(${COMPOSER_BIN} info symfony/var-exporter | grep versions | cut -c 15-)
22+
23+
if [[ "${INSTALLED_SYMFONY_VERSION}" == "8"* ]]; then
24+
echo 0;
25+
else
26+
echo 1;
27+
fi
28+
}
29+
2030
### >> load env vars from .env files if not in CI and not from a composer script
2131
if [ -z "${CI:-}" ] ; then
2232
source .env
@@ -74,6 +84,10 @@ case ${PHPUNIT_VERSION} in
7484
if [ "${USE_FOUNDRY_PHPUNIT_EXTENSION:-0}" = "1" ]; then
7585
PHPUNIT_EXEC="${PHPUNIT_EXEC} --extension "${FOUNDRY_EXTENSION}""
7686
fi
87+
88+
if [ "$(can_use_legacy_proxies)" = "0" ]; then
89+
PHPUNIT_EXEC="${PHPUNIT_EXEC} --exclude-group legacy-proxy"
90+
fi
7791
;;
7892
esac
7993

phpunit-deprecation-baseline.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Foundry now leverages the native PHP lazy system to auto-refresh objects (it can
1414
See https://github.com/zenstruck/foundry/blob/2.x/UPGRADE-2.7.md to upgrade.]]></issue>
1515

1616
<issue><![CDATA[Support for MySQL < 8 is deprecated and will be removed in DBAL 5 (AbstractMySQLDriver.php:75 called by AbstractDriverMiddleware.php:32, https://github.com/doctrine/dbal/pull/6343, package doctrine/dbal)]]></issue>
17+
<issue><![CDATA[Since doctrine/doctrine-bundle 3.1: The "auto_mapping" option is deprecated and will be removed in DoctrineBundle 4.0, as it only accepts `false` since 3.0.]]></issue>
1718
</line>
1819
</file>
1920
<file path="vendor/doctrine/deprecations/src/Deprecation.php">

tests/Fixture/Entity/Contact.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,11 @@ class Contact extends Base
3535

3636
/** @var Collection<int,Tag> */
3737
#[ORM\ManyToMany(targetEntity: Tag::class, inversedBy: 'contacts')]
38-
#[ORM\JoinColumn(nullable: false)]
39-
#[ORM\InverseJoinColumn(nullable: false)]
4038
protected Collection $tags;
4139

4240
/** @var Collection<int,Tag> */
4341
#[ORM\ManyToMany(targetEntity: Tag::class, inversedBy: 'secondaryContacts')]
4442
#[ORM\JoinTable(name: 'category_tag_standard_secondary')]
45-
#[ORM\JoinColumn(nullable: false)]
46-
#[ORM\InverseJoinColumn(nullable: false)]
4743
protected Collection $secondaryTags;
4844

4945
#[ORM\OneToOne(targetEntity: Address::class, inversedBy: 'contact')]

0 commit comments

Comments
 (0)