Chapters
18 Chapters
|
1:50:35
|
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!
This tutorial also works great for Symfony 6!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": "^7.3.0 || ^8.0.0",
"ext-ctype": "*",
"ext-iconv": "*",
"easycorp/easy-log-handler": "^1.0.7", // v1.0.9
"sensio/framework-extra-bundle": "^6.0", // v6.2.1
"symfony/asset": "5.0.*", // v5.0.11
"symfony/console": "5.0.*", // v5.0.11
"symfony/debug-bundle": "5.0.*", // v5.0.11
"symfony/dotenv": "5.0.*", // v5.0.11
"symfony/flex": "^1.3.1", // v1.21.6
"symfony/framework-bundle": "5.0.*", // v5.0.11
"symfony/monolog-bundle": "^3.0", // v3.5.0
"symfony/profiler-pack": "*", // v1.0.5
"symfony/routing": "5.1.*", // v5.1.11
"symfony/twig-pack": "^1.0", // v1.0.1
"symfony/var-dumper": "5.0.*", // v5.0.11
"symfony/webpack-encore-bundle": "^1.7", // v1.8.0
"symfony/yaml": "5.0.*" // v5.0.11
},
"require-dev": {
"symfony/profiler-pack": "^1.0" // v1.0.5
}
}
14 Comments
php bin/console security:check
The web service failed for an unknown reason (HTTP 403).
T_T how to fix it?
Hi Rizky, the sensiolabs/security plugin has been deprecated, you
have to use the php-local-security-checker package,whcih serves the same
purpose. https://github.com/fabpot/l...
Hey Rizky,
It's recommended to use "symfony security:check" command instead. Otherwise, try to upgrade the "sensiolabs/security-checker" package with Composer to the latest, but if you're on a not maintained Symfony version - you would need to upgrade Symfony packages in your project first. So I'd recommend you to go with "symfony security:check".
Cheers!
Hey Victor!
Is it possible to run symfony security: check after executing compsoer install as described in the instructions where the author worked with security: check
Hey Azar,
Good question! Actually, it is possible, for example with this syntax:
I.e. you should use "script" instead of "symfony-cmd". But it will also mean that you always have installed symfony CLI on the machine where you run any Composer operations in your project, otherwise it will fail.
Another solution - just add an extra step to your CI to run that "symfony security:check" as a separate step instead of doing this during Composer operations like install or update :)
Cheers!
Could you tell in more detail how exactly to do this through CI, or where to read :)
Hey Azar,
Well, you just need to download that "symfony" CLI on your CI and add a new step to your tests steps that will execute "symfony security:check" - pretty simple if you have a CI :) If you don't, take a look at: https://symfonycasts.com/sc... about a possible example how to configure a CI first. Or read the docs about GitHub Actions.
I hope this helps!
Cheers!
Hi,
Is it possible to encode a symfony project with ionCube without breaking it?
Hey Niki,
I know very little about ionCube, but yes, I suppose it should be possible as long as you warm up the cache before encoding. Basically, Symfony app should generate all the necessary cache and compile all necessary files during the cache:warmup command. After this, you can run Symfony app on read-only filesystem and it should just work. Of course, it also depend on you and your code. I suppose you should avoid writing to the filesystem in your code, only read operations, or probably use a different cache providers like Memcache or Redis, etc.
I hope this helps, unfortunately, I can't say more about it.
Cheers!
Hi Ryan, totaly unrelated question ... but how do you do to display a dotted line after each instruction in your command line interface ?
This is super useful !
Finally got something working :)
<br /># ~/.zshrc<br /># <<< dotted line between command >>><br />setopt promptsubst<br />PS1=$'%F{250}${(r:$COLUMNS::╌:)}%f'$PS1<br />Hey Mickael!
Glad you was able to figure it out yourself! Ryan *just* started using this new terminal theme - he's using zsh with ohmyzsh. Inside ohmyzsh, he's using the "af-magic" theme with some customizations. Here's my custom theme file - https://gist.github.com/wea... - it's the "af-magic" theme but (mostly) with a few features *removed* to keep his screen simpler.
I hope that helps :)
Cheers!
In Chapter 01 the Symfony executable is downloaded. Is there a reason why in this chapter
php bin/consoleis used instead ofsymfony consoleother than that it might be shorter to type?Hey Jason A.!
Excellent question! It is mostly to introduce concepts little-by-little. By showing
php bin/console, it's easy to show that you're just executing a normal, boring, physical file. Butsymfony consolelooks a bit more "magical", even though it's technically a lot more useful (because you can manage PHP versions through it, run commands un "tunneled" SymfonyCloud environments etc). I'm planning to introduce doing more things with thesymfonycommand little-by-little - it'll especially be important when we talk about databases.Cheers!
"Houston: no signs of life"
Start the conversation!