<?php
/**
 * Apply patches to support newer PHP versions.
 */

$patches = [
    'phpunit_mock_objects.patch' => 'phpunit/phpunit-mock-objects',
    'phpunit_php7.patch' => 'phpunit/phpunit',
    'phpunit_php8.patch' => 'phpunit/phpunit',
];

foreach ($patches as $patch => $package) {
    chdir(__DIR__.'/../vendor/'.$package);
    passthru(sprintf('patch -p1 -f < ../../../tests/%s', $patch));
}

<?php
/**
 * Apply patches to support newer PHP versions.
 */

$patches = array(
    'phpunit_mock_objects.patch' => 'phpunit/phpunit-mock-objects',
    'phpunit_php7.patch' => 'phpunit/phpunit',
    'phpunit_php8.patch' => 'phpunit/phpunit',
);

foreach ($patches as $patch => $package) {
    chdir(__DIR__.'/../vendor/'.$package);
    passthru(sprintf('patch -p1 -f < ../../../tests/%s', $patch));
}

Switch to old array style syntax to support PHP 5.3
Switch to old array style syntax to support PHP 5.3