UrlGeneratorPass incompatible with class parameters
cblegare opened this issue · comments
Given a custom url generator defined as a service :
parameters:
my.url_generator.class:
Acme\Foo\MyUrlGenerator
services:
my.url_generator:
class: %my.url_generator.class%
tags:
-
name: hateoas.url_generator
alias: my_url_generator
When I compile the container
Then the UrlGeneratorPass fails because it tries to construct a ReflectionClass from the string %my.url_generator.class%
.
Over there : https://github.com/willdurand/BazingaHateoasBundle/blob/master/DependencyInjection/Compiler/UrlGeneratorPass.php#L54
I understand that this is used to avoid vendor lock-in and to trim the Symfony UrlGeneratorInterface
from superfluous methods. But the check seams plain wrong in this specific case.