Skip to content

Commit 2d1bd4d

Browse files
authored
Merge branch 'master' into master
2 parents cfcf8c0 + cfb32ff commit 2d1bd4d

File tree

92 files changed

+525
-840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+525
-840
lines changed
File renamed without changes.

.github/workflows/checks.yml

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ on:
66
- master
77
jobs:
88
build-source:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-22.04
1010
steps:
1111
-
1212
name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
-
1515
name: Install phars
1616
run: |
1717
make install-phars
1818
-
1919
name: Upload source directory
20-
uses: actions/upload-artifact@v2
20+
uses: actions/upload-artifact@v4
2121
with:
2222
name: source
23+
include-hidden-files: true
2324
path: .
2425
php-xdebug-docker:
2526
needs:
@@ -29,26 +30,29 @@ jobs:
2930
php:
3031
-
3132
version: '8.1'
32-
xdebug: '3.1.5'
33+
xdebug: '3.4.0'
3334
-
3435
version: '8.2'
35-
xdebug: '3.2.1'
36+
xdebug: '3.4.0'
3637
-
3738
version: '8.3'
38-
xdebug: '3.3.1'
39-
runs-on: ubuntu-20.04
39+
xdebug: '3.4.0'
40+
-
41+
version: '8.4'
42+
xdebug: '3.4.0'
43+
runs-on: ubuntu-22.04
4044
steps:
4145
-
4246
name: Download sources
43-
uses: actions/download-artifact@v4.1.7
47+
uses: actions/download-artifact@v4
4448
with:
4549
name: source
4650
-
4751
name: Set up Docker Buildx
48-
uses: docker/setup-buildx-action@v1
52+
uses: docker/setup-buildx-action@v3
4953
-
5054
name: Build
51-
uses: docker/build-push-action@v2
55+
uses: docker/build-push-action@v6
5256
with:
5357
context: .
5458
file: ./Dockerfile
@@ -67,12 +71,12 @@ jobs:
6771
docker save php-avro-serde:${{ matrix.php.version }} -o php-avro-serde-${{ matrix.php.version }}.tgz
6872
-
6973
name: Upload docker image
70-
uses: actions/upload-artifact@v2
74+
uses: actions/upload-artifact@v4
7175
with:
7276
name: php-avro-serde-${{ matrix.php.version }}
7377
path: php-avro-serde-${{ matrix.php.version }}.tgz
7478
ci-checks:
75-
runs-on: ubuntu-20.04
79+
runs-on: ubuntu-22.04
7680
needs:
7781
- php-xdebug-docker
7882
strategy:
@@ -87,27 +91,33 @@ jobs:
8791
-
8892
version: '8.3'
8993
composer: --prefer-lowest
94+
-
95+
version: '8.4'
96+
composer: --prefer-lowest
9097
-
9198
version: '8.1'
9299
composer: --prefer-stable
93100
-
94101
version: '8.2'
95102
composer: --prefer-stable
96103
-
97-
version: '8.2'
104+
version: '8.3'
105+
composer: --prefer-stable
106+
-
107+
version: '8.4'
98108
composer: --prefer-stable
99109
steps:
100110
-
101111
name: Download sources
102-
uses: actions/download-artifact@v4.1.7
112+
uses: actions/download-artifact@v4
103113
with:
104114
name: source
105115
-
106116
name: Set up Docker Buildx
107-
uses: docker/setup-buildx-action@v1
117+
uses: docker/setup-buildx-action@v3
108118
-
109119
name: Download docker image
110-
uses: actions/download-artifact@v4.1.7
120+
uses: actions/download-artifact@v4
111121
with:
112122
name: php-avro-serde-${{ matrix.php.version }}
113123
-
@@ -122,75 +132,73 @@ jobs:
122132
composer update --no-interaction --no-scripts --no-ansi ${{ matrix.php.composer }}
123133
-
124134
name: Run Static analysis
125-
if: ${{ matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable' }}
135+
if: ${{ matrix.php.version == '8.3' && matrix.php.composer == '--prefer-stable' }}
126136
run: |
127137
chmod a+x bin/phpstan.phar bin/php-cs-fixer.phar
128138
docker run -i --rm --net=host --sig-proxy=true --pid=host \
129139
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
130-
bin/phpstan.phar analyse
140+
bin/phpstan.phar analyse --memory-limit 4G
131141
docker run -i --rm --net=host --sig-proxy=true --pid=host \
132142
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
133143
bin/php-cs-fixer.phar fix --config=.php-cs-fixer.dist.php --diff -v --dry-run --path-mode=intersection --allow-risky=yes \
134144
src test
135145
-
136146
name: Run PHPUnit
137-
if: ${{ !(matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable') }}
147+
if: ${{ !(matrix.php.version == '8.3' && matrix.php.composer == '--prefer-stable') }}
138148
run: |
139149
docker run -i --rm --net=host --sig-proxy=true --pid=host \
140150
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
141151
vendor/bin/phpunit --exclude-group integration
142152
-
143153
name: Run PHPUnit with Coverage Report
144-
if: ${{ matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable' }}
154+
if: ${{ matrix.php.version == '8.3' && matrix.php.composer == '--prefer-stable' }}
145155
run: |
146156
mkdir -p build
147157
docker run -i --rm --net=host --sig-proxy=true --pid=host \
148158
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
149159
-d xdebug.mode=coverage vendor/bin/phpunit --exclude-group integration --coverage-clover=build/coverage.clover --coverage-text
150160
- name: Publish code coverage
151-
if: ${{ matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
152-
uses: paambaati/codeclimate-action@v3.0.0
161+
if: ${{ matrix.php.version == '8.3' && matrix.php.composer == '--prefer-stable' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
162+
uses: paambaati/codeclimate-action@v9
153163
env:
154164
CC_TEST_REPORTER_ID: ${{secrets.CODE_CLIMATE_REPORTER_ID}}
155165
with:
156166
coverageLocations: |
157167
${{github.workspace}}/build/coverage.clover:clover
158168
confluent-integration:
159-
runs-on: ubuntu-20.04
169+
runs-on: ubuntu-22.04
160170
needs:
161171
- php-xdebug-docker
162172
strategy:
163173
matrix:
164174
confluent:
165175
-
166176
version: latest
167-
-
168-
version: 4.1.4
169177
-
170178
version: 5.5.2
171179
steps:
172180
-
173181
name: Download sources
174-
uses: actions/download-artifact@v4.1.7
182+
uses: actions/download-artifact@v4
175183
with:
176184
name: source
177185
-
178186
name: Set up Docker Buildx
179-
uses: docker/setup-buildx-action@v1
187+
uses: docker/setup-buildx-action@v3
180188
-
181189
name: Download docker image
182-
uses: actions/download-artifact@v4.1.7
190+
uses: actions/download-artifact@v4
183191
with:
184-
name: php-avro-serde-8.1
192+
name: php-avro-serde-8.3
185193
-
186194
name: Load docker image
187195
run: |
188-
docker load -i php-avro-serde-8.1.tgz
196+
docker load -i php-avro-serde-8.3.tgz
189197
-
190198
name: Install vendors
191199
run: |
192200
docker run -i --rm --net=host --sig-proxy=true --pid=host \
193-
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:8.1 \
201+
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:8.3 \
194202
composer update --no-interaction --no-scripts --no-ansi --prefer-stable
195203
-
196204
name: Run PHPUnit Integration
@@ -200,5 +208,5 @@ jobs:
200208
chmod a+x bin/wait-for-all.sh bin/wait-for-it.sh
201209
make platform
202210
docker run -i --rm --net=host --sig-proxy=true --pid=host \
203-
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:8.1 \
211+
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:8.3 \
204212
vendor/bin/phpunit --group integration

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ composer.lock
1212

1313
# Custom entries
1414
.php_cs*.cache
15-
.env
1615
variables.mk
1716
build/
1817
ocular.phar

.php-cs-fixer.dist.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all', 'strict' => false],
2424
'ordered_class_elements' => true,
2525
'php_unit_method_casing' => false,
26+
'fully_qualified_strict_types' => false,
2627
])
2728
->setFinder($finder)
28-
->setCacheFile('.php_cs.' . (string) getenv('PHP_VERSION') . '.cache')
29+
->setCacheFile('.php_cs.' . getenv('PHP_VERSION') . '.cache')
2930
->setUsingCache(true);

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
ARG PHP_VERSION=8.1
1+
ARG PHP_VERSION=8.3
22

33
FROM php:${PHP_VERSION}-cli-alpine
44

5-
ARG XDEBUG_VERSION=3.1.5
5+
ARG XDEBUG_VERSION=3.4.0
66

77
COPY --from=composer /usr/bin/composer /usr/bin/composer
88
RUN composer --version

Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# no buildin rules and variables
1+
# no builtin rules and variables
22
MAKEFLAGS =+ -rR --warn-undefined-variables
33

4-
.PHONY: composer-install composer-update phpstan cs-fixer examples docker run
4+
.PHONY: composer-install composer-update composer-update-lowest phpstan cs-fixer examples docker run
55

66
CONFLUENT_VERSION ?= latest
77
CONFLUENT_NETWORK_SUBNET ?= 172.68.0.0/24
@@ -10,15 +10,15 @@ SCHEMA_REGISTRY_IPV4 ?= 172.68.0.103
1010
KAFKA_BROKER_IPV4 ?= 172.68.0.102
1111
ZOOKEEPER_IPV4 ?= 172.68.0.101
1212
COMPOSER ?= bin/composer.phar
13-
COMPOSER_VERSION ?= 2.3.10
13+
COMPOSER_VERSION ?= 2.8.4
1414
PHP_STAN ?= bin/phpstan.phar
15-
PHP_STAN_VERSION ?= 1.8.2
15+
PHP_STAN_VERSION ?= 2.0.4
1616
PHP_CS_FIXER ?= bin/php-cs-fixer.phar
17-
PHP_CS_FIXER_VERSION ?= 3.9.5
17+
PHP_CS_FIXER_VERSION ?= 3.65.0
1818
PHPUNIT ?= vendor/bin/phpunit
1919
PHP ?= bin/php
20-
PHP_VERSION ?= 8.1
21-
XDEBUG_VERSION ?= 3.1.5
20+
PHP_VERSION ?= 8.3
21+
XDEBUG_VERSION ?= 3.4.0
2222
XDEBUG_OPTIONS ?= -d xdebug.mode=off
2323
export
2424

@@ -36,8 +36,11 @@ composer-install:
3636
composer-update:
3737
PHP_VERSION=$(PHP_VERSION) $(PHP) $(XDEBUG_OPTIONS) $(COMPOSER) update --prefer-stable --no-interaction --no-progress --no-scripts
3838

39+
composer-update-lowest:
40+
PHP_VERSION=$(PHP_VERSION) $(PHP) $(XDEBUG_OPTIONS) $(COMPOSER) update --prefer-lowest --no-interaction --no-progress --no-scripts
41+
3942
phpstan:
40-
PHP_VERSION=$(PHP_VERSION) $(PHP) $(XDEBUG_OPTIONS) $(PHP_STAN) analyse
43+
PHP_VERSION=$(PHP_VERSION) $(PHP) $(XDEBUG_OPTIONS) $(PHP_STAN) analyse --memory-limit 4G
4144

4245
cs-fixer:
4346
PHP_VERSION=$(PHP_VERSION) $(PHP) $(XDEBUG_OPTIONS) $(PHP_CS_FIXER) fix --config=.php-cs-fixer.dist.php --diff -v --dry-run \
@@ -72,14 +75,14 @@ install-phars:
7275
chmod a+x bin/phpstan.phar
7376

7477
platform:
75-
docker-compose down
76-
docker-compose up -d
78+
docker compose down
79+
docker compose up -d
7780
bin/wait-for-all.sh
7881

7982
clean:
8083
rm -rf build
81-
docker-compose down
84+
docker compose down
8285

8386
benchmark: platform
8487
PHP_VERSION=$(PHP_VERSION) $(PHP) $(XDEBUG_OPTIONS) ./vendor/bin/phpbench run benchmarks/AvroEncodingBench.php --report=aggregate --retry-threshold=5
85-
docker-compose down
88+
docker compose down

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ integrates FlixTech's [Schema Registry Client](https://github.com/flix-tech/sche
2727
This library is using the [composer package manager](https://getcomposer.org/) for PHP.
2828

2929
```bash
30-
composer require 'flix-tech/avro-serde-php:^1.6'
30+
composer require 'flix-tech/avro-serde-php:^2.2'
3131
```
3232

3333
## Quickstart

0 commit comments

Comments
 (0)