Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ services:
dockerfile: ./swoole.dockerfile
args:
SWOOLE_VERSION: ${SWOOLE_VERSION}
PHP_VERSION: ${PHP_VERSION}
depends_on:
- zookeeper
- kafka1
Expand Down
3 changes: 1 addition & 2 deletions .github/swoole.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ARG SWOOLE_VERSION
ARG PHP_VERSION
FROM phpswoole/swoole:${SWOOLE_VERSION}-php${PHP_VERSION}
FROM phpswoole/swoole:${SWOOLE_VERSION}

# apt
RUN apt update
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.1, 7.2, 7.3, 7.4, "8.0"]
swoole: [
4.5-php7.1,
4.5-php7.2,
4.5-php7.3,
4.5-php7.4,
4.5-php8.0,
php8.1,
]
kafka: [1.0.0, 2.11-1.1.1, 2.13-2.6.0, 2.13-2.7.0]

env:
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole }}
KAFKA_VERSION: ${{ matrix.kafka }}
SWOOLE_VERSION: "4.5"
KAFKA_HOST: kafka1
KAFKA_PLAINTEXT_PORT: 9092
KAFKA_SASL_PLAINTEXT_PORT: 9093
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4]
swoole: [4.5-php7.1]
kafka: [2.13-2.7.0]

env:
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole }}
KAFKA_VERSION: ${{ matrix.kafka }}
SWOOLE_VERSION: 4.5

steps:
- uses: actions/checkout@v2
Expand All @@ -34,4 +33,4 @@ jobs:
docker exec swoole composer update

- name: Test
run: docker exec swoole ./vendor/bin/php-cs-fixer fix --dry-run
run: docker exec swoole ./vendor/bin/php-cs-fixer fix --dry-run --diff
5 changes: 2 additions & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4]
swoole: [4.5-php7.1]
kafka: [2.13-2.7.0]

env:
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole }}
KAFKA_VERSION: ${{ matrix.kafka }}
SWOOLE_VERSION: 4.5

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"php": ">=7.1",
"google/crc32": "^0.1.0",
"exussum12/xxhash": "^1.0.0",
"chdemko/sorted-collections": "^1.0"
"chdemko/sorted-collections": "^1.0",
"symfony/polyfill-php81": "^1.23"
},
"require-dev": {
"phpunit/phpunit": "^7.5|^8.0|^9.0",
Expand All @@ -30,4 +31,4 @@
"swoole-test": "export KAFKA_CLIENT_CLASS=\"\\longlang\\phpkafka\\Client\\SwooleClient\" && ./swoole-phpunit",
"test-coverage": "php -dzend_extension=xdebug ./vendor/bin/phpunit"
}
}
}
1 change: 1 addition & 0 deletions src/Protocol/AbstractStruct.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public function getFlexibleVersions(): array
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
Expand Down