Skip to content

Commit 8aead9e

Browse files
committed
Re-enable laravel tests
Laravel is now sufficiently PHP 8 compatible. Closes GH-6353.
1 parent 0fa154a commit 8aead9e

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

azure/community_job.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,25 @@ jobs:
4848
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
4949
echo opcache.jit_buffer_size=1G >> /etc/php.d/opcache.ini
5050
displayName: 'Install Build'
51-
#- script: |
52-
# git clone https://github.com/laravel/framework.git --branch=master --depth=1
53-
# cd framework
54-
# php7.3 /usr/bin/composer install --no-progress
55-
# export USE_ZEND_ALLOC=0
56-
# sed -i 's/$exit = true/$exit = false/g' vendor/phpunit/phpunit/src/TextUI/Command.php
57-
# # Avoid test using exit(), which thus leaks.
58-
# # We can use USE_TRACKED_ALLOC=1 if more of these show up.
59-
# sed -i "s/function_exists('pcntl_fork')/false/" tests/Filesystem/FilesystemTest.php
60-
# # Work around PHP 8 incompatibility in Doctrine
61-
# sed -i 's/function query()/function query(...$args)/' vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
62-
# sed -i 's/function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)/function setFetchMode($fetchMode, $arg2 = null, $arg3 = null, ...$args)/' vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
63-
# sed -i 's/public function getMessage();//' vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DriverException.php
64-
# php vendor/bin/phpunit
65-
# displayName: 'Test Laravel'
51+
- script: |
52+
git clone https://github.com/laravel/framework.git --branch=master --depth=1
53+
cd framework
54+
#php7.3 /usr/bin/composer require "doctrine/dbal:^3.0" --no-interaction
55+
php7.3 /usr/bin/composer install --no-progress
56+
# Hack to disable a test that hangs on azure
57+
sed -i 's/PHP_OS/"Darwin"/' tests/Filesystem/FilesystemTest.php
58+
export USE_ZEND_ALLOC=0
59+
export ASAN_OPTIONS=exitcode=139
60+
php vendor/bin/phpunit
61+
if [ $? -gt 128 ]; then
62+
exit 1
63+
fi
64+
displayName: 'Test Laravel'
6665
- script: |
6766
git clone https://github.com/symfony/symfony.git --depth=1
6867
cd symfony
6968
php7.3 /usr/bin/composer install --no-progress
7069
php7.3 ./phpunit install
71-
# Work around PHP 8 incompatibility in Doctrine
72-
sed -i 's/function query()/function query(...$args)/' vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
7370
export USE_ZEND_ALLOC=0
7471
export USE_TRACKED_ALLOC=1
7572
export ASAN_OPTIONS=exitcode=139

0 commit comments

Comments
 (0)