Skip to content

Commit

Permalink
fix: php 8.2 dynamic property warning in MapFieldIter (#11485)
Browse files Browse the repository at this point in the history
addresses #11243

Defines `$key_type` in `MapFieldIter`, so as not to trigger PHP 8.2 warning. Note that this will change the visibility of `$key_type` from public in previous versions to private in this version. This is a breaking change, but anyone using `$key_type` in this way is misusing the library, so I think it's acceptable.

Closes #11485

COPYBARA_INTEGRATE_REVIEW=#11485 from bshaffer:fix-php-82-dynamic-warning-in-MapFieldIter b45c34d
PiperOrigin-RevId: 501040413
  • Loading branch information
bshaffer authored and copybara-github committed Jan 10, 2023
1 parent 5330a36 commit 8e636d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php/src/Google/Protobuf/Internal/MapFieldIter.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class MapFieldIter implements \Iterator
*/
private $container;

/**
* @ignore
*/
private $key_type;

/**
* Create iterator instance for MapField.
*
Expand Down

0 comments on commit 8e636d5

Please sign in to comment.