Skip to content

docs(php-beginner): show the real router:list output in module 3 - #51

Open
miaulalala wants to merge 1 commit into
mainfrom
fix/router-list-expected-output
Open

docs(php-beginner): show the real router:list output in module 3#51
miaulalala wants to merge 1 commit into
mainfrom
fix/router-list-expected-output

Conversation

@miaulalala

Copy link
Copy Markdown
Collaborator

Follow-up to #48 (thanks @yard-mschwartz).

#48 fixed the command itself — there is no occ routes, it's router:list (core/Command/Router/ListRoutes.php:34). But the expected-output block underneath it was still wrong, so a reader who applies #48 hits a second mismatch immediately: router:list renders through writeTableInOutputFormat, i.e. a bordered Symfony table with route / request / path headers, not the borderless columns the module showed.

Also replaces | grep pinboard with the app-ID argument router:list accepts. Two reasons:

  • grep strips the table headers, and
  • with the full route list the column widths depend on every other enabled app, so the output can never be quoted reliably. With the app argument the table is stable and quotable.

Added a one-line note that routes sort alphabetically, since get_pins appearing before index otherwise looks like something is wrong.

⚠️ Needs a check against a real instance

The table in this PR is derived from the Symfony Table default style and the sort in ListRoutes::execute(), not copied from an actual run — I had no instance to run it against. The content is right; the exact border widths should be confirmed by pasting a real ./scripts/occ.sh nextcloud -- router:list pinboard before merging, otherwise we risk replacing one invented output block with another.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Follow-up to #48. The command was fixed there, but the expected-output
block underneath still showed borderless columns, so readers hit a second
mismatch right after the first one was resolved: router:list renders a
bordered Symfony table with route/request/path headers.

Also drop the '| grep pinboard' in favour of the app-ID argument that
router:list accepts. Filtering the full route list strips the headers and
makes the column widths depend on every other app's routes, so the output
could never be quoted reliably.

Signed-off-by: Anna Larch <anna@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant