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

#9293 - incompatible return type php 8.1 #9301

Merged
merged 4 commits into from Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions php/src/Google/Protobuf/Internal/MapField.php
Expand Up @@ -135,6 +135,7 @@ public function getLegacyValueClass()
* @return object The stored element at given key.
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
Expand All @@ -153,6 +154,7 @@ public function offsetGet($key)
* @throws \ErrorException Invalid type for key.
* @throws \ErrorException Invalid type for value.
* @throws \ErrorException Non-existing key.
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
Expand Down Expand Up @@ -212,6 +214,7 @@ public function offsetSet($key, $value)
* @param object $key The key of the element to be removed.
* @return void
* @throws \ErrorException Invalid type for key.
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function offsetUnset($key)
Expand Down
4 changes: 4 additions & 0 deletions php/src/Google/Protobuf/Internal/MapFieldIter.php
Expand Up @@ -67,6 +67,7 @@ public function __construct($container, $key_type)
* Reset the status of the iterator
*
* @return void
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function rewind()
Expand All @@ -78,6 +79,7 @@ public function rewind()
* Return the element at the current position.
*
* @return object The element at the current position.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function current()
Expand All @@ -89,6 +91,7 @@ public function current()
* Return the current key.
*
* @return object The current key.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function key()
Expand Down Expand Up @@ -119,6 +122,7 @@ public function key()
* Move to the next position.
*
* @return void
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function next()
Expand Down
3 changes: 3 additions & 0 deletions php/src/Google/Protobuf/Internal/RepeatedField.php
Expand Up @@ -121,6 +121,7 @@ public function getLegacyClass()
* @return object The stored element at given index.
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
Expand All @@ -139,6 +140,7 @@ public function offsetGet($offset)
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
* @throws \ErrorException Incorrect type of the element.
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
Expand Down Expand Up @@ -211,6 +213,7 @@ public function offsetSet($offset, $value)
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException The element to be removed is not at the end of the
* RepeatedField.
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
Expand Down
4 changes: 4 additions & 0 deletions php/src/Google/Protobuf/Internal/RepeatedFieldIter.php
Expand Up @@ -70,6 +70,7 @@ public function __construct($container)
* Reset the status of the iterator
*
* @return void
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function rewind()
Expand All @@ -81,6 +82,7 @@ public function rewind()
* Return the element at the current position.
*
* @return object The element at the current position.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function current()
Expand All @@ -92,6 +94,7 @@ public function current()
* Return the current position.
*
* @return integer The current position.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function key()
Expand All @@ -103,6 +106,7 @@ public function key()
* Move to the next position.
*
* @return void
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function next()
Expand Down