Skip to content

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

Open
@nervo

Description

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 ?

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