Skip to content

Functions file causes collisions if package is used more than once #138

@schlessera

Description

@schlessera

The functions.php file is pulled in throught the Composer autoloader file mechanism: https://github.com/beberlei/assert/blob/master/composer.json#L20

If this package is used more than once in one PHP session (my use case is several WordPress plugins including it), this causes a fatal error:

Fatal error: Cannot redeclare Assert\that() [...]

I know that Composer should be used at the site level, not multiple times in one site. However, this could easily be fixed to allow for that use case, too, which would at least simplify the development process.

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