Chapters
18 Chapters
|
1:54:58
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
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!
02.
Single-Responsibility Principle: What is it?
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.2",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11", // 1.11.99.1
"doctrine/annotations": "^1.0", // 1.12.1
"doctrine/doctrine-bundle": "^2", // 2.3.1
"doctrine/doctrine-migrations-bundle": "^3", // 3.1.1
"doctrine/orm": "^2", // 2.8.4
"knplabs/knp-time-bundle": "^1.15", // v1.16.0
"phpdocumentor/reflection-docblock": "^5.2", // 5.2.2
"sensio/framework-extra-bundle": "^6.0", // v6.1.2
"symfony/console": "5.2.*", // v5.2.6
"symfony/dotenv": "5.2.*", // v5.2.4
"symfony/flex": "^1.9", // v1.21.6
"symfony/form": "5.2.*", // v5.2.6
"symfony/framework-bundle": "5.2.*", // v5.2.6
"symfony/http-client": "5.2.*", // v5.2.6
"symfony/mailer": "5.2.*", // v5.2.6
"symfony/property-access": "5.2.*", // v5.2.4
"symfony/property-info": "5.2.*", // v5.2.4
"symfony/security-bundle": "5.2.*", // v5.2.6
"symfony/serializer": "5.2.*", // v5.2.4
"symfony/twig-bundle": "5.2.*", // v5.2.4
"symfony/validator": "5.2.*", // v5.2.6
"symfony/webpack-encore-bundle": "^1.6", // v1.11.1
"symfony/yaml": "5.2.*", // v5.2.5
"twig/cssinliner-extra": "^3.3", // v3.3.0
"twig/extra-bundle": "^2.12|^3.0", // v3.3.0
"twig/twig": "^2.12|^3.0" // v3.3.0
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.2", // 3.4.0
"fakerphp/faker": "^1.13", // v1.14.1
"symfony/debug-bundle": "^5.2", // v5.2.4
"symfony/maker-bundle": "^1.13", // v1.30.2
"symfony/monolog-bundle": "^3.0", // v3.7.0
"symfony/stopwatch": "^5.2", // v5.2.4
"symfony/var-dumper": "^5.2", // v5.2.6
"symfony/web-profiler-bundle": "^5.2" // v5.2.6
}
}
12 Comments
Hi,
I'm facing the error:
This error even raises when I don't make any described changes to the code.
I just downloaded the code for this project, did the installation steps (start/README.md), started the webserver (I can see all BigFoot sighting records in the web front-end), clicked on "Sign up", filled the input form and clicked on "Sign up!".
Hi,
I searched a while through older versions of the doctrine-dbal-repo and tried downgrades of the doctrine-bundle, but I did not find the needed exact change in the vendor/doctrine/dbal/src/Types/Types.php, where the const json-array was removed.
In the end, it was the fastest solution for me, to update the symfony-framework to at least 5.3, where in the vendor/symfony/doctrine-bridge/PropertyInfo/DoctrineExtractor.php, the Types-constant was replaced by a fixed string "json_array"
Kind regards!
Hey Raphael,
Thanks for sharing your solution with others!
Cheers!
Hey @schenck-de
That's a bit unexpected. I just installed a fresh copy of the project and, as lame as it may sound, it works on my computer. I believe you got a more recent version of Doctrine that dropped support of that constant. What you can do is check the entities (
src/entities) and see if any of them is using the constant (onlyUserandBigFootSightinghave an array property)Cheers!
Hi there,
Is a good practice to reproduce the enterprise hierarchical scheme at the code?
For instance, if my company has a Sales department, should I create a dir inside my project called "sales" for keeping my code related to sales?
I think it's a good idea since if somebody from Sales department would like to make a change inside my code, I would know where to go.
What are your thoughts about this approach?
Regards.
Hey Abelardo L.
This is a real good question. Code organization is all about giving clarity to you and your team of how things are related to each other, or to easily find a piece of code/class/package you need to work with. In the case of Symfony, I like how things are organized, for example, I know that inside the
Entity/folder I'll find all the entities in my system. Perhaps in a big project it may make sense to add inner folders so you can organize a bit better what entities belongs to a specific module (sales). It's also important to consider if your project it's private or public, if it's public you should expect people adding code to it, so you may want to organize things in a different way but the end goal is the same - give clarity to other of how things relates to each otherIf you want to know more about code organization I recommend this article https://medium.com/@egonelbre/thoughts-on-code-organization-c668e7cc4b96
Cheers!
Hi MolloKhan :
Thanks for your complete and useful reply.
Regards.
It's very weird the enterprise hierarchical varies; so, this guarantees that the structure of my code barely changes too.
Omg ... 😂
Are you laughing at our product manager?? :D
I'm laughing 'cause finally this series is going to be released😂😂
Yea... this took us WAY too long - I even talk about that in the first chapter! https://symfonycasts.com/sc...
"Houston: no signs of life"
Start the conversation!