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

PHP 8.0: ensure parameter names are aligned with PHP native param names #560

Merged
merged 3 commits into from
Sep 23, 2021

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 18, 2021

PHP 8.0: ensure parameter names are aligned with PHP native param names [1]

... for the required methods declared in classes implementing the ArrayAccess interface, either directly or by extending a class which implements the interface.

This prevents issues with when the PHP 8.0 named parameters feature is used.

Refs:

QA: use consistent param/variable names throughout classes

With the $key parameters being changed to $offset in the previous commit, for consistency, it makes the code clearer to use the same name in other places in these classes which also use the $offset, but were calling it $key.

PHP 8.0: ensure parameter names are aligned with PHP native param names [2]

... for the magic __unserialize() method and the serialize() method which is overloaded from the extended ArrayIterator class.

This prevents issues with when the PHP 8.0 named parameters feature is used.

Refs:

Related to #533

…es [1]

... for the required methods declared in classes implementing the `ArrayAccess` interface, either directly or by extending a class which implements the interface.

This prevents issues with when the PHP 8.0 named parameters feature is used.

Refs:
* https://www.php.net/manual/en/class.arrayaccess.php
* https://wiki.php.net/rfc/named_params
With the `$key` parameters being changed to `$offset` in the previous commit, for consistency, it makes the code clearer to use the same name in other places in these classes which also use the `$offset`, but were calling it `$key`.
…es [2]

... for the magic `__unserialize()` method and the `serialize()` method which is overloaded from the extended `ArrayIterator` class.

This prevents issues with when the PHP 8.0 named parameters feature is used.

Refs:
* https://www.php.net/manual/en/class.arrayiterator.php
* https://www.php.net/manual/en/language.oop5.magic.php#object.unserialize
* https://wiki.php.net/rfc/named_params
@jrfnl jrfnl added this to the 2.0.0 milestone Sep 18, 2021
@schlessera schlessera merged commit a2cbe24 into develop Sep 23, 2021
@schlessera schlessera deleted the feature/php-8.0-named-parameters-review branch September 23, 2021 09:58
@jrfnl jrfnl mentioned this pull request Nov 7, 2021
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants