From 9fa70a4e4319285a389664f7888dedab58b732ae Mon Sep 17 00:00:00 2001 From: Alexis Urien Date: Fri, 22 Aug 2025 14:08:56 -0700 Subject: [PATCH 1/2] Commands in tutorial should reflect the recommand install way As using docker install way is the "recommended" way, all commands specific to this tutorial should use the "docker way" --- symfony/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony/index.md b/symfony/index.md index 75b8096b4b3..61d44f73888 100644 --- a/symfony/index.md +++ b/symfony/index.md @@ -486,8 +486,8 @@ Now, delete the file `api/src/Entity/Greeting.php`. This demo entity isn't usefu Finally, generate a new database migration using [Doctrine Migrations](https://symfony.com/doc/current/doctrine.html#migrations-creating-the-database-tables-schema) and apply it: ```console -bin/console doctrine:migrations:diff -bin/console doctrine:migrations:migrate +docker compose exec php bin/console doctrine:migrations:diff +docker compose exec php bin/console doctrine:migrations:migrate ``` **We now have a working API with read and write capabilities!** From e713b4294d8b51bfb80838736ed7cea6cd7e657b Mon Sep 17 00:00:00 2001 From: Alexis Urien Date: Mon, 25 Aug 2025 13:19:23 -0700 Subject: [PATCH 2/2] change 2 more commands to use recommended install way (docker) --- symfony/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony/index.md b/symfony/index.md index 61d44f73888..f8601d8cc31 100644 --- a/symfony/index.md +++ b/symfony/index.md @@ -471,7 +471,7 @@ Modify these files as described in these patches: **Tip**: You can use Symfony [MakerBundle](https://symfonycasts.com/screencast/symfony-fundamentals/maker-command?cid=apip) to generate a Doctrine entity that is also a resource thanks to the `--api-resource` option: ```console -bin/console make:entity --api-resource +docker compose exec php bin/console make:entity --api-resource ``` Doctrine's [attributes](https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/attributes-reference.html) map these entities to tables in the database. @@ -681,7 +681,7 @@ Isn't API Platform a REST **and** GraphQL framework? That's true! GraphQL suppor need to install the [graphql-php](https://webonyx.github.io/graphql-php/) library. Run the following command: ```console -composer require api-platform/graphql +docker compose exec php composer require api-platform/graphql ``` You now have a GraphQL API! Open `https://localhost/graphql` (or `https://localhost/api/graphql` if you used Symfony Flex