Skip to content

[Console] Update questionhelper.rst #16869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

issamkhadiri1989
Copy link
Contributor

hello

the example shows a warning (preg_match(): No ending delimiter'/' found). to solve it, we need to add the / at the end of the regex.

@carsonbot carsonbot added this to the 6.0 milestone Jun 12, 2022
Copy link
Contributor

@mdoutreluingne mdoutreluingne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
(note for the mergers: this can be merged in 5.4)

@javiereguiluz javiereguiluz modified the milestones: 6.0, 5.4 Jun 13, 2022
@carsonbot carsonbot changed the title Update questionhelper.rst [Console] Update questionhelper.rst Jun 13, 2022
hello

the example shows a warning (preg_match(): No ending delimiter'/' found). to solve it, we need to add the ``/`` at the end of the regex.
@javiereguiluz
Copy link
Member

Thank you Issam.

@javiereguiluz javiereguiluz merged commit 4449493 into symfony:5.4 Jun 13, 2022
@@ -410,7 +410,7 @@ invalid answer and will only be able to proceed if their input is valid.

$question = new Question('Please enter the name of the bundle', 'AcmeDemoBundle');
$validation = Validation::createCallable(new Regex([
'pattern' => '/^[a-zA-Z]+Bundle$',
'pattern' => '/^[a-zA-Z]+Bundle$/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use '#^[a-zA-Z]+Bundle$#' so that it doesn't look like an URI or file path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree. Thanks @alexislefebvre for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants