Skip to content

[Documentation:Developer] Update php route info#766

Open
roye2 wants to merge 4 commits into
mainfrom
update-php-route-info
Open

[Documentation:Developer] Update php route info#766
roye2 wants to merge 4 commits into
mainfrom
update-php-route-info

Conversation

@roye2

@roye2 roye2 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

The documentation concerning Routes was outdated. The old syntax of @Route(...) is deprecated and in fact will no longer work with the recent update to the Route object we include from Symfony in PR #12935.

New Additions

Instances of @Route(...) have been replaced with #[Route(...)] to match what will be expected from developers when writing PHP code.

Screenshots

Before

  1. Controller page:
image
  1. Excerpt from Router page:
image
  1. Excerpt from Routes and Responses page:
image

After

  1. Updated Controller page:
image
  1. Updated Router page:
image
  1. Updated Routes and Responses page:
image

Other information

Unfortunately, the markdown renderer thinks the #[Route(...)] syntax is a comment due to the leading #. If at some point GitHub pages updates their markdown renderer to allow for PHP 8 syntax highlighting then the Routes will appear correctly as uncommented.
Example of how it is now:
image
Here is how it actually looks in the code:
image

Notice how the routes are not italicized.

This is not really a big deal but it kind of annoys me that the routes look like they are comments. However, I think that is better than rendering these code blocks as plain text or a different language than php (both of which would make the route appear 'correctly').

Also, the example given of UserController on the Controller / View pages is code that no longer exists in the submitty codebase. It is still a good example of how to write our php code but at some point we should probably update the example to use real code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Seeking Reviewer

Development

Successfully merging this pull request may close these issues.

1 participant