Bladeren bron

Merge pull request #352 from eschricker/bugfix/route-ids-lumen

Support routes with regex
Shalvah 3 jaren geleden
bovenliggende
commit
e9d1ee1475
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      camel/Extraction/ExtractedEndpointData.php
  2. 1 1
      camel/Output/OutputEndpointData.php

+ 1 - 1
camel/Extraction/ExtractedEndpointData.php

@@ -128,7 +128,7 @@ class ExtractedEndpointData extends BaseDTO
 
     public function endpointId()
     {
-        return $this->httpMethods[0] . str_replace(['/', '?', '{', '}', ':'], '-', $this->uri);
+        return $this->httpMethods[0] . str_replace(['/', '?', '{', '}', ':', '\\', '+', '|'], '-', $this->uri);
     }
 
     public function normalizeResourceParamName(string $uri, Route $route): string

+ 1 - 1
camel/Output/OutputEndpointData.php

@@ -137,7 +137,7 @@ class OutputEndpointData extends BaseDTO
 
     public function endpointId(): string
     {
-        return $this->httpMethods[0] . str_replace(['/', '?', '{', '}', ':'], '-', $this->uri);
+        return $this->httpMethods[0] . str_replace(['/', '?', '{', '}', ':', '\\', '+', '|'], '-', $this->uri);
     }
 
     public function hasResponses(): bool