Skip to content

Not compatible with PHP >=7.1.0 as claimed in composer package (aka incompatible with PHP >= 8.0) #17

@DoItWithASmile

Description

@DoItWithASmile

I am getting the following error when using ImmArray:

Call to undefined method SplFixedArray::rewind()

An internet search revealed this change notice of PHP 8.0:

  . SplFixedArray is now an IteratorAggregate and not an Iterator.
    SplFixedArray::rewind(), ::current(), ::key(), ::next(), and ::valid()
    have been removed. In their place, SplFixedArray::getIterator() has been
    added. Any code which uses explicit iteration over SplFixedArray must now
    obtain an Iterator through SplFixedArray::getIterator(). This means that
    SplFixedArray is now safe to use in nested loops.

(source: https://github.com/php/php-src/blob/e4e2541c1a90daf708ab1ee4d44f2ab2883ce84b/UPGRADING#L515-L520)

Therefore I deduct that immutable.php is not compatible with PHP 8.0 and above, as claimed in package metadata.
(I am using the package via composer. there ">=7.1.0" is claimed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions