Skip to content

Fatal error when clue/php-stream-filter is loaded in 2 different projects #26

@strategio

Description

@strategio

We have several projects that runs together, and more than one project is using clue/php-stream-filter. This causes a fatal error:

Fatal error: Cannot redeclare Clue\StreamFilter\append() (previously declared in...

The reason is that we will load the same functions in the same namespace at 2 different places.

Before to define a function, we need to check if it does not already exists, like in this project https://github.com/tightenco/collect/blob/laravel-5.8-ongoing/src/Collect/Support/helpers.php#L7.

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