Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassLoader type #88

Closed
Androlax2 opened this issue Nov 23, 2021 · 9 comments
Closed

ClassLoader type #88

Androlax2 opened this issue Nov 23, 2021 · 9 comments
Labels
Invalid This doesn't seem right

Comments

@Androlax2
Copy link

Hello,

Got a bug on another repository : Rareloop/lumberjack-core#35

Is this from here or from this repo ?

@Androlax2 Androlax2 added the Bug Something isn't working label Nov 23, 2021
@Ocramius
Copy link
Member

Possibly related to a combination of incompatible dependencies.

Check:

  • your composer.lock, specifically which versions of this library you have installed
  • your composer --version

@Androlax2
Copy link
Author

Hello @Ocramius

Here are the versions locked in my composer.lock for each laminas package :

"name": "laminas/laminas-diactoros",
"version": "2.8.0",
"name": "laminas/laminas-zendframework-bridge",
"version": "1.4.0",

And my composer version :

Composer version 2.1.12

@Androlax2
Copy link
Author

Okay, I found the incompatibility, It don't come from here, see: wp-media/imagify-plugin#639

@boesing
Copy link
Member

boesing commented Dec 21, 2021

Hm, with composer v2 and composer v3, the vendor/autoload.php always returns an instance of Composer\Autoload\ClassLoader.

Somehow, your error message states that this is not the case. Thats kinda weird but might be solved with #90 (even tho it is not supposed to solve it that way).

Maybe double-checking the plugin you are referring to might help to find the reason on why the autoloader file does not return an instance of Composer\Autoload\ClassLoader.

@Androlax2
Copy link
Author

Yeah for some reason vendor/autoload.php return an instance of Composer\Autoload\ClassLoader but with some extra letters and numbers on the Autoload namespace

@Androlax2
Copy link
Author

Okay, I found the plugin where came the problem : https://github.com/dangoodman/composer-for-wordpress/blob/master/ComposerForWordpress.php

@boesing
Copy link
Member

boesing commented Dec 21, 2021

Okay, closing here as this is unrelated to this repository.

No one should mess around with composer internals imho.
Thanks for pointing this out, @Androlax2!

@boesing boesing closed this as completed Dec 21, 2021
@boesing boesing added Invalid This doesn't seem right and removed Bug Something isn't working Awaiting Author Updates labels Dec 21, 2021
@Androlax2
Copy link
Author

If this is really needed for the plugin, maybe Composer could implement an interface on ClassLoader so you could add that interface in the type ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants