Chapters
24 Chapters
|
1:14:57
|
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!
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!
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.
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"babdev/pagerfanta-bundle": "^4.5", // v4.5.0
"doctrine/dbal": "^4", // 4.2.3
"doctrine/doctrine-bundle": "^2.13", // 2.14.0
"doctrine/doctrine-migrations-bundle": "^3.3", // 3.4.1
"doctrine/orm": "^3.3", // 3.3.2
"knplabs/knp-time-bundle": "^2.2", // v2.4.0
"pagerfanta/doctrine-orm-adapter": "^4.7", // v4.7.1
"php-cs-fixer/shim": "^3.46", // v3.73.1
"phpdocumentor/reflection-docblock": "^5.3", // 5.6.1
"phpstan/phpdoc-parser": "^2.0", // 2.1.0
"stof/doctrine-extensions-bundle": "^1.12", // v1.13.0
"symfony/asset": "7.2.*", // v7.2.0
"symfony/asset-mapper": "7.2.*", // v7.2.3
"symfony/console": "7.2.*", // v7.2.1
"symfony/dotenv": "7.2.*", // v7.2.0
"symfony/flex": "^2", // v2.5.0
"symfony/framework-bundle": "7.2.*", // v7.2.4
"symfony/http-client": "7.2.*", // v7.2.4
"symfony/monolog-bundle": "^3.0", // v3.10.0
"symfony/property-access": "7.2.*", // v7.2.3
"symfony/property-info": "7.2.*", // v7.2.3
"symfony/runtime": "7.2.*", // v7.2.3
"symfony/serializer": "7.2.*", // v7.2.4
"symfony/stimulus-bundle": "^2.13", // v2.23.0
"symfony/twig-bundle": "7.2.*", // v7.2.0
"symfony/ux-turbo": "^2.13", // v2.23.0
"symfony/yaml": "7.2.*", // v7.2.3
"symfonycasts/tailwind-bundle": "^0.9.0", // v0.9.0
"twig/extra-bundle": "^2.12|^3.0", // v3.20.0
"twig/twig": "^2.12|^3.0" // v3.20.0
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^4.0", // 4.0.0
"symfony/debug-bundle": "7.2.*", // v7.2.0
"symfony/maker-bundle": "^1.52", // v1.62.1
"symfony/stopwatch": "7.2.*", // v7.2.4
"symfony/web-profiler-bundle": "7.2.*", // v7.2.4
"zenstruck/foundry": "^2.2" // v2.3.8
}
}
6 Comments
I had a problem with starship_droid table, after loading fixtures there is only one row - the last droid.
I add
_real()and it works correctlyI did some research, but I still don't know why you need to call
_real()on the$starshipobject. I loaded the course code into this specific chapter, and the fixtures loaded correctly. Besides that, I noticed we call_real()on theStarshipobjects but just because we need to remove them by calling$ship->removePart(). Anyway, you should be able to continue with the tutorial without any issuesCheers!
Hey @Dzmitry
That's a bit odd. The
_real()method gives you the entity object instead of a wrapper coming from Foundry. Are you callingpersist()on each droid object?You can click on expand to view the entire fixtures file in this code block. Perhaps you're missing something https://symfonycasts.com/screencast/doctrine-relations/setting-many-to-many#codeblock-943c689e3d
Cheers!
Thank you for your answer
Yep, I copied that code and tried it, result was the same
Interesting, I'll check this out, but it may take me some time. If you can continue with your solution, please do so while I investigate :)
Thank you :)
"Houston: no signs of life"
Start the conversation!