diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75d8208f..85aad9c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,12 @@ on: jobs: PHPUnit: name: PHPUnit (PHP ${{ matrix.php }}) - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: php: + - 8.3 + - 8.2 - 8.1 - 8.0 - 7.4 @@ -23,11 +25,16 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: xdebug + ini-file: development + ini-values: disable_functions='' # do not disable PCNTL functions on PHP < 8.1 + extensions: sockets, pcntl + env: + fail-fast: true # fail step if any extension can not be installed - run: composer install - run: vendor/bin/phpunit --coverage-text --exclude-group internet if: ${{ matrix.php >= 7.3 }} @@ -36,12 +43,16 @@ jobs: PHPUnit-hhvm: name: PHPUnit (HHVM) - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 continue-on-error: true steps: - - uses: actions/checkout@v2 - - uses: azjezz/setup-hhvm@v1 + - uses: actions/checkout@v4 + - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM + - name: Run hhvm composer.phar require --dev react/async:^2 react/promise:^2 phpunit/phpunit:^5.7 # downgrade Async and Promise for HHVM + uses: docker://hhvm/hhvm:3.30-lts-latest with: - version: lts-3.30 - - run: hhvm $(which composer) install - - run: hhvm vendor/bin/phpunit --exclude-group internet + args: hhvm composer.phar require --dev react/async:^2 react/promise:^2 phpunit/phpunit:^5.7 + - name: Run hhvm vendor/bin/phpunit --exclude-group internet + uses: docker://hhvm/hhvm:3.30-lts-latest + with: + args: hhvm vendor/bin/phpunit --exclude-group internet diff --git a/CHANGELOG.md b/CHANGELOG.md index c588ac1f..f5f711e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## 1.4.0 (2023-07-11) + +A major new feature release, see [**release announcement**](https://clue.engineering/2023/announcing-reactphp-promise-v3). + +* Feature: Add support for new Promise v3 release. + (#464 and #524 by @clue) + +* Feature: Support PHP 8.2 release. + (#491 by @Nielsvanpach) + +* Improve test suite, update dependencies and report failed assertions. + (#462 and #501 by @clue and #466 and #492 by @SimonFrings) + +## 1.3.0 (2022-07-11) + +A major new feature release, see [**release announcement**](https://clue.engineering/2022/announcing-reactphp-async). + +* Feature: Add new Async component to core components. + (#458 by @clue) + +* Feature: Support PHP 8.1 release. + (#451 by @clue) + +* Improve documentation, update HTTP server example for reactphp/http v1.6.0 release. + (#449 and #459 by @clue and #457 by @nhedger) + +* Improve test suite, support PHPUnit 9 and update dependencies to avoid skipping tests. + (#450 and #454 by @clue and #455 by @SimonFrings) + ## 1.2.0 (2021-07-11) A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop). diff --git a/README.md b/README.md index adfd7c3d..f8e1d0f2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@
- Build Status + Build Status

@@ -23,6 +23,13 @@ client/server and interaction with processes. Third-party libraries can use thes components to create async network clients/servers and more. ```php +=5.3.8", + "react/async": "^4.3 || ^3.2 || ^2.2", "react/cache": "^1.1", - "react/dns": "^1.9", - "react/event-loop": "^1.3", - "react/http": "^1.6", - "react/promise": "^2.9 || ^1.2", - "react/promise-stream": "^1.3", - "react/promise-timer": "^1.8", - "react/socket": "^1.11", - "react/stream": "^1.2" + "react/dns": "^1.13", + "react/event-loop": "^1.5", + "react/http": "^1.11", + "react/promise": "^3.2 || ^2.10 || ^1.3", + "react/promise-stream": "^1.7", + "react/promise-timer": "^1.11", + "react/socket": "^1.15", + "react/stream": "^1.4" }, "require-dev": { - "clue/block-react": "^1.5", "clue/stream-filter": "^1.3", - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^7.5 || ^5.7 || ^4.8.36" }, "config": { "preferred-install": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 15445651..d5d26a2e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,17 @@ - + + + ./vendor/react/event-loop/tests/ ./vendor/react/*/tests/ - - ./vendor/react/http/tests/HttpServerTest.php @@ -19,4 +19,12 @@ ./vendor/react/*/src/ + + + + + + + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy index 8a0d9b7f..2cd2f9b1 100644 --- a/phpunit.xml.legacy +++ b/phpunit.xml.legacy @@ -1,6 +1,6 @@ - + ./vendor/react/*/tests/ - - ./vendor/react/http/tests/HttpServerTest.php @@ -17,4 +15,12 @@ ./vendor/react/*/src/ + + + + + + + + diff --git a/tests/bootstrap.php b/tests/bootstrap.php index db5b8cac..2af732cf 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,7 +2,9 @@ $autoload = require __DIR__ . '/../vendor/autoload.php'; -// register all `autoload-dev` paths from React's components +assert($autoload instanceof Composer\Autoload\ClassLoader); + +// register all `autoload-dev` paths from ReactPHP's components foreach (glob(__DIR__ . '/../vendor/react/*/composer.json') as $b) { $config = json_decode(file_get_contents($b), true); @@ -15,17 +17,3 @@ } } } - -// load all legacy test bootstrap scripts from React's components -foreach (glob(__DIR__ . '/../vendor/react/*/tests/bootstrap.php') as $b) { - // skip legacy react/promise for now and use manual autoload path from bootstrap config - // @link https://github.com/reactphp/promise/blob/1.x/tests/bootstrap.php - // @link https://github.com/reactphp/promise/blob/2.x/tests/bootstrap.php - if (strpos($b, 'react/promise/tests/bootstrap.php') !== false) { - $autoload->add('React\Promise', __DIR__ . '/../vendor/react/promise/tests'); - $autoload->addPsr4('React\\Promise\\', __DIR__ . '/../vendor/react/promise/tests'); - continue; - } - - include $b; -}