Skip to content

Commit

Permalink
Fixed rewrite rules for expressive router adapters
Browse files Browse the repository at this point in the history
Because we are matching the namespace by segments we need to have
defined rules for all 'previous' segments:
- try to load A\B\C
- rewrite rule must be:
  - A\B\C => D\E\F
  - A\B   => D\E
  - A     => D
  • Loading branch information
michalbundyra committed Apr 11, 2019
1 parent de5e823 commit e61cf57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/RewriteRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public static function namespaceRewrite()
// Expressive
'Zend\\ProblemDetails\\' => 'Expressive\\ProblemDetails\\',
'Zend\\Expressive\\Authentication\\ZendAuthentication\\' => 'Expressive\\Authentication\\LaminasAuthentication\\',
'Zend\\Expressive\\Authentication\\' => 'Expressive\\Authentication\\',
'Zend\\Expressive\\Router\\ZendRouter\\' => 'Expressive\\Router\\LaminasRouter\\',
'Zend\\Expressive\\Router\\' => 'Expressive\\Router\\',
'Zend\\Expressive\\ZendView\\' => 'Expressive\\LaminasView\\',
'Zend\\Expressive\\' => 'Expressive\\',
// Laminas
Expand Down

0 comments on commit e61cf57

Please sign in to comment.