Skip to content

[12.x] Standardize regex delimiter in ObserverMakeCommand::parseModel#58777

Merged
taylorotwell merged 1 commit intolaravel:12.xfrom
mohammadRezaei1380:ObserverMakeCommand
Feb 12, 2026
Merged

[12.x] Standardize regex delimiter in ObserverMakeCommand::parseModel#58777
taylorotwell merged 1 commit intolaravel:12.xfrom
mohammadRezaei1380:ObserverMakeCommand

Conversation

@mohammadRezaei1380
Copy link
Contributor

The parseModel method currently uses a preg_match without standard delimiters:

preg_match('([^A-Za-z0-9_/\\\\])', $model)

This works, but it is not consistent with typical PHP and Laravel coding standards.

This PR updates the regex to use proper delimiters:

preg_match('/[^A-Za-z0-9_\/\\\\]/', $model)

No behavior is changed. This is purely a readability and consistency improvement.

…delimiters:

    preg_match('([^A-Za-z0-9_/\\\\])', $model)

This works, but it is not consistent with typical PHP and Laravel coding standards.

This PR updates the regex to use proper delimiters:

    preg_match('/[^A-Za-z0-9_\/\\\\]/', $model)

No behavior is changed. This is purely a readability and consistency improvement.
@taylorotwell taylorotwell merged commit c8cc62f into laravel:12.x Feb 12, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants