Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/PathGenerator/Psr4PathGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public function __construct(array $namespaces)
throw new PathGeneratorException("A non-empty PSR-4 prefix must end with a namespace separator, you entered '$namespace'.");
}
if (! is_dir($dir)) {
throw new PathGeneratorException("The folder '$dir' does not exist.");
if (!mkdir($dir, 0777, true)) {
throw new PathGeneratorException("The folder '$dir' does not exist and failed to create.");
}
}
if (! is_writable($dir)) {
throw new PathGeneratorException("The folder '$dir' is not writable.");
Expand Down