fix: restore the 1.4.2 public API - #633
Open
SNO7E-G wants to merge 1 commit into
Open
Conversation
1.5.0 introduced backward-incompatible changes in a minor release (google#628). This restores src/ and tests/ to the 1.4.2 tag verbatim, so the library is behaviourally identical to 1.4.2 for every consumer. Verification: `git diff 1.4.2 -- src` is empty. There are no source changes to review, and no version constant is touched here, since choosing and tagging the release is the maintainers' call. Restored by reverting rather than by re-implementing: - untyped public signatures with phpdoc, no native param or return types - no return type on the RequestMethod::submit() interface - non-readonly Response and RequestParameters - the Curl and Socket wrapper classes and their ?Curl / ?Socket dependency-injection constructors, so the documented pattern for testing a custom RequestMethod works again 1.4.2 predates the phpstan level max and php-cs-fixer setup this repo now runs in CI, and reports 191 pre-existing errors, 62 of them in src/. Many of those, such as offset access on mixed and resource parameters, cannot be resolved with annotations alone. Changing code in a revert would defeat the purpose of the revert, so they are recorded in phpstan-baseline.neon instead. The follow-up hardening removes entries from it as it adds the guards that fix them. php-cs-fixer needed no changes to the 1.4.2 sources. phpunit 52 passing, phpstan clean against the baseline, php-cs-fixer clean.
SNO7E-G
marked this pull request as draft
July 27, 2026 22:07
SNO7E-G
marked this pull request as ready for review
July 27, 2026 22:24
|
@SNO7E-G thanks for this - I've reviewed There are changes to examples files that were after 1.4.2 but before / separate to the code changes, and the changes to the CI / phpstan config, I agree that it's appropriate to keep those and to add the phpstan baseline to resolve the warnings. @rowan-m if you're happy with this would it be possible to get it merged and released as 1.5.1 to fix the issues with 1.5.0, and as a baseline for future improvements? |
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.
1.5.0 introduced backward-incompatible changes in a minor release (#628). This restores src/ and tests/ to the 1.4.2 tag verbatim, so the library is behaviourally identical to 1.4.2 for every consumer.
Verification:
git diff 1.4.2 -- srcis empty. There are no source changes to review.Restored by reverting rather than by re-implementing:
1.4.2 predates the phpstan level max and php-cs-fixer setup; this repo now runs in CI, and reports 191 pre-existing errors, 62 of them in src/. Many of those, such as offset access on mixed and resource parameters, cannot be resolved with annotations alone. Changing code in a revert would defeat the purpose of the revert, so they are recorded in phpstan-baseline.neon instead. The follow-up hardening removes entries from it as it adds the guards that fix them. php-cs-fixer needed no changes to the 1.4.2 sources.
phpunit 52 passing, phpstan clean against the baseline, php-cs-fixer clean.