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!
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.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
}
}
8 Comments
Thank you for this awesome course!
I'm using the same dto<->entity mapping solution in my project with micromapper like in this course, but I have the following requirement.
I have two entities :
Event (id, name, description)
Schedule (id, eventId, dueDate)
An Event should not exist without a schedule, but an event can have n schedules.
So I need a patch/post ScheduleDto endpoint that can either create an embedded Event OR take an IRI of an existing event.
But how is this possible?
I got it working this way but not sure if there is a better one:
This way I can have two post endpoints, one where I can create an Occurrence+Event Embedded
and one where I can assign an event via iri. But I only managed to do it via groups.
I had finished the course and in my Symfony 7.0 project I ran
composer require apibut it gave a very strange error on completion.now whenever i do
php bin/console cache:cleari get the following errorHow do I fix it? It's just in the project at work and I need to solve it.
The whole project explodes with the error:
Hey Rodrypaladin,
Hm,
clear:cachemay not work somethings... could you tryrm -rf var/cache/?Stil the same error? Do you have
symfony/mercureorsymfony/mercure-bundlepackage installed in your project? If not, installing it with Composer should fix the error I think. But probably your current ApiPlatform configuration requires Mercure somehow, it might be so that you just need to turn this off in the configuration and it will not require you to install it anymore. IIRC it should be something like:In case you don't use/need it. Otherwise, installing the required dependency should fix the problem I believe.
Cheers!
That response was wonderful. Just with...
It solved the problem. Thank you very much!
Hey Rodrypaladin,
Awesome :) And thanks for confirming it helped!
Cheers!
I did this! Brilliant course.
Glad to hear!
"Houston: no signs of life"
Start the conversation!