diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6d0a6c..404599f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,12 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 - - windows-2019 + - ubuntu-24.04 + - windows-2022 php: + - 8.4 + - 8.3 + - 8.2 - 8.1 - 8.0 - 7.4 @@ -26,12 +29,14 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: sockets coverage: xdebug + - run: composer config secure-http false && composer config repo.packagist composer http://packagist.org && composer config preferred-install source + if: ${{ matrix.php < 5.5 && matrix.os == 'windows-2022' }} # legacy PHP on Windows is allowed to use insecure downloads until it will be removed again - run: composer install - run: vendor/bin/phpunit --coverage-text if: ${{ matrix.php >= 7.3 }} diff --git a/README.md b/README.md index 7ea79b3..d6106e4 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require clue/socket-raw:^1.6 +composer require clue/socket-raw:^1.6 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. @@ -225,13 +225,13 @@ To run the test suite, you first need to clone this repo and then install all dependencies [through Composer](https://getcomposer.org/): ```bash -$ composer install +composer install ``` To run the test suite, go to the project root and run: ```bash -$ vendor/bin/phpunit +vendor/bin/phpunit ``` Note that the test suite contains tests for ICMP sockets which require root @@ -239,7 +239,7 @@ access on Unix/Linux systems. Therefor some tests will be skipped unless you run the following command to execute the full test suite: ```bash -$ sudo vendor/bin/phpunit +sudo vendor/bin/phpunit ``` The test suite also contains a number of functional integration tests that rely @@ -247,7 +247,7 @@ on a stable internet connection. If you do not want to run these, they can simply be skipped like this: ```bash -$ vendor/bin/phpunit --exclude-group internet +vendor/bin/phpunit --exclude-group internet ``` ## License diff --git a/composer.json b/composer.json index 2add27e..3130295 100644 --- a/composer.json +++ b/composer.json @@ -10,14 +10,16 @@ "email": "christian@clue.engineering" } ], - "autoload": { - "psr-4": {"Socket\\Raw\\": "src"} - }, "require": { - "ext-sockets": "*", - "php": ">=5.3" + "php": ">=5.3", + "ext-sockets": "*" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "autoload": { + "psr-4": { + "Socket\\Raw\\": "src/" + } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 54e4b13..b7316ce 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,8 @@ - - +./src/ + + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy index 7c9c435..08a1e8c 100644 --- a/phpunit.xml.legacy +++ b/phpunit.xml.legacy @@ -1,6 +1,6 @@ - + ./src/ + + +