Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 8.1 type hints for ArrayAccess, IteratorAggregate, and Countable #247

Merged
merged 4 commits into from Dec 11, 2021

Conversation

neildaniels
Copy link
Contributor

PHP 8.1 added type hints to the ArrayAccess, IteratorAggregate, and Countable interfaces. This PR matches to type hints to avoid signature mismatch errors.

@codecov-commenter
Copy link

Codecov Report

Merging #247 (3973ff1) into 4.0 (e330e8f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##                4.0     #247   +/-   ##
=========================================
  Coverage     84.45%   84.45%           
- Complexity     2166     2168    +2     
=========================================
  Files           196      196           
  Lines          5454     5454           
=========================================
  Hits           4606     4606           
  Misses          848      848           
Impacted Files Coverage Δ
lib/Tmdb/Model/Common/GenericCollection.php 74.28% <100.00%> (+0.24%) ⬆️
lib/Tmdb/Client.php 90.58% <0.00%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e330e8f...3973ff1. Read the comment docs.

@neildaniels
Copy link
Contributor Author

I tempered the type hint changes (namely, avoiding the use of mixed) to remain backwards compatible but still avoid throwing errors on PHP 8.1.

@wtfzdotnet
Copy link
Member

Cheers @neildaniels , thanks! :-)

@wtfzdotnet wtfzdotnet merged commit 0349e2c into php-tmdb:4.0 Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants