Repository navigation
#172 - Prefix all the route names of the bundle with cleverage_ui_process_ - #177
Merged
Merged
Conversation
- Rename the explicit routes: cleverage_ui_process_login, _logout, _list, _launch and _http_execute, used by the bundle (security configuration, HTTP authenticator, controllers, menu, templates). - The former names are deprecated route aliases since 3.3 (config/routes/deprecated_aliases.yaml, loaded by the documented config/routes/*.yaml import), removed in 4.0: generating a URL with them and ?routeName=<former name> URLs keep working. - The dashboard route (process) and the EasyAdmin routes generated from it are unchanged: no alias possible for the generated routes, renamed in 4.0. - Docs: route names, former names, the easyadmin.routes loader generates the routes of every dashboard (a prefix on the import also applies to the application dashboards); UPGRADE.md. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Dashboard route: cleverage_ui_process (was process), so that the routes generated by EasyAdmin for the CRUD pages are cleverage_ui_process_<crud>_<action> (were process_<crud>_<action>). - Their former names are deprecated aliases (3.3, removed in 4.0), added by the new internal DeprecatedEasyAdminRouteAliasLoader (routing loader imported by config/routes/deprecated_aliases.yaml): it imports the easyadmin.routes routes to know the names of the routes of the dashboard of the bundle (routes of the other dashboards are ignored), and returns the aliases only. - The functional tests declare the loader (executed when the routes are loaded by the first test). - Docs and UPGRADE.md: dashboard and generated routes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Description
Fixes #172. Prefix:
cleverage_ui_process_, as the service ids of the bundle. All the routes of the bundle are renamed, including the dashboard and the routes generated by EasyAdmin, with deprecated aliases for the former names (no BC break in 3.x).processcleverage_ui_process(dashboard)process_<crud>_<action>cleverage_ui_process_<crud>_<action>process_logincleverage_ui_process_loginprocess_logoutcleverage_ui_process_logoutprocess_listcleverage_ui_process_listprocess_launchcleverage_ui_process_launchhttp_process_executecleverage_ui_process_http_executecleverage_ui_process(the prefix without the trailing_), so that EasyAdmin generatescleverage_ui_process_<crud>_<action>(e.g.cleverage_ui_process_process_execution_index) for the CRUD pages.securityextension,HttpProcessExecutionAuthenticator::supports(), controllers, menu, templates.config/routes/deprecated_aliases.yaml(loaded by the documented@CleverAgeUiProcessBundle/config/routes/*.yamlimport; YAML because thealiasoption of#[Route]requires Symfony 7.3). The aliases of the routes generated by EasyAdmin are added by the new internalDeprecatedEasyAdminRouteAliasLoader(routing loader imported by this file): it importseasyadmin.routesonly to know the names of the routes of the dashboard of the bundle (dashboardControllerFqcndefault; the routes of the application dashboards are ignored) and returns the aliases only. Generating a URL with a former name, and opening a?routeName=<former name>URL, keep working.easyadmin.routesloader generates the routes of every dashboard, so aprefixon the import of the bundle routes also applies to the application dashboards.Checked in process-bundle-demo (patch applied to the vendor, the demo does not reference these route names):
debug:router: 43cleverage_ui_process*routes, noprocess*route left;process_process_execution_indexis an alias ofcleverage_ui_process_process_execution_index;?routeName=cleverage_ui_process_listand?routeName=process_list(200), list and launch links with the new names, logout → login;prefix: /adminon the import: routes and dashboard prefixed together.Tests:
RouteNamesTest(dashboard, generated routes, explicit routes: new names generate and match, former names generate the same paths with the deprecation),DeprecatedEasyAdminRouteAliasLoaderTest(only the routes of the dashboard of the bundle get an alias), deprecated?routeName=process_listURL; existing tests updated. With coverage (pcov): no risky test, no new uncovered line.Requirements
Breaking changes
None: the former route names keep working, with a deprecation (3.3, removal in 4.0). Code comparing the
_routerequest attribute with a former name (matching returns the new name) would be affected.🤖 Generated with Claude Code