Chapters
-
Course Code
Subscribe to download the code!Compatible PHP versions: >=5.3.3
Subscribe to download the code!Compatible PHP versions: >=5.3.3
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
Keep Going!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Keep Going!¶
You’re awesome. Seriously. This was probably the most important episode yet, and you made it. Congrats!
The first big piece included the two main Doctrine associations: ManyToOne and ManyToMany. We saw how each can have an optional inverse side, like the OneToMany side of ManyToOne.
The second huge piece was services: how they work and how to create our own. A service is nothing more than a class that does some work. By putting our logic into a service, it makes it reusable, organized, and easier to unit test. When we register a service with Symfony, we teach it how to create a new instance of our object so that we have the convenience of simply getting it out of the container.
We also saw a few “tags”, and how you can use them to tell Symfony that your service should be used in some special way.
So what’s next? There’s always more to learn with Symfony, but we’ve touched on almost all the most important things by now. In the next, and final screencast in this series, we’ll talk about assets, assetic, form customizations and finally deployment and some performance notes.
Seeya next time!
2 Comments
Duplicate of https://knpuniversity.com/s...
"Houston: no signs of life"
Start the conversation!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4", // v2.4.2
"doctrine/orm": "~2.2,>=2.2.3", // v2.4.2
"doctrine/doctrine-bundle": "~1.2", // v1.2.0
"twig/extensions": "~1.0", // v1.0.1
"symfony/assetic-bundle": "~2.3", // v2.3.0
"symfony/swiftmailer-bundle": "~2.3", // v2.3.5
"symfony/monolog-bundle": "~2.4", // v2.5.0
"sensio/distribution-bundle": "~2.3", // v2.3.4
"sensio/framework-extra-bundle": "~3.0", // v3.0.0
"sensio/generator-bundle": "~2.3", // v2.3.4
"incenteev/composer-parameter-handler": "~2.0", // v2.1.0
"doctrine/doctrine-fixtures-bundle": "~2.2.0", // v2.2.0
"ircmaxell/password-compat": "~1.0.3", // 1.0.3
"phpunit/phpunit": "~4.1", // 4.1.0
"stof/doctrine-extensions-bundle": "~1.1.0" // v1.1.0
}
}
hi,
Can i define associations across different entity managers ?
thanks