Skip to content

Misc code improvements and optimizations #49241

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
Feb 5, 2023

Conversation

javiereguiluz
Copy link
Member

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Made with PhpStorm and reviewed manually.

@javiereguiluz javiereguiluz added this to the 6.3 milestone Feb 4, 2023
@javiereguiluz javiereguiluz requested a review from xabbuh as a code owner February 4, 2023 15:46
@@ -77,7 +77,7 @@ public static function register($class)
if (0 < strpos($class, '\\Tests\\')) {
$ns = str_replace('\\Tests\\', '\\', $class);
$mockedNs[] = substr($ns, 0, strrpos($ns, '\\'));
} elseif (0 === strpos($class, 'Tests\\')) {
} elseif (str_starts_with($class, 'Tests\\')) {
Copy link
Member

Choose a reason for hiding this comment

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

str_starts_with() does not exist on PHP 7 which the PHPUit bridge still supports.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for reviewing. I've reverted this change.

@fabpot
Copy link
Member

fabpot commented Feb 5, 2023

Thank you @javiereguiluz.

@fabpot fabpot merged commit c05bd6c into symfony:6.3 Feb 5, 2023
@javiereguiluz javiereguiluz deleted the misc_tweaks branch February 5, 2023 09:10
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