Skip to content

Commit 376a90a

Browse files
committed
Update support for Slim 4.15
1 parent e45a076 commit 376a90a

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"psr/event-dispatcher": "^1.0",
5353
"slim/csrf": "^1.3",
5454
"slim/psr7": "^1.4",
55-
"slim/slim": "^4.14",
55+
"slim/slim": "^4.15",
5656
"slim/twig-view": "^3.0",
5757
"symfony/console": "^6.4",
5858
"symfony/yaml": ">=4.4",
@@ -78,6 +78,15 @@
7878
"slam/phpstan-extensions": "^6.0",
7979
"symplify/monorepo-builder": "^11.2"
8080
},
81+
"replace": {
82+
"userfrosting/framework": "6.0.0-alpha.6",
83+
"userfrosting/sprinkle-account": "6.0.0-alpha.6",
84+
"userfrosting/sprinkle-admin": "6.0.0-alpha.6",
85+
"userfrosting/sprinkle-core": "6.0.0-alpha.6",
86+
"userfrosting/userfrosting": "6.0.0-alpha.6"
87+
},
88+
"minimum-stability": "dev",
89+
"prefer-stable": true,
8190
"autoload": {
8291
"psr-4": {
8392
"UserFrosting\\": "packages/framework/src",
@@ -96,14 +105,5 @@
96105
"UserFrosting\\Tests\\App\\": "packages/skeleton/app/tests/",
97106
"Workers\\MonoRepo\\": "utils/"
98107
}
99-
},
100-
"replace": {
101-
"userfrosting/framework": "6.0.0-alpha.6",
102-
"userfrosting/sprinkle-account": "6.0.0-alpha.6",
103-
"userfrosting/sprinkle-admin": "6.0.0-alpha.6",
104-
"userfrosting/sprinkle-core": "6.0.0-alpha.6",
105-
"userfrosting/userfrosting": "6.0.0-alpha.6"
106-
},
107-
"minimum-stability": "dev",
108-
"prefer-stable": true
108+
}
109109
}

packages/framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"vlucas/valitron": "^1.2.3",
4040
"predis/predis": "^2.2",
4141
"twig/twig": "^3.3",
42-
"slim/slim": "^4.14",
42+
"slim/slim": "^4.15",
4343
"slim/psr7": "^1.4",
4444
"php-di/php-di": "^7.0",
4545
"php-di/slim-bridge": "^3.2",

packages/sprinkle-core/app/src/Util/RouteParserInterface.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@
1717
use RuntimeException;
1818
use Slim\Interfaces\RouteParserInterface as SlimRouteParserInterface;
1919

20+
/**
21+
* Add fallback route to Slim's RouteParserInterface.
22+
*/
2023
interface RouteParserInterface extends SlimRouteParserInterface
2124
{
2225
/**
2326
* Build the path for a named route excluding the base path.
2427
*
25-
* @param string $routeName Route name
26-
* @param array<string, string> $data Named argument replacement data
27-
* @param array<string, string> $queryParams Optional query string parameters
28-
* @param string|null $fallbackRoute Optional fallback route (the actual route, not the route name)
28+
* @param string $routeName Route name
29+
* @param array<string, string> $data Named argument replacement data
30+
* @param array<string, string | array<array-key, string>> $queryParams Optional query string parameters
31+
* @param string|null $fallbackRoute Optional fallback route (the actual route, not the route name)
2932
*
3033
* @throws RuntimeException If named route does not exist
3134
* @throws InvalidArgumentException If required data not provided
@@ -40,10 +43,10 @@ public function relativeUrlFor(
4043
/**
4144
* Build the path for a named route including the base path.
4245
*
43-
* @param string $routeName Route name
44-
* @param array<string, string> $data Named argument replacement data
45-
* @param array<string, string> $queryParams Optional query string parameters
46-
* @param string|null $fallbackRoute Optional fallback route (the actual route, not the route name)
46+
* @param string $routeName Route name
47+
* @param array<string, string> $data Named argument replacement data
48+
* @param array<string, string | array<array-key, string>> $queryParams Optional query string parameters
49+
* @param string|null $fallbackRoute Optional fallback route (the actual route, not the route name)
4750
*
4851
* @throws RuntimeException If named route does not exist
4952
* @throws InvalidArgumentException If required data not provided
@@ -58,11 +61,11 @@ public function urlFor(
5861
/**
5962
* Get fully qualified URL for named route.
6063
*
61-
* @param UriInterface $uri
62-
* @param string $routeName Route name
63-
* @param array<string, string> $data Named argument replacement data
64-
* @param array<string, string> $queryParams Optional query string parameters
65-
* @param string|null $fallbackRoute Optional fallback route (the actual route, not the route name)
64+
* @param UriInterface $uri
65+
* @param string $routeName Route name
66+
* @param array<string, string> $data Named argument replacement data
67+
* @param array<string, string | array<array-key, string>> $queryParams Optional query string parameters
68+
* @param string|null $fallbackRoute Optional fallback route (the actual route, not the route name)
6669
*/
6770
public function fullUrlFor(
6871
UriInterface $uri,

0 commit comments

Comments
 (0)