Skip to content

Commit

Permalink
feature #1519 Update to Symfony 7.1 (javiereguiluz)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
javiereguiluz committed Jun 4, 2024
2 parents effa75f + 69aa458 commit 5dd64c8
Show file tree
Hide file tree
Showing 21 changed files with 835 additions and 707 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ APP_SECRET=2ca64f8d83b9e89f5f19d672841d6bb8
#
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database.sqlite
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8&charset=utf8mb4"
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=15&charset=utf8"
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=16&charset=utf8"
###< doctrine/doctrine-bundle ###

###> symfony/mailer ###
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
fail-fast: true
PHPUNIT_FLAGS: "-v"
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
SYMFONY_DEPRECATIONS_HELPER: 0
SYMFONY_DEPRECATIONS_HELPER: 'max[indirect]=52'

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

###> symfony/asset-mapper ###
/public/assets/
/assets/vendor
/assets/vendor/
###< symfony/asset-mapper ###
6 changes: 3 additions & 3 deletions assets/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// start the Stimulus application
import './bootstrap.js';
import './styles/app.scss';
import '@fortawesome/fontawesome-free/css/all.css';
import '@fortawesome/fontawesome-free/css/v4-shims.css';
Expand All @@ -18,7 +20,5 @@ import './js/highlight.js';
// Creates links to the Symfony documentation
import './js/doclinks.js';

// start the Stimulus application
import './bootstrap.js';

import './js/flatpicker.js';

4 changes: 4 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;

if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}

if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}
Expand Down
55 changes: 28 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"license": "MIT",
"type": "project",
"description": "Symfony Demo Application",
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"replace": {
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
"symfony/polyfill-php81": "*",
"symfony/polyfill-php82": "*"
},
"require": {
"php": ">=8.2",
Expand All @@ -21,29 +22,29 @@
"doctrine/orm": "^3.0",
"league/commonmark": "^2.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "^7.0",
"symfony/asset-mapper": "^7.0",
"symfony/console": "^7.0",
"symfony/dotenv": "^7.0",
"symfony/expression-language": "^7.0",
"symfony/asset": "7.1.*",
"symfony/asset-mapper": "7.1.*",
"symfony/console": "7.1.*",
"symfony/dotenv": "7.1.*",
"symfony/expression-language": "7.1.*",
"symfony/flex": "^2",
"symfony/form": "^7.0",
"symfony/framework-bundle": "^7.0",
"symfony/html-sanitizer": "^7.0",
"symfony/http-client": "^7.0",
"symfony/intl": "^7.0",
"symfony/mailer": "^7.0",
"symfony/form": "7.1.*",
"symfony/framework-bundle": "7.1.*",
"symfony/html-sanitizer": "7.1.*",
"symfony/http-client": "7.1.*",
"symfony/intl": "7.1.*",
"symfony/mailer": "7.1.*",
"symfony/monolog-bundle": "^3.7",
"symfony/polyfill-intl-messageformatter": "^1.12",
"symfony/runtime": "^7.0",
"symfony/security-bundle": "^7.0",
"symfony/runtime": "7.1.*",
"symfony/security-bundle": "7.1.*",
"symfony/stimulus-bundle": "^2.12",
"symfony/string": "^7.0",
"symfony/translation": "^7.0",
"symfony/twig-bundle": "^7.0",
"symfony/string": "7.1.*",
"symfony/translation": "7.1.*",
"symfony/twig-bundle": "7.1.*",
"symfony/ux-live-component": "^2.6",
"symfony/validator": "^7.0",
"symfony/yaml": "^7.0",
"symfony/validator": "7.1.*",
"symfony/yaml": "7.1.*",
"symfonycasts/sass-bundle": "^0.3",
"twig/extra-bundle": "^3.3",
"twig/intl-extra": "^3.3",
Expand All @@ -56,13 +57,13 @@
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-symfony": "^1.2",
"symfony/browser-kit": "^7.0",
"symfony/css-selector": "^7.0",
"symfony/debug-bundle": "^7.0",
"symfony/browser-kit": "7.1.*",
"symfony/css-selector": "7.1.*",
"symfony/debug-bundle": "7.1.*",
"symfony/maker-bundle": "^1.36",
"symfony/phpunit-bridge": "^7.0.1",
"symfony/stopwatch": "^7.0",
"symfony/web-profiler-bundle": "^7.0",
"symfony/phpunit-bridge": "7.1.*",
"symfony/stopwatch": "7.1.*",
"symfony/web-profiler-bundle": "7.1.*",
"twbs/bootstrap": "^4.5.3"
},
"config": {
Expand Down Expand Up @@ -106,7 +107,7 @@
"extra": {
"symfony": {
"allow-contrib": true,
"require": "7.0.*"
"require": "7.1.*"
}
}
}
Loading

0 comments on commit 5dd64c8

Please sign in to comment.