Skip to content

Commit

Permalink
Merge pull request #15 from DocLM/bugfix/classnames
Browse files Browse the repository at this point in the history
Support all valid PHP classnames while generating factories
  • Loading branch information
taylorotwell authored Dec 27, 2022
2 parents 5edc7e7 + a709863 commit 51363af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function load($path)
*/
protected function isLegacyFactory(string $path)
{
return ! preg_match("/class\s[A-Z+a-z]+ extends Factory/", file_get_contents($path));
return ! preg_match("/class\s[a-zA-Z0-9_\x80-\xff]+ extends Factory/", file_get_contents($path));
}

/**
Expand Down

0 comments on commit 51363af

Please sign in to comment.