We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 5 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 15 | public function run(): StepResult |
||
| 16 | { |
||
| 17 | $prettyVersion = $this->context()->installedPackagePrettyVersion('laravel/framework') ?? app()->version(); |
||
| 18 | $major = $this->context()->packageMajorVersion('laravel/framework'); |
||
| 19 | |||
| 20 | if ($major === null && preg_match('/(\d+)/', $prettyVersion, $matches)) { |
||
| 21 | $major = (int) $matches[1]; |
||
| 22 | } |
||
| 23 | |||
| 24 | if ($major !== null && $major >= 12) { |
||
| 25 | return StepResult::success("Detected Laravel {$prettyVersion}."); |
||
| 26 | } |
||
| 27 | |||
| 28 | return StepResult::failure( |
||
| 29 | 'Upgrade to Laravel 12 before running the Backpack v7 upgrade.', |
||
| 30 | [ |
||
| 31 | "Detected Laravel version: {$prettyVersion}", |
||
| 32 | 'Follow the official upgrade guide: https://laravel.com/docs/12.x/upgrade', |
||
| 33 | 'After upgrading to Laravel 12, test everything is working in your app and admin panel. |
||
| 34 | ] |
||
| 43 |