Chapters
21 Chapters
|
2:23:48
|
Login to bookmark this video
-
Course Code
Login or register to download the code!
Login or register to download the code!
-
This Video
Login or register to download the video!
Login or register to download the video!
-
Subtitles
Login or register to download the subtitles!
Login or register to download the subtitles!
-
Course Script
Login or register to download the script!
Login or register to download the script!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/asset": "6.0.*", // v6.0.3
"symfony/console": "6.0.*", // v6.0.3
"symfony/dotenv": "6.0.*", // v6.0.3
"symfony/flex": "^2", // v2.4.5
"symfony/framework-bundle": "6.0.*", // v6.0.4
"symfony/monolog-bundle": "^3.0", // v3.7.1
"symfony/runtime": "6.4.3", // v6.4.3
"symfony/twig-bundle": "6.0.*", // v6.0.3
"symfony/ux-turbo": "^2.0", // v2.0.1
"symfony/webpack-encore-bundle": "^1.13", // v1.13.2
"symfony/yaml": "6.0.*", // v6.0.3
"twig/extra-bundle": "^2.12|^3.0", // v3.3.8
"twig/twig": "^2.12|^3.0" // v3.3.8
},
"require-dev": {
"symfony/debug-bundle": "6.0.*", // v6.0.3
"symfony/stopwatch": "6.0.*", // v6.0.3
"symfony/web-profiler-bundle": "6.0.*" // v6.0.3
}
}
13 Comments
Where's the best place to browse flex packages now that the flex.symfony.com page is gone?
Hey Nick F.!
The best place, at this moment, is to browser the GitHub repositories themselves - https://github.com/symfony/... and https://github.com/symfony/....
However, I'm going to build something that will expose some of the information that was previously on flex.symfony.com onto the README of those repositories (and then redirect flex.symfony.com to that). What exactly do you want to use this information for? You mentioned "browse flex packages": were you using flex.symfony.com as way to see a total list of all packages available? Or just to see what flex aliases were available for the most important packages? Something else?
Cheers!
Hey again weaverryan!
flex.symfony.com is now down forever (it will remain that way so that it's super clear to people with outdated version of symfony/flex why things are broken for them), but we have created a quick little README showing the flex packages and aliases: https://github.com/symfony/...
Cheers!
Hi I recognise this is an old tutorial and a few things might be out of date (and maybe I'm just getting confused between packages, bundles, and recipes.). I'm looking at the list of flex packages and aliases at
https://github.com/symfony/recipes/blob/flex/main/RECIPES.md
I notice that symfony/twig-bundle doesn't have an alias "template"; should it?
Also the recipe version 6.4 points to a 404 page, https://github.com/symfony/recipes/blob/flex/main/symfony/twig-bundle/6.4
twig-pack isn't listed as an alias.
Hey Markchicobaby,
This is indeed a legacy course about Symfony 6 - look for Symfony 7 version of this course here: https://symfonycasts.com/screencast/symfony
About the alias - it's a bit more complex. The "template" alias brings you the whole pack called
symfony/twig-pack, see its manifest file to see the related aliases to it: https://github.com/symfony/recipes/blob/main/symfony/twig-pack/1.0/manifest.jsonWhy isn't this
symfony/twig-packlisted in https://github.com/symfony/recipes/blob/flex/main/RECIPES.md - that's the question! Probably it's just missed there, I see some other packs are listed there. So feel free to create a PR to add it there for consistency :)About that 404 link, where did you get it? I don't see this link on this page, but bet the correct link should be https://github.com/symfony/recipes/tree/main/symfony/twig-bundle/6.4 instead.
Cheers!
The chapter Symfony Flex: Aliases, Packs & Recipes is broken because things have gone serverless and so apparently flex.symfony.com and composer are gone. this tutorial is instructing using tools that don't exist anymore.
Or am I missing something?
Hey @SummitBid
Yes, you're right, unfortunately, the Symfony team decided to make that change after recording this tutorial, but we have a note about it in this chapter https://symfonycasts.com/screencast/symfony/flex#flex-aliases
Cheers!
Symfony 6 new project, just installed as of Aprli 15 '22
When I tried
I've got
<blockquote>Error: no "compose" mailcap rules found for type "cannot open `require' (No such file or directory)"
Error: no write permission for file "symfony/flex"
</blockquote>
After a lot of mixed signals in several websites I guessed it is because symfony/flex went serverless (whatever that means)
Finally what worked for me was:
Hey Memovil,
Yes, the command name should be "composer" not "compose", so the full command name should be "composer require symfony/flex". I suppose you just misprinted the command name, but in case you copy/pasted it from somewhere - let me know and I'll double check and fix it.
Cheers!
oh sorry I mixed up the copy/paste with a typo I made.
Somehow using
composer require templateswas giving me some weird error. (sorry lost that screen)I had to require symfony/twig-pack" instead of the "templates" alias.
After that it worked.
Still can't figure why. Tried to replicate in a new instance of symfony and worked like a charm.
Hey Memovil,
Well, "templates" is the official Flex alias for the symfony/twig-pack package, you can see it here: https://github.com/symfony/... . So, the only reason I may think of - most probably you don't have a Flex installed, make sure you have symfony/flex depepndency. Or... you may use an old version of Flex, please, upgrade it to the latest and try again.
Cheers!
Hello,
I've got the following message when I run composer update symfony/flex --no-plugins --no-scripts : Your requirements could not be resolved to an installable set of packages.
when trying composer update, I've got the following error : Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires composer-runtime-api 2.1, found composer-runtime-api[2.0.0] but it does not match the constraint.
Problem 2
- Root composer.json requires symfony/flex 2.1.7 -> satisfiable by symfony/flex[v2.1.7].
- symfony/flex v2.1.7 requires composer-plugin-api ^2.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 3
- symfony/framework-bundle[v6.0.0, ..., v6.0.7] require composer-runtime-api >=2.1 -> found composer-runtime-api[2.0.0] but it does not match the constraint.
- Root composer.json requires symfony/framework-bundle 6.0.* -> satisfiable by symfony/framework-bundle[v6.0.0, ..., v6.0.7].
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2. I am using php 8.
Should I update the version of composer ?
Well, that's what I did and it works now.
Hey Benoit,
OK, so Composer upgrade worked for you, great! Thanks for sharing the final solution with others.
Btw, we're not talking about upgrade in this tutorial, if you're interesting in Symfony 6 upgrade tutorial - take a look at: https://symfonycasts.com/sc... - we will start releasing it very soon.
Cheers!
"Houston: no signs of life"
Start the conversation!