Skip to content

Custom functions in route condition cause error in WebProfiler #36985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JakeFr opened this issue May 27, 2020 · 0 comments
Closed

Custom functions in route condition cause error in WebProfiler #36985

JakeFr opened this issue May 27, 2020 · 0 comments

Comments

@JakeFr
Copy link
Contributor

JakeFr commented May 27, 2020

Symfony version(s) affected: 5.0.8

Description
Adding custom function (via tag routing.expression_language_provider) causes fatal error in the routing tab of the profiler: the function does not exist.
If the route does not match, no errors

How to reproduce
https://github.com/JakeFr/function-in-routing
query GET:/api?foo[bar]=baz
and go to the routing tab in profiler

Possible Solution
Related to the AddExpressionLanguageProvidersPass, UrlMatcher and TraceableUrlMatcher but i cant find how to fix

@JakeFr JakeFr added the Bug label May 27, 2020
fabpot added a commit that referenced this issue Jul 31, 2020
… profiler routing tab (JakeFr)

This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Fix error with custom function and web profiler routing tab

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36985
| License       | MIT
| Doc PR        | no

Here is a simple solution for #36985 as it only concerns WebProfilerBundle.

Due to the limitation in the routing tab as explained in the footnote, the route in my repo did not match in profiler (no query string in the new context) but there is no more syntax error.

Commits
-------

b35c81b fix error with custom function and web profiler routing tab
@fabpot fabpot closed this as completed Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants