PHP 8.4 compatibility for 1.2.* releases #36
Merged
+8
−3
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.
What's in this PR?
This PR improves the version 1.2.1 to be compatible with PHP 8.4.
Why?
Microsoft library for communicating with their Graph API (that is a whole MS ecosystem) in PHP relies on this library with version 1.2. Update to 1.3 is not possible as it is built on the generic annotations, which was introduced in the 1.2 version and reverted in the 1.3 version. The potential upgrade to 1.3 version would break the whole library API (the static analysis would not know the actual return types of the promises and therefore the programmer's IDEs would be lost as well).
As this prevents many people of upgrading to PHP 8.4, the easiest solution to this problem is to create new version 1.2.2 compatible with PHP 8.4 (and no other change). All other solutions are just a no-go for one reason or another – for more context and reasoning, please read this PR microsoft/kiota-php#53.
Only for context - the library we're talking about is microsoft/microsoft-graph. It relies on the microsoft/microsoft-graph-core, which relies through the many packages on microsoft/kiota-abstractions, which is built around http/promise 1.2.* with abstractions.
Checklist