// 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
}
}
18 Comments
Your requirements could not be resolved to an installable set of packages.
Problem 1
- twig/extra-bundle v3.0.1 requires symfony/framework-bundle ^4.3|^5.0 -> no matching package found. I'm upgrading from 3.4 to flex 3.4 with skeleton
I'm resolved , simple. composer require twig-bundle
Hey Gianluca M.
I'm glad that you could fix your problem and thanks for sharing the solution
Cheers!
Hi! Trying to follow along =) "composer install asset" does NOT set assets enabled:true, for me it is still false in the "...debug:config framework". Suppose I can just set it manually, but that hints to me that perhaps I have a bigger problem, if other composer installs can't do what they are meant to either in my config. Could I have restricted composer from making changes somehow?
Hey Mattias,
Do you mean "composer require asset" instead of "composer install asset"? Because "install" command will fail as it does not exist.
I think you should check if you have Symfony plugin enabled, probably you forbid? In the composer.json you should have "symfony/flex": true, I think, otherwise Symfony Flex won't be able to make any changes in your project.
Also, it might be so that you have a few "assets:" keys in different config files, and so a one overwrites another.
Cheers!
Indeed I meant "composer require asset" (@6:45 in the video). I have the same problem when running the require with monolog, no files are generated in config/packages/dev and config/packages/prod
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true
}
},
Hmm.. removing monolog all together from the composer.json, running composer update, and then doing composer require monolog fixed the problem, then it actually created those files.
Hey Mattias,
Awesome, glad you were able to fix it! It sounds like you probably copy/pasted a symfony.lock file from our source project code? Symfony base on that file to make sure if it should execute any changes from recipe or no. Anyway, if something is not working right - the best option would be probably to remove it completely and try to install it again as you did with monolog, good job! This way it should work unless you deny the recipe execution.
Cheers!
Hello! Thank you for this great guide! I do have a problem with the framework.yaml configuration sadly though and I have not been able to figure out where the problem lies. All the configuration I put into framwork.yaml seems to be ignored. I cannot remove the framework block from the old app/config/config.yml file, because else all of the really necessary values are not set (f.e. secret, csfr_protection, session, .. ). Values that come from other configuration yaml files (from packages/*.yaml) are read as they should, it is really just framework.yaml that is broken. Have you had any similar experiences when upgrading to Symfony 4+ from 3.4? Thanks in advance!
Nevermind, I continued to open the page via app_dev.php instead of the new index.php. It is working now!
Hey Farfunni,
Glad you were able to figured out the problem yourself! Yeah, tricky problem to notice, well done! ;)
Cheers!
Hi, what's the right folder stracture for business related JSON and YAML files ? I used to store them in app/Resources/json and app/Resources/yaml until now.
Thanks!
What do you mean by business related files? What do you store on such files? You can store those files inside
configfolder or probably insidevardepends on your content but actually, you can use any folder you feel like it's better for your applicationCheers!
ok. couldn't find anything about that online. these are JSON files that are used as small database, extracted from other online tools. I parse them to get data in my app. I just need somewhere to store them. for now I decided to create a "resourses" folder at the root of the app.
Oh, I get it, then I would suggest you to put it inside
var/datafolder, it just fits better :)Nice thanks!
You need to keep the templating key if you use FOSUser Bundle.
Ah, you're right. And I think it's just for ONE spot in FOSUserBundle. Hopefully they can just remove that!
What's the right folder structure for overriding bundle templates now? I assume they're in templates? Is it templates/bundles/BundleName
Hey Matt,
Yes, you're right! It should be "templates/bundles/{BUNDLE_NAME}/{PATH/TO/TEMPLATE.html.twig}". Actually, check this docs: https://symfony.com/doc/cur...
Cheers!
"Houston: no signs of life"
Start the conversation!