Skip to content

Commit 5dd64c8

Browse files
committed
feature #1519 Update to Symfony 7.1 (javiereguiluz)
This PR was squashed before being merged into the main branch. Discussion ---------- Update to Symfony 7.1 These are the pending indirect deprecations: `Remaining indirect deprecation notices (56)` ----- 37x: Since twig/twig 3.10: The "Twig\Extension\EscaperExtension::addSafeClass()" method is deprecated, use the "Twig\Runtime\EscaperRuntime::addSafeClass()" method instead. Remove Doctine deprecations 4x in BlogControllerTest::testAccessDeniedForRegularUsers from App\Tests\Controller\Admin 4x in BlogControllerTest::testNewComment from App\Tests\Controller 4x in DefaultControllerTest::testSecureUrls from App\Tests\Controller 3x in BlogControllerTest::testAdminNewDuplicatedPost from App\Tests\Controller\Admin 3x in DefaultControllerTest::testPublicUrls from App\Tests\Controller ... ❓ Not sure if this has been fixed upstream ----- 15x: Since twig/twig 3.9: Using the internal "twig_escape_filter" function is deprecated. 9x in DefaultControllerTest::testPublicUrls from App\Tests\Controller 6x in BlogControllerTest::testAjaxSearch from App\Tests\Controller ❓ Not sure if this has been fixed upstream ----- 2x: Since symfony/doctrine-bridge 7.1: Relying on auto-mapping for Doctrine entities is deprecated for argument $post of "App\Controller\BlogController::commentForm": declare the mapping using either the #[MapEntity] attribute or mapped route parameters. 2x in BlogControllerTest::testNewComment from App\Tests\Controller ❌ I don't know how to fix this. It's related thi this: https://github.com/symfony/demo/blob/main/src/Controller/BlogController.php#L154 Should I add a `#[MapEntity]` attribute? Maybe `@stof` can help me here. Thanks! ----- 1x: The "Symfony\Component\HttpKernel\DependencyInjection\Extension" class is considered internal since Symfony 7.1, to be deprecated in 8.1; use Symfony\Component\DependencyInjection\Extension\Extension instead. It may change without further notice. You should not use it from "DAMA\DoctrineTestBundle\DependencyInjection\DAMADoctrineTestExtension". 1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command ✅ `@dmaicher` fixed this last week (dmaicher/doctrine-test-bundle@e4995f9) so it'll be ready in the next release ----- 1x: Since symfony/property-info 7.1: The "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getTypes()" method is deprecated, use "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getType()" instead. 1x in BlogControllerTest::testAjaxSearch from App\Tests\Controller ✅ I think this was fixed upstream in 7.1-dev Commits ------- 69aa458 Update to Symfony 7.1
2 parents effa75f + 69aa458 commit 5dd64c8

21 files changed

+835
-707
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ APP_SECRET=2ca64f8d83b9e89f5f19d672841d6bb8
2727
#
2828
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database.sqlite
2929
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8&charset=utf8mb4"
30-
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=15&charset=utf8"
30+
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=16&charset=utf8"
3131
###< doctrine/doctrine-bundle ###
3232

3333
###> symfony/mailer ###

.github/workflows/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
fail-fast: true
1111
PHPUNIT_FLAGS: "-v"
1212
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
13-
SYMFONY_DEPRECATIONS_HELPER: 0
13+
SYMFONY_DEPRECATIONS_HELPER: 'max[indirect]=52'
1414

1515
permissions:
1616
contents: read

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020

2121
###> symfony/asset-mapper ###
2222
/public/assets/
23-
/assets/vendor
23+
/assets/vendor/
2424
###< symfony/asset-mapper ###

assets/app.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// start the Stimulus application
2+
import './bootstrap.js';
13
import './styles/app.scss';
24
import '@fortawesome/fontawesome-free/css/all.css';
35
import '@fortawesome/fontawesome-free/css/v4-shims.css';
@@ -18,7 +20,5 @@ import './js/highlight.js';
1820
// Creates links to the Symfony documentation
1921
import './js/doclinks.js';
2022

21-
// start the Stimulus application
22-
import './bootstrap.js';
23-
2423
import './js/flatpicker.js';
24+

bin/console

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
use App\Kernel;
55
use Symfony\Bundle\FrameworkBundle\Console\Application;
66

7+
if (!is_dir(dirname(__DIR__).'/vendor')) {
8+
throw new LogicException('Dependencies are missing. Try running "composer install".');
9+
}
10+
711
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
812
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
913
}

