[DEPENDENCY] Upgrade Symfony framework from 5.0 to 5.1

This commit is contained in:
Hugo Sales 2020-06-08 12:04:20 +00:00 committed by Hugo Sales
parent db5811a77e
commit 8649b72192
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0
7 changed files with 1862 additions and 939 deletions

View File

@ -10,30 +10,31 @@
"alchemy/zippy": "v0.5.x-dev", "alchemy/zippy": "v0.5.x-dev",
"lstrojny/functional-php": "^1.11", "lstrojny/functional-php": "^1.11",
"sensio/framework-extra-bundle": "^5.1", "sensio/framework-extra-bundle": "^5.1",
"symfony/asset": "5.0.*", "symfony/asset": "5.1.*",
"symfony/console": "5.0.*", "symfony/console": "5.1.*",
"symfony/dotenv": "^5.0", "symfony/dotenv": "5.1.*",
"symfony/event-dispatcher": "5.0.*", "symfony/event-dispatcher": "5.1.*",
"symfony/expression-language": "5.0.*", "symfony/expression-language": "5.1.*",
"symfony/filesystem": "5.0.*", "symfony/filesystem": "5.1.*",
"symfony/flex": "^1.3.1", "symfony/flex": "^1.3.1",
"symfony/form": "5.0.*", "symfony/form": "5.1.*",
"symfony/framework-bundle": "5.0.*", "symfony/framework-bundle": "5.1.*",
"symfony/http-client": "5.0.*", "symfony/http-client": "5.1.*",
"symfony/intl": "5.0.*", "symfony/intl": "5.1.*",
"symfony/mailer": "5.0.*", "symfony/mailer": "5.1.*",
"symfony/mime": "5.1.*",
"symfony/monolog-bundle": "^3.1", "symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.0.*", "symfony/notifier": "5.1.*",
"symfony/orm-pack": "^1.0", "symfony/orm-pack": "*",
"symfony/process": "5.0.*", "symfony/process": "5.1.*",
"symfony/security-bundle": "5.0.*", "symfony/security-bundle": "5.1.*",
"symfony/serializer-pack": "*", "symfony/serializer-pack": "*",
"symfony/string": "5.0.*", "symfony/string": "5.1.*",
"symfony/translation": "5.0.*", "symfony/translation": "5.1.*",
"symfony/twig-pack": "*", "symfony/twig-pack": "*",
"symfony/validator": "5.0.*", "symfony/validator": "5.1.*",
"symfony/web-link": "5.0.*", "symfony/web-link": "5.1.*",
"symfony/yaml": "5.0.*" "symfony/yaml": "5.1.*"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.16", "friendsofphp/php-cs-fixer": "^2.16",
@ -53,7 +54,7 @@
"psr-4": { "psr-4": {
"App\\": "src/", "App\\": "src/",
"Plugin\\": "plugins/enabled/" "Plugin\\": "plugins/enabled/"
} }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
@ -88,7 +89,7 @@
"extra": { "extra": {
"symfony": { "symfony": {
"allow-contrib": false, "allow-contrib": false,
"require": "5.0.*" "require": "5.1.*"
} }
} }
} }

