Repository navigation
Conversation
- Require PHP ^8.1 (was ^7.2), geeklab/toolbox ^3.0 and Codeception 5; declare the dom, json and simplexml extensions, and suggest yaml - Run the Codeception unit suite on PHP 8.1-8.5 with the yaml extension, plus PHPStan (level 5) and PSR-12 on PHP 8.5 - Remove .travis.yml and the dead Travis badge - Fix PHPBinary::decode() on PHP 8.3+: unserialize() now warns about trailing data, which this format always has, so decoding always failed and then returned null from an array method (TypeError) - Pass '' instead of null as DOMDocument's encoding (deprecated in 8.1) - Fix what PHPStan reported: unreachable breaks, a dead null check, and wrong docblock types in XML - Apply PSR-12 formatting (phpcbf) - Regenerate the decode_xml snapshot in the snapshot library's current format (same data) and add the missing encode_xml_version snapshot Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PHP ^8.1 -> ^8.3; CI matrix is now 8.3-8.5 - Codeception 5.3, module-asserts 3.3, snapshot assertions 4 -> 5, PHP_CodeSniffer 3 -> 4 - Mark tests with #[Test] attributes instead of /** @test */ docblocks. PHPUnit 12+ (which these versions bring in) no longer reads annotations, so Codeception found 0 tests. - Update the igbinary phpcs:ignore for PHP_CodeSniffer 4's renamed sniff (NotCamelCaps -> NotPascalCase) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Added a commit that raises the minimum to PHP 8.3, matching the other GeekLab packages, and updates the dev tools:
Tests marked with attributes: the newer packages bring in PHPUnit 12+, which no longer reads PHP_CodeSniffer 4 renamed the class-name rule, so the 🤖 Generated with Claude Code |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Travis no longer runs free builds for open source, and the package still required PHP
^7.2, so it couldn't be installed on any supported PHP version. This brings it up to date, matching the other GeekLab packages.Requirements
^8.1(was^7.2),geeklab/toolbox^3.0(was^1.0), Codeception 5 and current snapshot assertions.ext-dom,ext-jsonandext-simplexml. Listsext-yamlundersuggest, since only YAML translation needs it.CI
yamlextension installed..travis.ymland the Travis badge. Adds CI, Packagist, PHP version and PHPStan badges.Bug fixes
PHPBinary::decode()always failed on PHP 8.3+. PHP 8.3 madeunserialize()warn about data after the value, and this format always has some: the next key/value pairs. The warning was treated as failure, anddecode()then returnednullfrom a method declared to returnarray, throwing aTypeError. That warning is now ignored; each value is still verified by re-serializing it. Failures return[], like the method's other invalid-input paths.XMLpassednullasDOMDocument's encoding, which is deprecated since PHP 8.1. It now passes'', which PHP convertednullto anyway.Cleanup from PHPStan and PSR-12
breaks in the factory and a deadnullcheck inPHPBinary::encode().strcmp($key, intval($key))becameis_int($key), which is equivalent for array keys.XML.phpcbf. Theigbinaryclass name is excluded, since renaming it would break anyone using it directly.Snapshots: the newer snapshot library stores array snapshots as YAML, so
decode_xml's snapshot was regenerated; I checked it holds the same data as the old PHP-format one.encode_xml_versionnever had a snapshot. The new one is the correct output:<?xml version="1.1"?>with an empty<root/>.Locally on PHP 8.5, all tests pass except the 2 YAML tests, because this machine doesn't have the extension. CI installs it.
🤖 Generated with Claude Code