Closed Ronnie-J closed 8 years ago
Hey @Ronnie-J
We had the same problem a few weeks back where i tried to fix this in the master branch, by having the ChainNormalizer
ignore everything that is a scalar (6515c47002aef5e9fefda8958d9a23fb23618cbe). This works great for the normalization part, but when Tacker then tries to dump the configuration as a cache it will receive a closure and then php will throw a fit (Cannot serialize a closure).
I am not sure if we can do anything about that, except maybe do a PR against Silex and have it save the service id of the users and call it when it needs it.
Hi @henrikbjorn.
Yes I do see the problem. It would be nice with that kind of support in the future. :+1:
This is a Silex problem and it is impossible to dump object without doing hacks (Like the SerializableClosure found in Laravel)
Hi Henrik.
This issue is on version 1.2.1of flint/tacker. I haven't upgraded due to the dependencies for Pimple 1.0 and Silex 1.3
I have a security configuration like this:
users: %security.user_provider.my_login%
is picked up fine by the PimpleNormalizer but just after the EnvironmentNormalizer triggers and at this point tries to convert my object into a string which fails of course. Do you know why it would try and parse the object in the EnvironmentNormalizer since it was picked up by the PimpleNormalizer?If I simply check for objects in the EnvironmentNormalizer and return if so then the code seems to run as expected.