Skip to content

Axel\Module namespace not found #9

@IamSAB

Description

@IamSAB

It's about the PSR4 module you add in the axel.php constructor:

$this->modules[] = new Module\PSR4(ltrim(str_replace(getcwd(), '', __DIR__), DIRECTORY_SEPARATOR) . '/module', 'Axel\\Module');

It will have the wrong base path as the ltrim makes the path relative, cause it to be prepended again with a getcwd() issued in the PSR4 class as without a leading '/' it will enter the 'else'

if ($baseDir[0] == '/' || $baseDir[1] == ':') $this->baseDir = $baseDir;
else $this->baseDir = getcwd() . DIRECTORY_SEPARATOR . str_replace(['./'], '', $baseDir);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions