File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 16
16
],
17
17
"require" : {
18
18
"php" : " ^7.2|^8.0" ,
19
- "illuminate/container" : " ^6.0|^7.0|^8.0" ,
20
- "illuminate/database" : " ^6.0|^7.0|^8.0" ,
21
- "illuminate/http" : " ^6.0|^7.0|^8.0" ,
22
- "illuminate/support" : " ^6.0|^7.0|^8.0" ,
19
+ "illuminate/container" : " ^6.0|^7.0|^8.0|^9.0 " ,
20
+ "illuminate/database" : " ^6.0|^7.0|^8.0|^9.0 " ,
21
+ "illuminate/http" : " ^6.0|^7.0|^8.0|^9.0 " ,
22
+ "illuminate/support" : " ^6.0|^7.0|^8.0|^9.0 " ,
23
23
"ramsey/uuid" : " ^3.7|^4.0" ,
24
- "symfony/var-dumper" : " ^4.0|^5.0"
24
+ "symfony/var-dumper" : " ^4.0|^5.0|6.0 "
25
25
},
26
26
"require-dev" : {
27
- "laravel/framework" : " ^6.0|^7.0|^8.0" ,
28
- "laravel/lumen-framework" : " ^6.0|^7.0|^8.0"
27
+ "laravel/framework" : " ^6.0|^7.0|^8.0|^9.0 " ,
28
+ "laravel/lumen-framework" : " ^6.0|^7.0|^8.0|^9.0 "
29
29
},
30
30
"conflict" : {
31
31
"andrey-helldar/laravel-support" : " *"
Original file line number Diff line number Diff line change 11
11
* @method static bool is6x()
12
12
* @method static bool is7x()
13
13
* @method static bool is8x()
14
+ * @method static bool is9x()
14
15
*/
15
16
class AppVersion extends Facade
16
17
{
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ public function is8x(): bool
25
25
return $ this ->major () === 8 ;
26
26
}
27
27
28
+ public function is9x (): bool
29
+ {
30
+ return $ this ->major () === 9 ;
31
+ }
32
+
28
33
protected function major (): int
29
34
{
30
35
return (int ) Str::before ($ this ->version (), '. ' );
@@ -33,12 +38,9 @@ protected function major(): int
33
38
protected function version (): string
34
39
{
35
40
if (AppHelper::isLumen ()) {
36
- $ version = app ()->version ();
37
-
38
- $ version = Str::after ($ version , '( ' );
39
- $ version = Str::before ($ version , ') ' );
41
+ preg_match ('/.+\((\d+\.\d+\.\d+)\)/ ' , app ()->version (), $ matches );
40
42
41
- return $ version ;
43
+ return $ matches [ 1 ] ;
42
44
}
43
45
44
46
return Application::VERSION ;
You can’t perform that action at this time.
0 commit comments