99designs / ergo

A lightweight php5 library for request/response routing, controllers and http interaction.
http://99designs.com
MIT License
29 stars 4 forks source link

Add option to enforce template uniqueness #12

Closed arthens closed 10 years ago

arthens commented 11 years ago

What this is

Add an option (disabled by default) to check that all the routes are unique

arthens commented 11 years ago

@rbone thoughts?

lox commented 11 years ago

Wouldn't you often actually want to override routes? Especially if you start adding routemaps to bundles?

arthens commented 11 years ago

Personally I prefer a stricter approach. Particularly with bundles, because if we decide to have bundle-specific route files (like symfony does) then you can't rely on ordering.

What is the advantage of overriding instead of replacing?

Like right now we have a couple of duplicates, and in all cases the overridden routes are completely unused and should have been removed.