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

Autoload : Rogue loaders should *NOT* be called statically #673

Open
nervo opened this issue Dec 27, 2021 · 0 comments · May be fixed by #674
Open

Autoload : Rogue loaders should *NOT* be called statically #673

nervo opened this issue Dec 27, 2021 · 0 comments · May be fixed by #674

Comments

@nervo
Copy link

nervo commented Dec 27, 2021

In https://github.com/Luracast/Restler/blob/master/src/AutoLoader.php#L293 i see that autoloaders methods are called statically

$b::$loader[1]($className)

If you have a look on composer (https://github.com/composer/composer/blob/f509c41280768b1d3047271ec5b50da33184d98d/src/Composer/Autoload/ClassLoader.php#L425) you can see that "loadClass" method is NOT static.

In fact, this syntax generates a fatal error Access to undeclared static property: Composer\Autoload\ClassLoader::$loader

I'd like to understand why such a static call ? Is there on earth an autoloader whith static methods ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant