Chapters
23 Chapters
|
2:22:24
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!Compatible PHP versions: ^7.4.1
Subscribe to download the code!Compatible PHP versions: ^7.4.1
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
11.
"5 Minutes Ago" Strings
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.4.1",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11", // 1.11.99
"doctrine/doctrine-bundle": "^2.1", // 2.1.1
"doctrine/doctrine-migrations-bundle": "^3.0", // 3.0.2
"doctrine/orm": "^2.7", // 2.8.2
"knplabs/knp-markdown-bundle": "^1.8", // 1.9.0
"knplabs/knp-time-bundle": "^1.11", // v1.16.0
"sensio/framework-extra-bundle": "^6.0", // v6.2.1
"sentry/sentry-symfony": "^4.0", // 4.0.3
"stof/doctrine-extensions-bundle": "^1.4", // v1.5.0
"symfony/asset": "5.1.*", // v5.1.2
"symfony/console": "5.1.*", // v5.1.2
"symfony/dotenv": "5.1.*", // v5.1.2
"symfony/flex": "^1.3.1", // v1.21.6
"symfony/framework-bundle": "5.1.*", // v5.1.2
"symfony/monolog-bundle": "^3.0", // v3.5.0
"symfony/stopwatch": "5.1.*", // v5.1.2
"symfony/twig-bundle": "5.1.*", // v5.1.2
"symfony/webpack-encore-bundle": "^1.7", // v1.8.0
"symfony/yaml": "5.1.*", // v5.1.2
"twig/extra-bundle": "^2.12|^3.0", // v3.0.4
"twig/twig": "^2.12|^3.0" // v3.0.4
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3", // 3.4.0
"symfony/debug-bundle": "5.1.*", // v5.1.2
"symfony/maker-bundle": "^1.15", // v1.23.0
"symfony/var-dumper": "5.1.*", // v5.1.2
"symfony/web-profiler-bundle": "5.1.*", // v5.1.2
"zenstruck/foundry": "^1.1" // v1.5.0
}
}
7 Comments
After installing new bundle Knp Time (same version like in video), following error has occur:
Attempted to load class "Locale" from the global namespace.<br />Did you forget a "use" statement?I tried
use Knp\Bundle\TimeBundle\Templating\Helper\TimeHelper;but it doesn't help.What could throw this error?
Hey Szymon,
Did you download the course code and started from start/ folder? Did you follow all the instructions from the README.md file there?
Cheers!
Hi, I get this error when running
composer require knplabs/knp-time-bundlehttps://i.imgur.com/PW9cVEi.png
Hey Ccc123,
Looks like you're using a newer version of dependencies in your project. Did you download the course code and started from the start/ directory? Or you started with a fresh new Symfony application? If you started with our course code, try to install the same version of the bundle like we use in our videos, for this run:
composer require "knplabs/knp-time-bundle:v1.16.0"
Let me know if it does not help. Otherwise, I would like to know more about your Symfony version so I could help further.
Cheers!
Hi Victor,
Yeah I downloaded the course code before I started. I just tried installing the version that was in the final/ directory's composer.json and it worked! Thank you.
Hi.
How to add auto fill in twig templates?
Thank you.
Hey Ruslan,
What do you mean about "auto fill"? Something like PhpStorm live templates? If so - here's related screencast about it: https://symfonycasts.com/sc... . Otherwise, you're most probably talking about Symfony Plugin that auto completes a lot of useful things in PhpStorm. You can find more info on how to install and enable this plugin here: https://symfonycasts.com/sc...
I hope this helps!
Cheers!
"Houston: no signs of life"
Start the conversation!