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 1616 ],
1717 "require" : {
1818 "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 " ,
2323 "ramsey/uuid" : " ^3.7|^4.0" ,
24- "symfony/var-dumper" : " ^4.0|^5.0"
24+ "symfony/var-dumper" : " ^4.0|^5.0|6.0 "
2525 },
2626 "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 "
2929 },
3030 "conflict" : {
3131 "andrey-helldar/laravel-support" : " *"
Original file line number Diff line number Diff line change 1111 * @method static bool is6x()
1212 * @method static bool is7x()
1313 * @method static bool is8x()
14+ * @method static bool is9x()
1415 */
1516class AppVersion extends Facade
1617{
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ public function is8x(): bool
2525 return $ this ->major () === 8 ;
2626 }
2727
28+ public function is9x (): bool
29+ {
30+ return $ this ->major () === 9 ;
31+ }
32+
2833 protected function major (): int
2934 {
3035 return (int ) Str::before ($ this ->version (), '. ' );
@@ -33,12 +38,9 @@ protected function major(): int
3338 protected function version (): string
3439 {
3540 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 );
4042
41- return $ version ;
43+ return $ matches [ 1 ] ;
4244 }
4345
4446 return Application::VERSION ;
You can’t perform that action at this time.
0 commit comments