Skip to content

Commit

Permalink
ci: github PHP 5.{3,4,5} build
Browse files Browse the repository at this point in the history
do not execute the .phpt tests on 5.4/5 as well (previously 5.3 only),
as phpunit 4.8.36 phpt test case extension EXPECT section has no support
for stderr.

Similar to the phpt CLEAN section, which is phpunit 5.1.0 [6865568].

[6865568]: sebastianbergmann/phpunit@6865568
  • Loading branch information
ktomk committed Oct 10, 2024
1 parent 4b22aa7 commit 8cbbb38
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
machine: ['ubuntu-20.04']
php-version: ['8.2', '8.1', '8.0', '7.4', '7.3', '7.1', '7.0', '5.6']
php-version: ['8.2', '8.1', '8.0', '7.4', '7.3', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3']
experimental: [false]
xdebug: ['xdebug']
include:
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ install:
- if [[ "${TRAVIS_PHP_VERSION}" == 7.2* ]]; then IGNORE_PLATFORM_REQS=--ignore-platform-reqs; ppconf remove-dev all phpunit ^7; fi
- if [[ "${TRAVIS_PHP_VERSION}" == 7.[01]* ]]; then IGNORE_PLATFORM_REQS=--ignore-platform-reqs; ppconf remove-dev all downpatch-phpunit-tests phpunit ^6; fi
- if [[ "${TRAVIS_PHP_VERSION}" == 5.6 ]]; then IGNORE_PLATFORM_REQS=--ignore-platform-reqs; ppconf remove-dev all downpatch-phpunit-tests phpunit ^5; fi
- if [[ "${TRAVIS_PHP_VERSION}" == 5.[543] ]]; then IGNORE_PLATFORM_REQS=--ignore-platform-reqs; ppconf remove-dev all downpatch-phpunit-tests phpunit ^4; fi
- echo "IGNORE_PLATFORM_REQS=${IGNORE_PLATFORM_REQS-}"
- composer install --no-interaction --no-progress ${IGNORE_PLATFORM_REQS-}
- ppconf self-test | grep ^xdebug | cut -d\ -f 2 | grep '^2\.' && ppconf xdebug2 || true
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog] and Pipelines adheres to
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html

## [unreleased]
### Fix
- PHP 5.5/4/3 add in .travis.yml / .github actions
- PHP 5.3 Debian based container image re-tagged on Docker Hub

## [0.0.70] - 2023-08-07
### Add
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<testsuites>
<testsuite name="unit">
<directory>test/unit</directory>
<directory suffix=".phpt" phpVersion="5.4.0" phpVersionOperator=">=">test/unit/PharBuild/phpt</directory>
<directory suffix=".phpt" phpVersion="5.4.0" phpVersionOperator=">=">test/unit/phpt</directory>
<directory suffix=".phpt" phpVersion="5.6.0" phpVersionOperator=">=">test/unit/PharBuild/phpt</directory>
<directory suffix=".phpt" phpVersion="5.6.0" phpVersionOperator=">=">test/unit/phpt</directory>
</testsuite>
<testsuite name="integration">
<directory>test/integration</directory>
Expand Down
11 changes: 11 additions & 0 deletions test/unit/phpt/bootstrap_missing_autoload.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ if (file_exists('vendor/autoload.php')) {

defined('STDERR') || define('STDERR', fopen('php://stderr', 'wb'));

# NOTE: phpunit phpt extension --CLEAN-- since phpunit 5.1.0/6865568
# NOTE: phpunit 4.8.36 lacks --EXPECT/F-- support for stderr and
# therefore, php < 5.6 does not execute .phpt tests of pipelines.
register_shutdown_function(
function () {
if (file_exists('vendor/autoload.php.phpt~')) {
rename('vendor/autoload.php.phpt~', 'vendor/autoload.php');
}
}
);

require __DIR__ . '/../../../src/bootstrap.php';
?>
--EXPECT--
Expand Down

0 comments on commit 8cbbb38

Please sign in to comment.