Skip to content

Ensure ValidationEmailRuleTest skips tests requiring the intl extension when unavailable#54918

Merged
taylorotwell merged 1 commit intolaravel:11.xfrom
alikhosravidev:test/validation-rules
Mar 6, 2025
Merged

Ensure ValidationEmailRuleTest skips tests requiring the intl extension when unavailable#54918
taylorotwell merged 1 commit intolaravel:11.xfrom
alikhosravidev:test/validation-rules

Conversation

@alikhosravidev
Copy link
Copy Markdown
Contributor

@alikhosravidev alikhosravidev commented Mar 6, 2025

This PR adds the #[RequiresPhpExtension('intl')] attribute to the testValidateMxRecord and testCombiningRules methods in the ValidationEmailRuleTest class.

These methods rely on the intl PHP extension because the Email class validateMxRecord method depends on it. The attribute ensures the tests are only executed if the required extension is available, preventing potential test failures in environments without the extension.

@crynobone
Copy link
Copy Markdown
Member

Can you send this to 11.x since it is still under bug releases.

@alikhosravidev alikhosravidev force-pushed the test/validation-rules branch from 512b2d2 to bb31829 Compare March 6, 2025 10:56
@alikhosravidev alikhosravidev changed the base branch from 12.x to 11.x March 6, 2025 10:57
@alikhosravidev
Copy link
Copy Markdown
Contributor Author

Can you send this to 11.x since it is still under bug releases.

I've updated the PR to target the 11.x branch as requested.

);
}

#[RequiresPhpExtension('intl')]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need to import the class

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

…ord` and `testCombiningRules` due to intl extension dependency.
@alikhosravidev alikhosravidev force-pushed the test/validation-rules branch from bb31829 to 8f4b54d Compare March 6, 2025 11:27
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.

3 participants