@@ -240,7 +240,12 @@ jobs:
240
240
fi
241
241
;;
242
242
"laravel-sqlite")
243
- EXTENSIONS="--enable-cli --enable-fpm --enable-mbstring --enable-opcache --enable-intl --enable-exif --enable-bcmath --with-pdo-sqlite --with-sqlite3 --with-curl --with-openssl --enable-gd --with-zip --with-readline --with-libxml --with-zlib"
243
+ # For PHP 8.1, disable intl extension to avoid ICU4C C++17 issues
244
+ if [[ "${{ matrix.php_version }}" == 8.1* ]]; then
245
+ EXTENSIONS="--enable-cli --enable-fpm --enable-mbstring --enable-opcache --enable-exif --enable-bcmath --with-pdo-sqlite --with-sqlite3 --with-curl --with-openssl --enable-gd --with-zip --with-readline --with-libxml --with-zlib"
246
+ else
247
+ EXTENSIONS="--enable-cli --enable-fpm --enable-mbstring --enable-opcache --enable-intl --enable-exif --enable-bcmath --with-pdo-sqlite --with-sqlite3 --with-curl --with-openssl --enable-gd --with-zip --with-readline --with-libxml --with-zlib"
248
+ fi
244
249
;;
245
250
"api-only")
246
251
EXTENSIONS="--enable-cli --enable-fpm --enable-mbstring --enable-opcache --enable-bcmath --with-pdo-mysql --with-mysqli --with-curl --with-openssl --with-zip --with-libxml --with-zlib"
@@ -425,9 +430,9 @@ jobs:
425
430
export CXXFLAGS="-std=c++17 -stdlib=libc++"
426
431
echo "Using C++17 for PHP ${{ matrix.php_version }}"
427
432
elif [[ "$PHP_MAJOR_VERSION" -eq 8 && "$PHP_MINOR_VERSION" -eq 1 ]]; then
428
- # PHP 8.1 uses C++14 for configure (PHP requirement), C++17 for build ( ICU4C requirement)
433
+ # PHP 8.1 configure step requires C++14, but build step will need C++17 for ICU4C
429
434
export CXXFLAGS="-std=c++14 -stdlib=libc++"
430
- echo "Using C++14 for PHP ${{ matrix.php_version }} (configure step)"
435
+ echo "Using C++14 for PHP ${{ matrix.php_version }} (configure step only )"
431
436
else
432
437
# Earlier PHP versions can use C++14
433
438
export CXXFLAGS="-std=c++14 -stdlib=libc++"
@@ -463,10 +468,21 @@ jobs:
463
468
echo "C++17 support test failed before configure"
464
469
rm -f test_cpp.cpp test_cpp
465
470
fi
471
+ elif [[ "$PHP_MAJOR_VERSION" -eq 8 && "$PHP_MINOR_VERSION" -eq 1 ]]; then
472
+ echo "Testing C++14 support before configure (PHP 8.1 configure step):"
473
+ echo '#include <type_traits>' > test_cpp.cpp
474
+ echo 'int main() { typename std::enable_if<true, int>::type x = 0; return x; }' >> test_cpp.cpp
475
+ if clang++ -std=c++14 -stdlib=libc++ test_cpp.cpp -o test_cpp 2>/dev/null; then
476
+ echo "C++14 support confirmed before configure"
477
+ rm -f test_cpp.cpp test_cpp
478
+ else
479
+ echo "C++14 support test failed before configure"
480
+ rm -f test_cpp.cpp test_cpp
481
+ fi
466
482
else
467
483
echo "Testing C++14 support before configure:"
468
484
echo '#include <type_traits>' > test_cpp.cpp
469
- echo 'int main() { std::enable_if_t <true, int> x = 0; return x; }' >> test_cpp.cpp
485
+ echo 'int main() { typename std::enable_if <true, int>::type x = 0; return x; }' >> test_cpp.cpp
470
486
if clang++ -std=c++14 -stdlib=libc++ test_cpp.cpp -o test_cpp 2>/dev/null; then
471
487
echo "C++14 support confirmed before configure"
472
488
rm -f test_cpp.cpp test_cpp
@@ -706,7 +722,7 @@ jobs:
706
722
else
707
723
echo "Testing C++14 support:"
708
724
echo '#include <type_traits>' > test_cpp.cpp
709
- echo 'int main() { std::enable_if_t <true, int> x = 0; return x; }' >> test_cpp.cpp
725
+ echo 'int main() { typename std::enable_if <true, int>::type x = 0; return x; }' >> test_cpp.cpp
710
726
if clang++ -std=c++14 -stdlib=libc++ test_cpp.cpp -o test_cpp 2>/dev/null; then
711
727
echo "C++14 support confirmed"
712
728
rm -f test_cpp.cpp test_cpp
0 commit comments