Skip to content

Commit 3489d5b

Browse files
authored
Commands in tutorial should reflect the recommand install way (#2190)
1 parent 379a4d5 commit 3489d5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

symfony/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Modify these files as described in these patches:
471471
**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:
472472

473473
```console
474-
bin/console make:entity --api-resource
474+
docker compose exec php bin/console make:entity --api-resource
475475
```
476476

477477
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.
@@ -486,8 +486,8 @@ Now, delete the file `api/src/Entity/Greeting.php`. This demo entity isn't usefu
486486
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:
487487

488488
```console
489-
bin/console doctrine:migrations:diff
490-
bin/console doctrine:migrations:migrate
489+
docker compose exec php bin/console doctrine:migrations:diff
490+
docker compose exec php bin/console doctrine:migrations:migrate
491491
```
492492

493493
**We now have a working API with read and write capabilities!**
@@ -681,7 +681,7 @@ Isn't API Platform a REST **and** GraphQL framework? That's true! GraphQL suppor
681681
need to install the [graphql-php](https://webonyx.github.io/graphql-php/) library. Run the following command:
682682

683683
```console
684-
composer require api-platform/graphql
684+
docker compose exec php composer require api-platform/graphql
685685
```
686686

687687
You now have a GraphQL API! Open `https://localhost/graphql` (or `https://localhost/api/graphql` if you used Symfony Flex

0 commit comments

Comments
 (0)