-
Notifications
You must be signed in to change notification settings - Fork 25
Fixed creating module with namespace #69
Fixed creating module with namespace #69
Conversation
Proper directory structure is created for modules with namespace eg. 'MyNamespace\MyModule'
I have another though about this issue and maybe we should allow only alphanumeric characters in module name. Allowing namespace separator causes issues and requires changes also in @weierophinney what do you think? |
@@ -94,7 +99,7 @@ private function createDirectoryStructure(string $modulePath, string $moduleName | |||
)); | |||
} | |||
|
|||
if (! mkdir($modulePath)) { | |||
if (! mkdir($modulePath, 0777, true)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this (0777) be a security issue? I think, we should throw an exception only about file permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hkulekci These are the default permissions when calling mkdir()
; they're used here simply because we're also passing the third argument, the flag to recursively create the path.
@webimpress While I think that idea can be useful, we can address it with a later patch. This one looks good, though! |
Fixed creating module with namespace
In new 1.0.0rc1 section.
Thanks, @webimpress |
Proper directory structure is created for modules with namespace
eg. 'MyNamespace\MyModule'