Chapters
36 Chapters
|
3:44:20
|
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!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "3.1.x-dev", // 3.1.x-dev
"doctrine/annotations": "^2.0", // 2.0.1
"doctrine/doctrine-bundle": "^2.8", // 2.10.2
"doctrine/doctrine-migrations-bundle": "^3.2", // 3.2.4
"doctrine/orm": "^2.14", // 2.16.1
"nelmio/cors-bundle": "^2.2", // 2.3.1
"nesbot/carbon": "^2.64", // 2.69.0
"phpdocumentor/reflection-docblock": "^5.3", // 5.3.0
"phpstan/phpdoc-parser": "^1.15", // 1.23.1
"symfony/asset": "6.3.*", // v6.3.0
"symfony/console": "6.3.*", // v6.3.2
"symfony/dotenv": "6.3.*", // v6.3.0
"symfony/expression-language": "6.3.*", // v6.3.0
"symfony/flex": "^2", // v2.3.3
"symfony/framework-bundle": "6.3.*", // v6.3.2
"symfony/property-access": "6.3.*", // v6.3.2
"symfony/property-info": "6.3.*", // v6.3.0
"symfony/runtime": "6.3.*", // v6.3.2
"symfony/security-bundle": "6.3.*", // v6.3.3
"symfony/serializer": "6.3.*", // v6.3.3
"symfony/stimulus-bundle": "^2.9", // v2.10.0
"symfony/string": "6.3.*", // v6.3.2
"symfony/twig-bundle": "6.3.*", // v6.3.0
"symfony/ux-react": "^2.6", // v2.10.0
"symfony/ux-vue": "^2.7", // v2.10.0
"symfony/validator": "6.3.*", // v6.3.2
"symfony/webpack-encore-bundle": "^2.0", // v2.0.1
"symfony/yaml": "6.3.*", // v6.3.3
"symfonycasts/micro-mapper": "^0.1.0" // v0.1.1
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.4
"mtdowling/jmespath.php": "^2.6", // 2.6.1
"phpunit/phpunit": "^9.5", // 9.6.11
"symfony/browser-kit": "6.3.*", // v6.3.2
"symfony/css-selector": "6.3.*", // v6.3.2
"symfony/debug-bundle": "6.3.*", // v6.3.2
"symfony/maker-bundle": "^1.48", // v1.50.0
"symfony/monolog-bundle": "^3.0", // v3.8.0
"symfony/phpunit-bridge": "^6.2", // v6.3.2
"symfony/stopwatch": "6.3.*", // v6.3.0
"symfony/web-profiler-bundle": "6.3.*", // v6.3.2
"zenstruck/browser": "^1.2", // v1.4.0
"zenstruck/foundry": "^1.26" // v1.35.0
}
}
6 Comments
I've upgraded the tutorial project to Symfony 6.4 and api-platform 3.2 including all recipes...
And I was fighting hard to get the same result as the tutorial.
Apparently.
If you have a property
isOwnedBy, and you make a 'isser'isOwnerBy(), that doesn't work! Or doesn't work anymore. I don't know.So, make an ugly
GetIsOwnedBy()and everything suddenly matches.What I did, was to rename the property to
ownedBy(so drop theisfrom the property name), and the the isser / setter can be exactly the same as the tutorial.NOW, my getter is called and NOW it ends up in the output. Before that, my state provider was called and setting the property just fine, and from the API docs there should be a field 'isMine', but it was just not appearing in the API output... and also the reason why my results from running the tests were completely different to the tutorial.
This cost me an evening :(.
Hey @Joris-Mak!
Sorry about the trouble and my slow response :). It tried to reproduce this locally but no luck yet. I used the
finishtutorial code, updated all Symfony packages to 6.4, and upgraded API Platform to the latest 3.3.0. I'm focusing on thetestOwnerCanSeeIsPublishedAndIsMineFieldstest method and this is still passing. Perhaps it was a temporary bug that got fixed, or I'm overlooking some detail needed to reproduce. If you or anyone else still sees the issue let me know!Cheers!
You just work on learning typing again and being awesome with your family 💪.
In my explanation, I have a typo where I mix up 'owned' and 'owner'. Let's just assume I made the same mistake while coding, or it indeed was a bug somewhere. Although if I understand the system correctly, that would be a bug in Symfony PropertyAccess and AFAIK that has been pretty stable for quite a while :).
Hey Joris,
Thank you for sharing this with others! Good research on it, I think we need to add a note about it. Not sure what was changed exactly, but that all makes sense to me.
Cheers!
its amazing . . . .
Hey Hooman,
Thanks for your feedback, we're happy to know you liked this video! :)
Cheers!
"Houston: no signs of life"
Start the conversation!