Skip to content

"Fatal error: Cannot redeclare function" when using polyfill and extension together (2.0) #113

@arokettu

Description

@arokettu
Fatal error: Cannot redeclare function Ds\seq() in .../vendor/php-ds/php-ds/src/functions.php on line 7

Function declarations should be wrapped with if (!function_exists(...)):

if (!function_exists('Ds\\seq')) {
    function seq(iterable $values = []): Seq
    {
        return new Seq($values);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions