Repository navigation
Add configurable QR code route priority without changing defaults - #96
Merged
Merged
Conversation
Preserve existing route precedence by default while allowing applications to place the QR code route ahead of catch-all routes. Keep explicit routes and two-argument loader construction unchanged. Fixes #95 Amp-Thread-ID: https://ampcode.com/threads/T-01a135b3-5c83-75eb-aef1-0c8b4f44f342 Co-authored-by: Jeroen van den Enden <jeroenvandenenden@gmail.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.
Summary
Fixes #95 by adding an optional integer
route_priority, defaulting to0. Applications whose catch-all route intercepts QR URLs can set it to1(or above their catch-all priority).The default keeps existing precedence unchanged. The loader constructor remains compatible with two arguments, and explicitly defined
qr_code_generateroutes remain untouched. No YAML route resource, dependency, or routing redesign is introduced.Verification
qr_code_generate.vendor/bin/unit-test: 6 tests, 12 assertions with highest and lowest dependencies.vendor/bin/functional-testandvendor/bin/functional-test 6.4: each 4 tests, 14 assertions, including real QR responses despite an earlier catch-all in the test application.vendor/bin/code-quality: formatter, linter, and static analysis pass.The lowest-dependency unit run reports two PHP 8.4 implicit-nullability deprecations from Symfony Config 6.4.0; all assertions pass. No dependency deprecations were suppressed or changed.