create-prisma-php-app 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap.php +4 -3
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -181,9 +181,10 @@ function dynamicRoute($uri)
|
|
|
181
181
|
$segmentMatch = singleDynamicRoute($uriSegments, $routeSegments);
|
|
182
182
|
if (!empty($segmentMatch)) {
|
|
183
183
|
$trimSegmentMatch = trim($segmentMatch, '[]');
|
|
184
|
-
$dynamicRouteParams = [$trimSegmentMatch => $uriSegments[array_search($segmentMatch, $routeSegments)]];
|
|
184
|
+
$dynamicRouteParams = new \ArrayObject([$trimSegmentMatch => $uriSegments[array_search($segmentMatch, $routeSegments)]], \ArrayObject::ARRAY_AS_PROPS);
|
|
185
185
|
|
|
186
|
-
$dynamicRouteUri = str_replace($segmentMatch, $uriSegments[array_search($segmentMatch, $routeSegments)], $normalizedRoute);
|
|
186
|
+
$dynamicRouteUri = str_replace($segmentMatch, $uriSegments[array_search($segmentMatch, $routeSegments)], $normalizedRoute);
|
|
187
|
+
$dynamicRouteUriDirname = dirname($dynamicRouteUri);
|
|
187
188
|
$dynamicRouteUriDirname = rtrim($dynamicRouteUriDirname, '/');
|
|
188
189
|
|
|
189
190
|
$expectedUri = '/src/app/' . $normalizedUri;
|
|
@@ -206,7 +207,7 @@ function dynamicRoute($uri)
|
|
|
206
207
|
$pattern = '/\[\.\.\.(.*?)\]/';
|
|
207
208
|
if (preg_match($pattern, $normalizedRoute, $matches)) {
|
|
208
209
|
$contentWithinBrackets = $matches[1];
|
|
209
|
-
$dynamicRouteParams = [$contentWithinBrackets => $explodedNormalizedUri];
|
|
210
|
+
$dynamicRouteParams = new \ArrayObject([$contentWithinBrackets => $explodedNormalizedUri], \ArrayObject::ARRAY_AS_PROPS);
|
|
210
211
|
}
|
|
211
212
|
if (strpos($normalizedRoute, 'route.php') !== false) {
|
|
212
213
|
$uriMatch = $normalizedRoute;
|