composer.json

+28-27
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"license": "MIT",
44
"type": "project",
55
"description": "Symfony Demo Application",
6-
"minimum-stability": "dev",
6+
"minimum-stability": "stable",
77
"prefer-stable": true,
88
"replace": {
99
"symfony/polyfill-php72": "*",
1010
"symfony/polyfill-php73": "*",
1111
"symfony/polyfill-php74": "*",
1212
"symfony/polyfill-php80": "*",
13-
"symfony/polyfill-php81": "*"
13+
"symfony/polyfill-php81": "*",
14+
"symfony/polyfill-php82": "*"
1415
},
1516
"require": {
1617
"php": ">=8.2",
@@ -21,29 +22,29 @@
2122
"doctrine/orm": "^3.0",
2223
"league/commonmark": "^2.1",
2324
"symfony/apache-pack": "^1.0",
24-
"symfony/asset": "^7.0",
25-
"symfony/asset-mapper": "^7.0",
26-
"symfony/console": "^7.0",
27-
"symfony/dotenv": "^7.0",
28-
"symfony/expression-language": "^7.0",
25+
"symfony/asset": "7.1.*",
26+
"symfony/asset-mapper": "7.1.*",
27+
"symfony/console": "7.1.*",
28+
"symfony/dotenv": "7.1.*",
29+
"symfony/expression-language": "7.1.*",
2930
"symfony/flex": "^2",
30-
"symfony/form": "^7.0",
31-
"symfony/framework-bundle": "^7.0",
32-
"symfony/html-sanitizer": "^7.0",
33-
"symfony/http-client": "^7.0",
34-
"symfony/intl": "^7.0",
35-
"symfony/mailer": "^7.0",
31+
"symfony/form": "7.1.*",
32+
"symfony/framework-bundle": "7.1.*",
33+
"symfony/html-sanitizer": "7.1.*",
34+
"symfony/http-client": "7.1.*",
35+
"symfony/intl": "7.1.*",
36+
"symfony/mailer": "7.1.*",
3637
"symfony/monolog-bundle": "^3.7",
3738
"symfony/polyfill-intl-messageformatter": "^1.12",
38-
"symfony/runtime": "^7.0",
39-
"symfony/security-bundle": "^7.0",
39+
"symfony/runtime": "7.1.*",
40+
"symfony/security-bundle": "7.1.*",
4041
"symfony/stimulus-bundle": "^2.12",
41-
"symfony/string": "^7.0",
42-
"symfony/translation": "^7.0",
43-
"symfony/twig-bundle": "^7.0",
42+
"symfony/string": "7.1.*",
43+
"symfony/translation": "7.1.*",
44+
"symfony/twig-bundle": "7.1.*",
4445
"symfony/ux-live-component": "^2.6",
45-
"symfony/validator": "^7.0",
46-
"symfony/yaml": "^7.0",
46+
"symfony/validator": "7.1.*",
47+
"symfony/yaml": "7.1.*",
4748
"symfonycasts/sass-bundle": "^0.3",
4849
"twig/extra-bundle": "^3.3",
4950
"twig/intl-extra": "^3.3",
@@ -56,13 +57,13 @@
5657
"phpstan/phpstan": "^1.2",
5758
"phpstan/phpstan-doctrine": "^1.3",
5859
"phpstan/phpstan-symfony": "^1.2",
59-
"symfony/browser-kit": "^7.0",
60-
"symfony/css-selector": "^7.0",
61-
"symfony/debug-bundle": "^7.0",
60+
"symfony/browser-kit": "7.1.*",
61+
"symfony/css-selector": "7.1.*",
62+
"symfony/debug-bundle": "7.1.*",
6263
"symfony/maker-bundle": "^1.36",
63-
"symfony/phpunit-bridge": "^7.0.1",
64-
"symfony/stopwatch": "^7.0",
65-
"symfony/web-profiler-bundle": "^7.0",
64+
"symfony/phpunit-bridge": "7.1.*",
65+
"symfony/stopwatch": "7.1.*",
66+
"symfony/web-profiler-bundle": "7.1.*",
6667
"twbs/bootstrap": "^4.5.3"
6768
},
6869
"config": {
@@ -106,7 +107,7 @@
106107
"extra": {
107108
"symfony": {
108109
"allow-contrib": true,
109-
"require": "7.0.*"
110+
"require": "7.1.*"
110111
}
111112
}
112113
}

0 commit comments

Comments
 (0)