You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my Route Parameters Regular Expression Constraints I get the following error since PHP 7.3:
ErrorException thrown with message "preg_match(): Compilation failed: invalid range in character class at offset 55"
Stacktrace:
32 ErrorException in .../vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php:21
31 preg_match in .../vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php:21
30 Illuminate\Routing\Matching\UriValidator:matches in .../vendor/laravel/framework/src/Illuminate/Routing/Route.php:275
29 Illuminate\Routing\Route:matches in .../vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:197
28 Illuminate\Routing\RouteCollection:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Support/Arr.php:175
27 call_user_func in .../vendor/laravel/framework/src/Illuminate/Support/Arr.php:175
26 Illuminate\Support\Arr:first in .../vendor/laravel/framework/src/Illuminate/Support/Collection.php:758
25 Illuminate\Support\Collection:first in .../vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:198
24 Illuminate\Routing\RouteCollection:matchAgainstRoutes in .../vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:164
23 Illuminate\Routing\RouteCollection:match in .../vendor/laravel/framework/src/Illuminate/Routing/Router.php:636
22 Illuminate\Routing\Router:findRoute in .../vendor/laravel/framework/src/Illuminate/Routing/Router.php:625
21 Illuminate\Routing\Router:dispatchToRoute in .../vendor/laravel/framework/src/Illuminate/Routing/Router.php:614
20 Illuminate\Routing\Router:dispatch in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
19 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
18 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/fideloper/proxy/src/TrustProxies.php:57
17 Fideloper\Proxy\TrustProxies:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
15 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
12 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
9 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
6 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
3 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
2 Illuminate\Pipeline\Pipeline:then in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
0 Illuminate\Foundation\Http\Kernel:handle in .../public/index.php:55
I believe this is caused by the following change in the PCRE extension: PHP: Other Changes
The PCRE extension has been upgraded to PCRE2, which may cause minor behavioral changes (for instance, character ranges in classes are now more strictly interpreted), and augments the existing regular expression syntax.
Steps To Reproduce:
Create a similar route:
Route::get('{type}-tutorials/{location?}/{page?}', 'TutorialController@index')->where([
'type' => 'video|text',
'location' => '[\w\d-]+',
'page' => '[\w\d-]+'
]);
The text was updated successfully, but these errors were encountered:
@roko91 since we can't reproduce this I suggest you try on a support channel first. If you can actually identify this as a bug, feel free to report back.
Description:
For my Route Parameters Regular Expression Constraints I get the following error since PHP 7.3:
ErrorException thrown with message "preg_match(): Compilation failed: invalid range in character class at offset 55"
Stacktrace:
32 ErrorException in .../vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php:21
31 preg_match in .../vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php:21
30 Illuminate\Routing\Matching\UriValidator:matches in .../vendor/laravel/framework/src/Illuminate/Routing/Route.php:275
29 Illuminate\Routing\Route:matches in .../vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:197
28 Illuminate\Routing\RouteCollection:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Support/Arr.php:175
27 call_user_func in .../vendor/laravel/framework/src/Illuminate/Support/Arr.php:175
26 Illuminate\Support\Arr:first in .../vendor/laravel/framework/src/Illuminate/Support/Collection.php:758
25 Illuminate\Support\Collection:first in .../vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:198
24 Illuminate\Routing\RouteCollection:matchAgainstRoutes in .../vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:164
23 Illuminate\Routing\RouteCollection:match in .../vendor/laravel/framework/src/Illuminate/Routing/Router.php:636
22 Illuminate\Routing\Router:findRoute in .../vendor/laravel/framework/src/Illuminate/Routing/Router.php:625
21 Illuminate\Routing\Router:dispatchToRoute in .../vendor/laravel/framework/src/Illuminate/Routing/Router.php:614
20 Illuminate\Routing\Router:dispatch in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
19 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
18 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/fideloper/proxy/src/TrustProxies.php:57
17 Fideloper\Proxy\TrustProxies:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
15 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
12 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
9 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
6 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in .../vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
3 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in .../vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
2 Illuminate\Pipeline\Pipeline:then in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in .../vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
0 Illuminate\Foundation\Http\Kernel:handle in .../public/index.php:55
Arguments for 31 in the stack trace:
I believe this is caused by the following change in the PCRE extension:
PHP: Other Changes
Steps To Reproduce:
Create a similar route:
Route::get('{type}-tutorials/{location?}/{page?}', 'TutorialController@index')->where([
'type' => 'video|text',
'location' => '[\w\d-]+',
'page' => '[\w\d-]+'
]);
The text was updated successfully, but these errors were encountered: