File tree Expand file tree Collapse file tree 4 files changed +809
-558
lines changed
Expand file tree Collapse file tree 4 files changed +809
-558
lines changed Original file line number Diff line number Diff line change 6363 distribution : ' temurin'
6464 java-version : ' 24'
6565
66+ # IMPORTANT: PHP version must match laravel/composer.json (require.php and config.platform.php)
67+ # and laravel/build.sh (REQUIRED_PHP_MAJOR_MINOR). Update all three when changing versions.
6668 - name : Set up PHP
6769 uses : shivammathur/setup-php@v2
6870 with :
Original file line number Diff line number Diff line change 22
33set -e
44
5+ # =============================================================================
6+ # PHP Version Check
7+ # This project requires PHP 8.3.x. Fail fast if a different version is used.
8+ # =============================================================================
9+ REQUIRED_PHP_MAJOR_MINOR=" 8.3"
10+ CURRENT_PHP_VERSION=$( php -r ' echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;' )
511
6- composer install
12+ if [[ " $CURRENT_PHP_VERSION " != " $REQUIRED_PHP_MAJOR_MINOR " ]]; then
13+ echo " ERROR: PHP version mismatch!"
14+ echo " Required: PHP ${REQUIRED_PHP_MAJOR_MINOR} .x"
15+ echo " Current: PHP $( php -r ' echo PHP_VERSION;' ) "
16+ echo " "
17+ echo " Please install PHP ${REQUIRED_PHP_MAJOR_MINOR} .x or update the version requirements in:"
18+ echo " - laravel/composer.json (require.php and config.platform.php)"
19+ echo " - .github/workflows/auto-deploy.yml (setup-php php-version)"
20+ exit 1
21+ fi
22+
23+ echo " PHP version check passed: $( php -r ' echo PHP_VERSION;' ) "
24+
25+ # =============================================================================
26+ # Install dependencies
27+ # Using --no-scripts to work around Laravel 12 bug where package:discover
28+ # fails with "Call to a member function make() on null" during composer install.
29+ # See: https://github.com/laravel/framework/issues/56098
30+ # =============================================================================
31+ composer install --no-scripts
32+
33+ # Run composer scripts manually (except package:discover which has the bug)
34+ composer dump-autoload --optimize
735
836php artisan optimize:clear
937php artisan optimize
Original file line number Diff line number Diff line change 66 "keywords" : [" laravel" , " framework" ],
77 "license" : " MIT" ,
88 "require" : {
9- "php" : " ^8.2 " ,
9+ "php" : " ~8.3.0 " ,
1010 "laravel/framework" : " ^12.0" ,
1111 "laravel/tinker" : " ^2.10.1" ,
1212 "sentry/sentry-laravel" : " ^4.15"
6969 "allow-plugins" : {
7070 "pestphp/pest-plugin" : true ,
7171 "php-http/discovery" : true
72+ },
73+ "platform" : {
74+ "php" : " 8.3.30"
7275 }
7376 },
7477 "minimum-stability" : " stable" ,
You can’t perform that action at this time.
0 commit comments