Skip to content

PSR-4 loader conflict with older implementation #3852

@Rarst

Description

@Rarst

Hello from WordPress land with crazy edge case.

The user of one of plugins had reported following error:

Fatal error: Call to undefined method Composer\Autoload\ClassLoader::setPsr4() in C:\xampp\htdocs\mywebsite.com\wp-content\plugins\mailchimp-top-bar\vendor\composer\autoload_real.php on line 33

The working theory is that another plugin present in the system is also using Composer autoload, but at old pre-PSR-4 version.

The logical attempt was to try optimized autoload, but turns out that despite all the classes getting compiled into classmap file, the PSR-4 instructions are still retained and loaded (thus still causing crash).

cc @dannyvankooten @coenjacobs

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