FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

zlib: fix test skipif sections by ndossche · Pull Request #22099 · php/php-src · GitHub

/ php-src Public

zlib: fix test skipif sections - #22099

Merged
ndossche merged 1 commit into
php:PHP-8.4from
ndossche:zlib-test-fix
May 24, 2026
Merged

zlib: fix test skipif sections#22099
ndossche merged 1 commit into
php:PHP-8.4from
ndossche:zlib-test-fix

Conversation

Copy link
Copy Markdown
Member

Depending on the specific PHP configuration, the regex matching for the version number in get_zlib_version() can fail.
On master, this results in deprecation warnings and subsequent test borks:

Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /work/php-src/ext/zlib/tests/gzgetc_basic.skip.php on line 3 [/work/php-src/ext/zlib/tests/gzgetc_basic.phpt]
Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /work/php-src/ext/zlib/tests/gzgetc_basic_1.skip.php on line 4

Since ZLIB_VERSION is a constant containing the version as a string, remove all this nonsense and just use the constant directly.

Found whilst working on my analyzer.

Depending on the specific PHP configuration, the regex matching for the
version number in get_zlib_version() can fail.
On master, this results in deprecation warnings and subsequent test
borks:
```
Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /work/php-src/ext/zlib/tests/gzgetc_basic.skip.php on line 3 [/work/php-src/ext/zlib/tests/gzgetc_basic.phpt]
Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /work/php-src/ext/zlib/tests/gzgetc_basic_1.skip.php on line 4
```

Since ZLIB_VERSION is a constant containing the version as a string,
remove all this nonsense and just use the constant directly.
ndossche merged commit 7727193 into php:PHP-8.4 May 24, 2026
19 checks passed
ndossche added a commit that referenced this pull request May 24, 2026
* PHP-8.5:
  zlib: fix test skipif sections (#22099)
pull Bot pushed a commit to ppker/php-src that referenced this pull request May 24, 2026
* PHP-8.4:
  zlib: fix test skipif sections (php#22099)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL