rollerworks-graveyard / app-sectioning

Configuration helper for separating your Symfony application into multiple sections
MIT License
2 stars 1 forks source link

Allow configuring from host/prefix string #19

Closed sstok closed 6 years ago

sstok commented 6 years ago
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no

Currently the sections are registered using an array-like format, but for XML and .env files this is less then ideal.

Someone on the Symfony Slack made the following suggestion; Instead of using JSON the user can specify a URI path that is parsed into a host and prefix. But as this would disallow the usage of multiple tld's and require some major changes in the conflict resolving validator I am thinking of introducing a custom string syntax:

Eg. https://example.{tld;nl;nl,de}/prefix ({tld;nl;nl,de} defines the tld attribute with nl as default, and nl|de as accepted requirement).

Tip: As a small bonus this also makes it possible specify if https must be used.

What about other default? These only apply to routing so allow the route definition to provide additional defaults and requirements (no overwrites!)

sstok commented 6 years ago

Closed by #21