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

Utility\FilteredIteratorTest: split up test class + minor improvements to FilteredIterator #729

Merged

Commits on Apr 25, 2022

  1. Configuration menu
    Copy the full SHA
    2b23239 View commit details
    Browse the repository at this point in the history
  2. Utility\FilteredIterator\FilteredIteratorTest: rename to `Serializati…

    …onTest`
    
    ... as the remaining test relates directly to the serialization methods.
    
    Includes renaming the test method.
    jrfnl committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    290c76d View commit details
    Browse the repository at this point in the history
  3. FilteredIterator: improve method order

    ... by grouping the two `[__]unserialize()` methods together to make it more obvious that both have been implemented (the magic method for PHP 7.4+, the Serializable interface method for PHP < 7.4).
    
    Includes updating the documentation to reflect this as well.
    jrfnl committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    6567025 View commit details
    Browse the repository at this point in the history
  4. FilteredIterator: remove redundant method

    As per the PHP documentation:
    
    > The Serializable interface
    >
    > Interface for customized serializing.
    > **Classes that implement this interface no longer support `__sleep()` and `__wakeup()`.**
    
    Ref: https://www.php.net/manual/en/class.serializable.php
    
    > Note:
    > If both `__unserialize()` and `__wakeup()` are defined in the same object, only `__unserialize()` will be called. `__wakeup()` will be ignored.
    
    Ref: https://www.php.net/manual/en/language.oop5.magic.php#object.unserialize
    
    Based on the above, the `wake_up()` method is redundant and has been for quite a while.
    jrfnl committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    4470b3a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c8676b9 View commit details
    Browse the repository at this point in the history