DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

The constructor of route `Generic` is absent, leading to possible inconsistent state #14

Closed Ocramius closed 10 years ago

Ocramius commented 10 years ago

https://github.com/DASPRiD/Dash/blob/2271fdbfdb7a627f22cb8cb51223a6ec1a98aeeb/src/Dash/Mvc/Router/Http/Route/Generic.php#L21 doesn't have a constructor.

That means that non-nullable properties are not guaranteed to be set.

DASPRiD commented 10 years ago

Actually, both $pathParser and $hostnameParser may be null. Will extend the doc block.