Questions around the Aimeos bundle for the Symfony framework
Forum rules: Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#1441 by garwat82
14 Jan 2015, 17:00
Hi there

Tried to make some parameters like "d-product-id" part of the Symfony route, e.g. "/detail/{d-product-id}" but that doesn't work as Symfony allows only word characters and no dashes for the placeholders. I'm thinking about converting dashes to underscores somewhere but this may collide if a parameter name will contain an underscore in the future. Are there any other feasable options?

Regards,

Garret
Last edited by garwat82 on 14 Jan 2015, 18:10, edited 1 time in total.
#1442 by aimeos
14 Jan 2015, 17:25
Hi Garret

This seems to be a bigger problem and converting the dashes to underscores forth and back in the bundle isn't a viable solution as you've already noted. Is there no way to patch Symfony to allow dashes in parameter names?
#1443 by garwat82
14 Jan 2015, 17:35
I did some research and asked the Symfony developers yesterday and both was negative. The Symfony developers wouldn't do this either as it will complicate things a lot for them (see https://github.com/symfony/symfony/issues/13400). They suggested to do this in the bundle and I fear this isn't a great solution too.

The only way to get a compatible and good solution seems to be changing the parameter names in the core to "d_product_id" and maybe shorten the name in the same step to e.g. "d_prodid". What do you think?
#1444 by aimeos
14 Jan 2015, 17:54
I see and I'm always hesitating making incompatible changes to the core. But if this is the only good option we have then do it ...