Skip to content

Commit 712f900

Browse files
Fixes issues with relative paths
1 parent 608b7da commit 712f900

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/FactoryMuffin.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,17 @@ public function define($name)
314314
public function loadFactories($paths)
315315
{
316316
foreach ((array) $paths as $path) {
317-
if (!is_dir($path)) {
317+
$real = realpath($path);
318+
319+
if (!$real) {
318320
throw new DirectoryNotFoundException($path);
319321
}
320322

321-
$this->loadDirectory($path);
323+
if (!is_dir($real)) {
324+
throw new DirectoryNotFoundException($real);
325+
}
326+
327+
$this->loadDirectory($real);
322328
}
323329

324330
return $this;

0 commit comments

Comments
 (0)