Skip to content

Commit

Permalink
fixed PackageGoal::defaultNamespace to be more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Nov 15, 2015
1 parent 765fff8 commit 1541aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/goals/PackageGoal.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getNamespace()

public static function defaultNamespace($vendor, $package)
{
return $vendor . '\\' . strtr($package, '-', '\\');
return preg_replace('/[^a-zA-Z0-9\\\\]+/', '', $vendor . strtr("-$package", '-', '\\'));
}

public function getSrc()
Expand Down

0 comments on commit 1541aa7

Please sign in to comment.