Skip to content
Permalink
Browse files

[generate:module] Fixed dependencies validation (#4030)

  • Loading branch information...
harold20 authored and enzolutions committed May 10, 2019
1 parent 245767a commit 5a0508827eab1c7ecbb2f726a15fe4d55eb694a4
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Utils/Validator.php
@@ -16,6 +16,7 @@ class Validator
const REGEX_COMMAND_CLASS_NAME = '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]+Command$/';
const REGEX_CONTROLLER_CLASS_NAME = '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]+Controller$/';
const REGEX_MACHINE_NAME = '/^[a-z0-9_]+$/';
const REGEX_DEPENDENCY_NAME = '/^[a-z0-9_:]+$/';
// This REGEX remove spaces between words
const REGEX_REMOVE_SPACES = '/[\\s+]/';
// Max length to 32
@@ -177,7 +178,7 @@ public function validateMachineNameList($list)
$list = explode(',', $this->removeSpaces($list));
foreach ($list as $key => $module) {
if (!empty($module)) {
if (preg_match(self::REGEX_MACHINE_NAME, $module)) {
if (preg_match(self::REGEX_DEPENDENCY_NAME, $module)) {
$list_checked['success'][] = $module;
} else {
$list_checked['fail'][] = $module;

0 comments on commit 5a05088

Please sign in to comment.
You can’t perform that action at this time.