Repository navigation
#173 - Generate the URLs of the page displayed after the login and of the logo - #176
Merged
Merged
Conversation
… the logo - LoginController: the target path is the URL of the dashboard route (was /process: wrong with a route prefix or a sub-directory). - ProcessDashboardController: the logo URL is built by the Asset component (Packages: base path, assets base URLs, version strategy; absolute URLs kept as is), and escaped (was "/" + logo_path). - Require symfony/asset, now used directly (already installed by EasyAdmin). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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 #173.
LoginController: the target path of the login form (page displayed after the login) is generated from the dashboard route. It was/process: wrong when the routes are imported with aprefix:or the application is served from a sub-directory.ProcessDashboardController: the logo URL (design.logo_path) is built by the Asset component (Symfony\Component\Asset\Packages, autowired): base path of the application,framework.assets.base_urls(CDN), version strategy; absolute URLs are kept as is. It is now escaped. It was'/'.$logoPath.symfony/asset, now used directly (already installed by EasyAdmin).Checked in process-bundle-demo (patch applied to the vendor), with the bundle routes imported with
prefix: /admin:main:_target_path=/process, the login redirects to/process→ 404;_target_path=/admin/process, the login redirects to the dashboard (200);main.Tests: functional test from a sub-directory (
/app/process/login→_target_path=/app/process), unit tests of the logo URL (sub-directory, absolute URL, CDN base URL, escaping). With coverage (pcov): no risky test, no new uncovered line.Requirements
Breaking changes
None: same URLs without route prefix, sub-directory nor assets base URL. New
ProcessDashboardControllerconstructor argument (autowired, before the optional$logoPath): only a subclass calling the parent constructor would be affected.🤖 Generated with Claude Code