// composer.json
{
"require": {
"php": "^7.1.3",
"composer/package-versions-deprecated": "^1.11", // 1.11.99
"doctrine/doctrine-bundle": "^1.6", // 1.8.1
"doctrine/doctrine-cache-bundle": "^1.2", // 1.3.2
"doctrine/doctrine-migrations-bundle": "^1.1", // v1.3.1
"doctrine/orm": "^2.5", // v2.7.2
"fzaninotto/faker": "^1.7", // v1.7.1
"knplabs/knp-markdown-bundle": "^1.4", // 1.6.0
"sensio/framework-extra-bundle": "^5.0", // v5.1.3
"stof/doctrine-extensions-bundle": "dev-master", // dev-master
"symfony/asset": "^4.0", // v4.0.1
"symfony/console": "^4.0", // v4.0.1
"symfony/flex": "^1.0", // v1.9.10
"symfony/form": "^4.0", // v4.0.1
"symfony/framework-bundle": "^4.0", // v4.0.1
"symfony/lts": "^4@dev", // dev-master
"symfony/maker-bundle": "^1.0", // v1.0.2
"symfony/monolog-bundle": "^3.1", // v3.1.2
"symfony/polyfill-apcu": "^1.0", // v1.6.0
"symfony/profiler-pack": "^1.0", // v1.0.3
"symfony/security-bundle": "^4.0", // v4.0.1
"symfony/security-csrf": "^4.0",
"symfony/swiftmailer-bundle": "^3.1", // v3.1.6
"symfony/translation": "^4.0", // v4.0.1
"symfony/twig-bundle": "^4.0", // v4.0.1
"symfony/validator": "^4.0", // v4.0.1
"symfony/web-server-bundle": "^4.0", // v4.0.1
"symfony/yaml": "^4.0" // v4.0.1
},
"require-dev": {
"symfony/dotenv": "^4.0", // v4.0.1
"symfony/phpunit-bridge": "^4.0", // v4.0.1
"doctrine/doctrine-fixtures-bundle": "^3.0" // 3.0.2
}
}
10 Comments
Hello,
Why are some recipe YAML files installed in the dev, prod and test directories, while others in the top-level packages directory? A good example of it is swiftmailer.yaml, which is found in packages, dev, test but not prod. Is anything that's in packages considered to be a global config and anything in the inner directories overrides it?
Thanks and 73,
Hey Vlad,
Good question! And actually we're answering it in new Symfony 4 screencasts, for example, here: https://knpuniversity.com/s...
So, in shorts, you're correct, everything in config/packages/ level is considered as a global config which is loaded for any environment. But then you can overwrite some configuration using env-specific configs like config/packages/dev/, config/packages/prod/, config/packages/test/, etc.
Cheers!
Can version 3.4 be upgraded to version 4.4, following the steps shown in this course?
Hey Daniel,
This course only covers upgrading from version 3 to 4, if you're interested in upgrading to version 4 to 5, you can what this other tutorial https://symfonycasts.com/screencast/symfony5-upgrade
Although, it's quite easy to upgrade minor Symfony versions https://symfony.com/doc/current/setup/upgrade_minor.html
Cheers!
Hi! I didn't use annotations for my routes, I have a separate YML file for each of my bundles (from before, when code were supposed to be compartmentalized into bundles...). The video doesn't cover what to do about those, so I was wondering if I could have a quick hint? So I import my bundle-specific routes like this:
`extra_opening:
and the contents of that file would be
`extra_opening_extraopening:
extra_opening_price:
extra_opening_debitperiod:
And each of those would in turn contain the actual controller connections as such
`extraopening_index:
extraopening_new:
extraopening_edit:
Perhaps it'd be easier to move to annotation routing, but I'd like to get my app working at all before digging into that project of further refactoring things...
Hey @MattiasWelander!
I agree to get things working first! It doesn't matter much what you do with these routes. You could keep them all as is. Or, could move them all into config/routes (and some sub-directories) and then have them import each other like you do now. Basically, these files never really depended on the bundles: they were just files importing other files. We kept these in our app, then moved them to annotations over time.
For the actual routes themselves (which reference
AppBundle:, if you want to remove AppBundle, then refactor these to use the class name of the controller - I think it would be_controller: "App\Controller\ExtraOpening\ExtraOpening::edit".Let me know if that helps - or if I totally answered the wrong question :).
Cheers!
I'm giving it a try. Although, with your backslashie format like this:
`position_index:
I get this error:
<blockquote> The file "XXX" does not contain valid YAML: Found unknown escape character "\A" at line 5 (near "defaults: { _controller: "App\AppBundle\Controller\Poslog\Position::index" }")</blockquote>
Apparently, YAML doesn't like backslashes? =) It thinks I'm trying to escape a reserved character for some reason
OK found it, they are no longer supposed to be contained within quotations...
I have been blocked for a few days with this error that I can not get out. Some idea tranks
You have requested a non-existent parameter "kernel.default_locale".
Hey there,
I believe you forgot to wrap with
%the name of the paramter like this"%kernel.default_locale%"Cheers!
"Houston: no signs of life"
Start the conversation!