-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
- bug report? yes
- feature request? no
- version: 3.0.2
Description
In Nette application bootstrap, I call:
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->addDirectory(__DIR__ . '/../lib')
->excludeDirectory(__DIR__ . '/../lib/tcpdf')
->register();
but exclusion does not work because on line
robot-loader/src/RobotLoader/RobotLoader.php
Line 231 in c3b0c97
$path = str_replace('\\', '/', $dir->getPathname()); |
leads to
$disallow === [
"D:/Web/project/lib/tcpdf" => true,
];
$path === "D:/Web/project/app/../lib/tcpdf";
I have two solutions in my mind:
- Convert path to realpath in
addDirectory()
and:
a) ignore missing paths
b) throw an exception on missing paths (BC break probability) - Modify mentioned line from
$dir->getPathname()
to$dir->getRealPath()
.
Which fix would you prefer? Another one?
Metadata
Metadata
Assignees
Labels
No labels