2533
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ if (\is_array($env = @include dirname(__DIR__) . '/.env.local.php') && (!isset($
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else { } else {
// load all the .env files // load all the .env files
(new Dotenv(false))->loadEnv(\dirname(__DIR__) . '/.env'); (new Dotenv())->loadEnv(\dirname(__DIR__) . '/.env');
} }
$_SERVER += $_ENV; $_SERVER += $_ENV;

View File

@ -0,0 +1,8 @@
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
monolog:
channels: [deprecation]
handlers:
deprecation:
type: stream
channels: [deprecation]
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"

View File

@ -7,7 +7,8 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/ pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false security: false
main: main:
anonymous: lazy anonymous: true
lazy: true
provider: users_in_memory provider: users_in_memory
# activate different ways to authenticate # activate different ways to authenticate

View File

@ -45,7 +45,6 @@ use App\Core\DB\DefaultSettings;
use App\Core\I18n\I18nHelper; use App\Core\I18n\I18nHelper;
use App\Core\Router\Router; use App\Core\Router\Router;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@ -57,7 +56,6 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class GNUsocial implements EventSubscriberInterface class GNUsocial implements EventSubscriberInterface
{ {
protected ContainerInterface $container;
protected LoggerInterface $logger; protected LoggerInterface $logger;
protected TranslatorInterface $translator; protected TranslatorInterface $translator;
protected EntityManagerInterface $entity_manager; protected EntityManagerInterface $entity_manager;
@ -66,13 +64,11 @@ class GNUsocial implements EventSubscriberInterface
/** /**
* Symfony dependency injection gives us access to these services * Symfony dependency injection gives us access to these services
*/ */
public function __construct(ContainerInterface $container, public function __construct(LoggerInterface $logger,
LoggerInterface $logger,
TranslatorInterface $translator, TranslatorInterface $translator,
EntityManagerInterface $em, EntityManagerInterface $em,
RouterInterface $router) RouterInterface $router)
{ {
$this->container = $container;
$this->logger = $logger; $this->logger = $logger;
$this->translator = $translator; $this->translator = $translator;
$this->entity_manager = $em; $this->entity_manager = $em;

View File

@ -12,7 +12,7 @@
"version": "1.5.1" "version": "1.5.1"
}, },
"composer/xdebug-handler": { "composer/xdebug-handler": {
"version": "1.4.1" "version": "1.4.2"
}, },
"doctrine/annotations": { "doctrine/annotations": {
"version": "1.0", "version": "1.0",
@ -27,16 +27,16 @@
] ]
}, },
"doctrine/cache": { "doctrine/cache": {
"version": "1.10.0" "version": "1.10.1"
}, },
"doctrine/collections": { "doctrine/collections": {
"version": "1.6.4" "version": "1.6.5"
}, },
"doctrine/common": { "doctrine/common": {
"version": "2.12.0" "version": "2.13.3"
}, },
"doctrine/dbal": { "doctrine/dbal": {
"version": "v2.10.1" "version": "2.10.2"
}, },
"doctrine/doctrine-bundle": { "doctrine/doctrine-bundle": {
"version": "2.0", "version": "2.0",
@ -70,37 +70,28 @@
"version": "1.1.0" "version": "1.1.0"
}, },
"doctrine/inflector": { "doctrine/inflector": {
"version": "1.3.1" "version": "1.4.3"
}, },
"doctrine/instantiator": { "doctrine/instantiator": {
"version": "1.3.0" "version": "1.3.1"
}, },
"doctrine/lexer": { "doctrine/lexer": {
"version": "1.2.0" "version": "1.2.1"
}, },
"doctrine/migrations": { "doctrine/migrations": {
"version": "2.2.1" "version": "2.2.1"
}, },
"doctrine/orm": { "doctrine/orm": {
"version": "v2.7.1" "version": "v2.7.3"
}, },
"doctrine/persistence": { "doctrine/persistence": {
"version": "1.3.6" "version": "1.3.7"
}, },
"doctrine/reflection": { "doctrine/reflection": {
"version": "v1.1.0" "version": "1.2.1"
}, },
"easycorp/easy-log-handler": { "doctrine/sql-formatter": {
"version": "1.0", "version": "1.1.0"
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "70062abc2cd58794d2a90274502f81b55cd9951b"
},
"files": [
"config/packages/dev/easy_log_handler.yaml"
]
}, },
"egulias/email-validator": { "egulias/email-validator": {
"version": "2.1.17" "version": "2.1.17"
@ -117,9 +108,6 @@
".php_cs.dist" ".php_cs.dist"
] ]
}, },
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
"laminas/laminas-code": { "laminas/laminas-code": {
"version": "3.4.1" "version": "3.4.1"
}, },
@ -127,22 +115,22 @@
"version": "3.2.1" "version": "3.2.1"
}, },
"laminas/laminas-zendframework-bridge": { "laminas/laminas-zendframework-bridge": {
"version": "1.0.1" "version": "1.0.4"
}, },
"lstrojny/functional-php": { "lstrojny/functional-php": {
"version": "1.11.0" "version": "1.11.0"
}, },
"monolog/monolog": { "monolog/monolog": {
"version": "2.0.2" "version": "2.1.0"
}, },
"nikic/php-parser": { "nikic/php-parser": {
"version": "v4.3.0" "version": "v4.5.0"
}, },
"ocramius/package-versions": { "ocramius/package-versions": {
"version": "1.7.0" "version": "1.8.0"
}, },
"ocramius/proxy-manager": { "ocramius/proxy-manager": {
"version": "2.7.0" "version": "2.8.0"
}, },
"php": { "php": {
"version": "7.4" "version": "7.4"
@ -151,10 +139,10 @@
"version": "v1.3.0" "version": "v1.3.0"
}, },
"phpdocumentor/reflection-common": { "phpdocumentor/reflection-common": {
"version": "2.0.0" "version": "2.1.0"
}, },
"phpdocumentor/reflection-docblock": { "phpdocumentor/reflection-docblock": {
"version": "4.3.4" "version": "5.1.0"
}, },
"phpdocumentor/type-resolver": { "phpdocumentor/type-resolver": {
"version": "1.1.0" "version": "1.1.0"
@ -172,7 +160,7 @@
"version": "1.0.0" "version": "1.0.0"
}, },
"psr/log": { "psr/log": {
"version": "1.1.2" "version": "1.1.3"
}, },
"sensio/framework-extra-bundle": { "sensio/framework-extra-bundle": {
"version": "5.2", "version": "5.2",
@ -187,35 +175,34 @@
] ]
}, },
"symfony/asset": { "symfony/asset": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/browser-kit": { "symfony/browser-kit": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/cache": { "symfony/cache": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/cache-contracts": { "symfony/cache-contracts": {
"version": "v2.0.1" "version": "v2.1.2"
}, },
"symfony/config": { "symfony/config": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/console": { "symfony/console": {
"version": "4.4", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "4.4", "version": "5.1",
"ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c" "ref": "c6d02bdfba9da13c22157520e32a602dbee8a75c"
}, },
"files": [ "files": [
"bin/console", "bin/console"
"config/bootstrap.php"
] ]
}, },
"symfony/css-selector": { "symfony/css-selector": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/debug-bundle": { "symfony/debug-bundle": {
"version": "4.1", "version": "4.1",
@ -230,37 +217,40 @@
] ]
}, },
"symfony/debug-pack": { "symfony/debug-pack": {
"version": "v1.0.7" "version": "v1.0.8"
}, },
"symfony/dependency-injection": { "symfony/dependency-injection": {
"version": "v5.0.5" "version": "v5.1.0"
},
"symfony/deprecation-contracts": {
"version": "v2.1.2"
}, },
"symfony/doctrine-bridge": { "symfony/doctrine-bridge": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/dom-crawler": { "symfony/dom-crawler": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/dotenv": { "symfony/dotenv": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/error-handler": { "symfony/error-handler": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/event-dispatcher": { "symfony/event-dispatcher": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/event-dispatcher-contracts": { "symfony/event-dispatcher-contracts": {
"version": "v2.0.1" "version": "v2.1.2"
}, },
"symfony/expression-language": { "symfony/expression-language": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/filesystem": { "symfony/filesystem": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/finder": { "symfony/finder": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/flex": { "symfony/flex": {
"version": "1.0", "version": "1.0",
@ -275,18 +265,17 @@
] ]
}, },
"symfony/form": { "symfony/form": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/framework-bundle": { "symfony/framework-bundle": {
"version": "4.4", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "4.4", "version": "5.1",
"ref": "23ecaccc551fe2f74baf613811ae529eb07762fa" "ref": "37b4ec59eda3eb89705f21a0da7231862495ce0a"
}, },
"files": [ "files": [
"config/bootstrap.php",
"config/packages/cache.yaml", "config/packages/cache.yaml",
"config/packages/framework.yaml", "config/packages/framework.yaml",
"config/packages/test/framework.yaml", "config/packages/test/framework.yaml",
@ -298,22 +287,22 @@
] ]
}, },
"symfony/http-client": { "symfony/http-client": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/http-client-contracts": { "symfony/http-client-contracts": {
"version": "v2.0.1" "version": "v2.1.2"
}, },
"symfony/http-foundation": { "symfony/http-foundation": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/http-kernel": { "symfony/http-kernel": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/inflector": { "symfony/inflector": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/intl": { "symfony/intl": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/mailer": { "symfony/mailer": {
"version": "4.3", "version": "4.3",
@ -337,10 +326,10 @@
} }
}, },
"symfony/mime": { "symfony/mime": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/monolog-bridge": { "symfony/monolog-bridge": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/monolog-bundle": { "symfony/monolog-bundle": {
"version": "3.3", "version": "3.3",
@ -348,10 +337,11 @@
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "3.3", "version": "3.3",
"ref": "877bdb4223245783d00ed1f7429aa7ebc606d914" "ref": "d7249f7d560f6736115eee1851d02a65826f0a56"
}, },
"files": [ "files": [
"config/packages/dev/monolog.yaml", "config/packages/dev/monolog.yaml",
"config/packages/prod/deprecations.yaml",
"config/packages/prod/monolog.yaml", "config/packages/prod/monolog.yaml",
"config/packages/test/monolog.yaml" "config/packages/test/monolog.yaml"
] ]
@ -369,7 +359,7 @@
] ]
}, },
"symfony/options-resolver": { "symfony/options-resolver": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/orm-pack": { "symfony/orm-pack": {
"version": "v1.0.8" "version": "v1.0.8"
@ -390,42 +380,45 @@
] ]
}, },
"symfony/polyfill-intl-grapheme": { "symfony/polyfill-intl-grapheme": {
"version": "v1.14.0" "version": "v1.17.0"
}, },
"symfony/polyfill-intl-icu": { "symfony/polyfill-intl-icu": {
"version": "v1.14.0" "version": "v1.17.0"
}, },
"symfony/polyfill-intl-idn": { "symfony/polyfill-intl-idn": {
"version": "v1.14.0" "version": "v1.17.0"
}, },
"symfony/polyfill-intl-normalizer": { "symfony/polyfill-intl-normalizer": {
"version": "v1.14.0" "version": "v1.17.0"
}, },
"symfony/polyfill-mbstring": { "symfony/polyfill-mbstring": {
"version": "v1.14.0" "version": "v1.17.0"
}, },
"symfony/polyfill-php73": { "symfony/polyfill-php73": {
"version": "v1.14.0" "version": "v1.17.0"
},
"symfony/polyfill-php80": {
"version": "v1.17.0"
}, },
"symfony/process": { "symfony/process": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/profiler-pack": { "symfony/profiler-pack": {
"version": "v1.0.4" "version": "v1.0.4"
}, },
"symfony/property-access": { "symfony/property-access": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/property-info": { "symfony/property-info": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/routing": { "symfony/routing": {
"version": "4.2", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "4.2", "version": "5.1",
"ref": "683dcb08707ba8d41b7e34adb0344bfd68d248a7" "ref": "b4f3e7c95e38b606eef467e8a42a8408fc460c43"
}, },
"files": [ "files": [
"config/packages/prod/routing.yaml", "config/packages/prod/routing.yaml",
@ -434,43 +427,43 @@
] ]
}, },
"symfony/security-bundle": { "symfony/security-bundle": {
"version": "4.4", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "4.4", "version": "5.1",
"ref": "7b4408dc203049666fe23fabed23cbadc6d8440f" "ref": "0a4bae19389d3b9cba1ca0102e3b2bccea724603"
}, },
"files": [ "files": [
"config/packages/security.yaml" "config/packages/security.yaml"
] ]
}, },
"symfony/security-core": { "symfony/security-core": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/security-csrf": { "symfony/security-csrf": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/security-guard": { "symfony/security-guard": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/security-http": { "symfony/security-http": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/serializer": { "symfony/serializer": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/serializer-pack": { "symfony/serializer-pack": {
"version": "v1.0.2" "version": "v1.0.3"
}, },
"symfony/service-contracts": { "symfony/service-contracts": {
"version": "v2.0.1" "version": "v2.1.2"
}, },
"symfony/stopwatch": { "symfony/stopwatch": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/string": { "symfony/string": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/test-pack": { "symfony/test-pack": {
"version": "v1.0.6" "version": "v1.0.6"
@ -489,10 +482,10 @@
] ]
}, },
"symfony/translation-contracts": { "symfony/translation-contracts": {
"version": "v2.0.1" "version": "v2.1.2"
}, },
"symfony/twig-bridge": { "symfony/twig-bridge": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/twig-bundle": { "symfony/twig-bundle": {
"version": "5.0", "version": "5.0",
@ -525,13 +518,13 @@
] ]
}, },
"symfony/var-dumper": { "symfony/var-dumper": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/var-exporter": { "symfony/var-exporter": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/web-link": { "symfony/web-link": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"symfony/web-profiler-bundle": { "symfony/web-profiler-bundle": {
"version": "3.3", "version": "3.3",
@ -548,7 +541,7 @@
] ]
}, },
"symfony/yaml": { "symfony/yaml": {
"version": "v5.0.5" "version": "v5.1.0"
}, },
"twig/extra-bundle": { "twig/extra-bundle": {
"version": "v3.0.3" "version": "v3.0.3"
@ -556,13 +549,10 @@
"twig/twig": { "twig/twig": {
"version": "v3.0.3" "version": "v3.0.3"
}, },
"webimpress/safe-writer": {
"version": "2.0.1"
},
"webmozart/assert": { "webmozart/assert": {
"version": "1.7.0" "version": "1.8.0"
},
"zendframework/zend-code": {
"version": "3.4.1"
},
"zendframework/zend-eventmanager": {
"version": "3.2.1"
} }
} }