// composer.json
{
"require": {
"php": "^8.0.2",
"ext-ctype": "*",
"ext-iconv": "*",
"babdev/pagerfanta-bundle": "^3.6", // v3.6.1
"composer/package-versions-deprecated": "^1.11", // 1.11.99.5
"doctrine/annotations": "^1.13", // 1.13.2
"doctrine/dbal": "^3.3", // 3.3.5
"doctrine/doctrine-bundle": "^2.0", // 2.6.2
"doctrine/doctrine-migrations-bundle": "^3.2", // 3.2.2
"doctrine/orm": "^2.0", // 2.11.2
"knplabs/knp-markdown-bundle": "^1.8", // 1.10.0
"knplabs/knp-time-bundle": "^1.18", // v1.18.0
"pagerfanta/doctrine-orm-adapter": "^3.6", // v3.6.1
"pagerfanta/twig": "^3.6", // v3.6.1
"sensio/framework-extra-bundle": "^6.0", // v6.2.6
"sentry/sentry-symfony": "^4.0", // 4.2.8
"stof/doctrine-extensions-bundle": "^1.5", // v1.7.0
"symfony/asset": "6.0.*", // v6.0.7
"symfony/console": "6.0.*", // v6.0.7
"symfony/dotenv": "6.0.*", // v6.0.5
"symfony/flex": "^2.1", // v2.1.7
"symfony/form": "6.0.*", // v6.0.7
"symfony/framework-bundle": "6.0.*", // v6.0.7
"symfony/mailer": "6.0.*", // v6.0.5
"symfony/monolog-bundle": "^3.0", // v3.7.1
"symfony/property-access": "6.0.*", // v6.0.7
"symfony/property-info": "6.0.*", // v6.0.7
"symfony/proxy-manager-bridge": "6.0.*", // v6.0.6
"symfony/routing": "6.0.*", // v6.0.5
"symfony/runtime": "6.0.*", // v6.0.7
"symfony/security-bundle": "6.0.*", // v6.0.5
"symfony/serializer": "6.0.*", // v6.0.7
"symfony/stopwatch": "6.0.*", // v6.0.5
"symfony/twig-bundle": "6.0.*", // v6.0.3
"symfony/ux-chartjs": "^2.0", // v2.1.0
"symfony/validator": "6.0.*", // v6.0.7
"symfony/webpack-encore-bundle": "^1.7", // v1.14.0
"symfony/yaml": "6.0.*", // v6.0.3
"symfonycasts/verify-email-bundle": "^1.7", // v1.10.0
"twig/extra-bundle": "^2.12|^3.0", // v3.3.8
"twig/string-extra": "^3.3", // v3.3.5
"twig/twig": "^2.12|^3.0" // v3.3.10
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.1
"phpunit/phpunit": "^9.5", // 9.5.20
"rector/rector": "^0.12.17", // 0.12.20
"symfony/debug-bundle": "6.0.*", // v6.0.3
"symfony/maker-bundle": "^1.15", // v1.38.0
"symfony/var-dumper": "6.0.*", // v6.0.6
"symfony/web-profiler-bundle": "6.0.*", // v6.0.6
"zenstruck/foundry": "^1.16" // v1.18.0
}
}
8 Comments
Hey Guys!
I worked through the code to this point, and I have 14 deprecations coming from two sources. KNP Markdown Bundle has four methods missing return definitions. Given that KNP Markdown Bundle has been abandoned, are these deprecations the trigger to replace KNP Markdown Bundle with twig/markdown-extra (or can I upgrade to Symfony 6 without removing those deprecations)?
The second source is BabDev\PagerfantaBundle. That module is at ^2.0 in composer.json. When I upgraded to version 3, Symfony blew up with a failed to open stream error. Is there any direction on upgrading Pagerfanta?
Thanks!
Ok, I just moved on to Chapter 16, and my questions were answered. Life is good.
Hmmmm...I just restarted my development system, and the KNP Markdown Bundle deprecations are no longer showing up in the debug toolbar. I don't know what that means.
Hey Dan_M!
Haha, yup I'm glad you found the answer! About the deprecations no longer showing up, that can happen sometimes - I think it deals with whether or not some of the cache needed to be built during that request or not. In short, you will see some variations between the deprecations count from time to time, even on the same page (that's why, once you think all the deprecations are gone, deploying to production with deprecations logging enabled is a great way to make sure you haven't missed anything).
Cheers!
Hi, I also wanted to ask - you mentioned in another video that one can create a base class to extend all other controllers from, rather than extending the AbstractController every time.
Would it be possible to set up my own "template" sort of, with all the use statements that are common to all of my controllers, and also initialize the variables in the construct, so I don't need to clutter my every controller with that?
So I'm thinking something like this
And then omit all of this in my every controller, like this:
I get an error message when I do the
parent::__construct();, apparently I'm missing arguments. But if I need to repeat the arguments on every controller it isn't much point in trying to abstract it in this way anyways...Just thought maybe there is a smart way? =)
Hey Matt,
I think in your case it would be better to use the
ServiceSubscriber. You can define a list of services that you always want to have access to. You can read more about it here https://symfony.com/doc/current/service_container/service_subscribers_locators.htmlBy the way, if a child's constructor does nothing, you don't need a constructor at all. PHP will call the parent's constructor automatically
Cheers!
Hi, I still get this deprecation:
From this issue (https://github.com/doctrine/DoctrineBundle/issues/1429) it seems it was fixed in Doctrine 2.6 but I'm running 2.7 and it is still there.
Guess I shouldn't worry too much about it, by the time I'm ready to move up to 6.x the matching doctrine version is probably fixed, but it'd be a good feeling to have a completely deprecation free board =)
Yea, it would feel nicer to get rid of all deprecations, but in this case, I think it would be better to just wait until you upgrade Doctrine
Cheers!
"Houston: no signs of life"
Start the conversation!