docs(symfony): document the API Platform CLI installer#2256
Merged
Conversation
| API Platform is shipped with a [Docker](https://docker.com) definition that makes it easy to get a containerized development | ||
| environment up and running. If you do not already have Docker on your computer, it's the right time to [install it](https://docs.docker.com/get-docker/). | ||
| # Or download the binary directly (macOS / Linux) | ||
| curl -sL "https://github.com/api-platform/api-platform/releases/latest/download/api-platform_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').tar.gz" | tar xz -C /usr/local/bin |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Rework the Symfony getting-started and Caddy guides around the new `api-platform` CLI (api-platform/installer) instead of the legacy distribution. - symfony/index.md: install the CLI as a static binary or via `composer global require api-platform/installer`; scaffold with `api-platform <name> --framework=symfony` (there is no `new` subcommand). Document the standalone Next.js PWA model (runs on :3000, talks to the API cross-origin via CORS) instead of a containerized single-domain PWA. Mention `--with-agents` (generates AGENTS.md / CLAUDE.md). - symfony/caddy.md: describe the Caddyfile actually shipped by symfony-docker (FrankenPHP worker, @phproute) and the Hydra+Mercure Link header injected through CADDY_SERVER_EXTRA_DIRECTIVES. Move the single-domain API+PWA proxy (route{}, @pwa, PWA_UPSTREAM) into an opt-in section. - core/getting-started.md, laravel/index.md: use `api-platform <name>` (drop the non-existent `new` subcommand).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Targets the 4.3 branch. Builds on the CLI-installer docs already on 4.3, adding the pieces that were missing or inaccurate.
Linked to api-platform/api-platform#2980
What changed
symfony/caddy.md(main change)The page documented a single-domain Caddy → PWA proxy (
route {},@pwa,PWA_UPSTREAM) as the default, but the CLI does not configure that — it shipssymfony-docker's Caddyfile and runs the Next.js PWA standalone (pnpm devon:3000, cross-origin via CORS). Rewritten so it:api/frankenphp/Caddyfile: FrankenPHP worker,@phpRoute, Mercure + Vulcain);Linkheader as injected by the CLI throughCADDY_SERVER_EXTRA_DIRECTIVESincompose.yaml;route {}ordering →@pwamatcher), kept for users who want it on top of a scaffolded project.symfony/index.mdAGENTS.mdandCLAUDE.mdby default (--no-with-agentsto skip) — see feat(installer): scaffold AGENTS.md and CLAUDE.md into new projects api-platform#2993;core/getting-started.mdapi-platform my-project --framework=symfony.laravel/index.mdapi-platform my-project --framework=laravel.