Skip to content
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

1.6.0 Port mapping with variables #143

Open
matthieuwerner opened this issue Oct 19, 2018 · 3 comments
Open

1.6.0 Port mapping with variables #143

matthieuwerner opened this issue Oct 19, 2018 · 3 comments

Comments

@matthieuwerner
Copy link

Hello :).

Something looks weird on the version 1.6.0 with the port mapping specifically when we are using environnement variable mapping.

In the yaml :

rabbitmq_port: '%env(int:RABBITMQ_PORT)%'

The value of 'port' index in this case is 0;

It looks like the parameter is processed and converted to string before being replaced by the environnement value.

Something in there is maybe wrong with "beforeNormalization" c95a65e

Best regards.

@odolbeau
Copy link
Member

Hi @matthieuwerner & sorry for the late answer...

Could you please tell me which version of symfony you're using?
Could you try to debug which is the string passed to the beforeNormalization method? I bet it's %env(int:RABBITMQ_PORT)%?

Last but not least, is everything working fine when using the url config key? (see Configuration reference)

I'll add some tests on this class and mark the "old style config" (not using url) as deprecated when I'll have those information.

@B-Galati
Copy link

B-Galati commented Dec 7, 2018

@odolbeau Hello!

Using Symfony 4.2.1.

With int, I have:

"env_46199cc6221ede45_int_SYMFONY__YS__RABBITMQ__PORT_84a7d4ce68c4e237c3cad97f2b8ef136"
Configuration.php on line 123:
"env_46199cc6221ede45_int_SYMFONY__YS__RABBITMQ__PORT_84a7d4ce68c4e237c3cad97f2b8ef136"
Configuration.php on line 123:
"%env(int:SYMFONY__YS__RABBITMQ__PORT)%"

Without int, I have:

Configuration.php on line 123:
"env_3100f1e69d1a1b31_SYMFONY__YS__RABBITMQ__PORT_05cb34255f9c84d8f4c6d6a98669318c"
Configuration.php on line 123:
"env_3100f1e69d1a1b31_SYMFONY__YS__RABBITMQ__PORT_05cb34255f9c84d8f4c6d6a98669318c"
Configuration.php on line 123:
"%env(SYMFONY__YS__RABBITMQ__PORT)%"

It's working fine with url ;-)

@odolbeau
Copy link
Member

Thanks for your feedback!

I really have to find some time to release a new minor version to deprecate those options... :/
Keep using the url anyway, that's the correct configuration. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants