Skip to content

Commit 5d29dca

Browse files
Rachel Goldfingercopybara-github
authored andcommitted
Raise minimum php version to 8.2.0. Drop tests for 8.1.
#test-continuous PiperOrigin-RevId: 856246964
1 parent c940f01 commit 5d29dca

File tree

7 files changed

+19
-31
lines changed

7 files changed

+19
-31
lines changed

.github/workflows/test_php.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ jobs:
2929
fail-fast: false # Don't cancel all jobs if one fails.
3030
matrix:
3131
include:
32-
- name: 8.1 Optimized
33-
version: "8.1.14"
34-
version-short: "8.1"
32+
- name: 8.2 Optimized
33+
version: "8.2.2"
34+
version-short: "8.2"
3535
command: composer test && composer test_c
36-
- name: 8.1 Debug
37-
version: 8.1.14-dbg
38-
version-short: "8.1"
36+
- name: 8.2 Debug
37+
version: 8.2.2-dbg
38+
version-short: "8.2"
3939
command: composer test && composer test_c
40-
- name: 8.1 Memory Leak
41-
version: 8.1.14-dbg
42-
version-short: "8.1"
40+
- name: 8.2 Memory Leak
41+
version: 8.2.2-dbg
42+
version-short: "8.2"
4343
# Run specialized memory leak & multirequest tests.
4444
command: composer test_c && tests/multirequest.sh && tests/memory_leak_test.sh
4545
continuous-only: true
46-
- name: 8.1 Valgrind
47-
version: 8.1.14-dbg
48-
version-short: "8.1"
46+
- name: 8.2 Valgrind
47+
version: 8.2.2-dbg
48+
version-short: "8.2"
4949
command: composer test_valgrind
5050
continuous-only: true
5151
- name: 8.3 Optimized
@@ -65,7 +65,7 @@ jobs:
6565
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
6666
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
6767
with:
68-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/php:8.0.1-${{ matrix.version }}-b77fdae6d4771789dfc66a56bf8d806354e8011a
68+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/php:8.0.1-${{ matrix.version }}-9626718698895971df3953d4aa2321d7425f3c5f
6969
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
7070
bazel-cache: php_linux/${{ matrix.version }}
7171
bash: |
@@ -83,7 +83,7 @@ jobs:
8383
strategy:
8484
fail-fast: false # Don't cancel all jobs if one fails.
8585
matrix:
86-
version: ['8.1']
86+
version: ['8.2']
8787
suffix: [ '', '-zts']
8888
test: ['test', 'test_c']
8989
exclude:
@@ -102,7 +102,7 @@ jobs:
102102
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Linux 32-bit ${{ matrix.version}}${{ matrix.suffix_name }}${{ matrix.test_name }}
103103
runs-on: ubuntu-22-4core
104104
env:
105-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/32bit@sha256:429f924aec315704b4233adcbe4b29006116f27769db98acd176b9eb69c31299
105+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/32bit@sha256:133077411f272f05164d49d36d51491bdf2915aaa7d4103caa1c9b370b11d29e
106106
steps:
107107
- name: Checkout pending changes
108108
if: ${{ !matrix.continuous-only || inputs.continuous-run }}

.github/workflows/test_php_ext.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
5454
fail-fast: false # Don't cancel all jobs if one fails.
5555
matrix:
5656
include:
57-
- version: "8.1"
58-
continuous-only: true
5957
- version: "8.2"
6058
continuous-only: true
6159
- version: "8.3"

php/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"homepage": "https://developers.google.com/protocol-buffers/",
77
"license": "BSD-3-Clause",
88
"require": {
9-
"php": ">=8.1.0"
9+
"php": ">=8.2.0"
1010
},
1111
"require-dev": {
1212
"phpunit/phpunit": ">=5.0.0 <8.5.27"

php/composer.json.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"homepage": "https://developers.google.com/protocol-buffers/",
77
"license": "BSD-3-Clause",
88
"require": {
9-
"php": ">=8.1.0"
9+
"php": ">=8.2.0"
1010
},
1111
"require-dev": {
1212
"phpunit/phpunit": ">=5.0.0 <8.5.27"

php/ext/google/protobuf/protobuf.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515

1616
upb_DefPool* get_global_symtab();
1717

18-
// In PHP 8.1, mismatched tentative return types emit a deprecation notice.
19-
// https://wiki.php.net/rfc/internal_method_return_types
20-
//
21-
// When compiling for earlier php versions, the return type is dropped.
22-
#if PHP_VERSION_ID < 80100
23-
#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX( \
24-
name, return_reference, required_num_args, type, allow_null) \
25-
ZEND_BEGIN_ARG_INFO_EX(name, return_reference, required_num_args, allow_null)
26-
#endif
27-
2818
ZEND_BEGIN_ARG_INFO(arginfo_void, 0)
2919
ZEND_END_ARG_INFO()
3020

php/ext/google/protobuf/template_package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<dependencies>
3131
<required>
3232
<php>
33-
<min>8.1.0</min>
33+
<min>8.2.0</min>
3434
</php>
3535
<pearinstaller>
3636
<min>1.4.0</min>

php/tests/PreviouslyGeneratedClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class PreviouslyGeneratedClassTest extends TestBase
1212
public function testPrefixForReservedWords()
1313
{
1414
// In newer versions of PHP, we cannot reference the old class name.
15-
if (version_compare(phpversion(), '8.1.0', '>=')) return;
15+
if (version_compare(phpversion(), '8.2.0', '>=')) return;
1616

1717
// For older versions of PHP, verify that we can reference the
1818
// original class name.

0 commit comments

Comments
 (0)