-
-
Notifications
You must be signed in to change notification settings - Fork 3k
fix: Wrong encoded string value constants for ANSI SQL compatibility (6.x) #15324
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request standardizes string literal quoting in SQL queries by replacing double quotes with single quotes for the string value "email" across multiple files to improve ANSI SQL compatibility.
- Updated SQL join conditions to use single quotes instead of double quotes for string literals
- Affected files span EmailBundle and PageBundle repositories and helper classes
- Changes maintain existing functionality while improving SQL standard compliance
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
app/bundles/PageBundle/Entity/RedirectRepository.php | Updated join condition in getMostHitEmailRedirects to use single quotes for 'email' string literal |
app/bundles/EmailBundle/Stats/Helper/UnsubscribedHelper.php | Changed join condition in generateStats to use single quotes for 'email' string literal |
app/bundles/EmailBundle/Stats/Helper/BouncedHelper.php | Modified join condition in generateStats to use single quotes for 'email' string literal |
app/bundles/EmailBundle/Entity/StatRepository.php | Updated leftJoin condition in getSentEmailToContactData to use single quotes for 'email' string literal |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 6.0 #15324 +/- ##
============================================
- Coverage 64.83% 64.83% -0.01%
Complexity 34784 34784
============================================
Files 2278 2278
Lines 103875 103875
============================================
- Hits 67344 67343 -1
- Misses 36531 36532 +1
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change. The change is only in 4 files so it's not setting a new standard because it's still chaos in all the other files. This also isn't mentioned in any Mautic or Symfony code standards (correct me if I'm wrong) so it comes to a preference of each developer.
I'd find this useful if you'd added a new CS Fixer rule for this and changed it everywhere. But this doesn't add much value I'm afraid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @notz this would need to be on the 6.0 branch please, rather than 6.x, to be considered for a release. |
@RCheesley @escopecz I changed the base branch and there is no conflict. So it should be ok. |
|
As this is merged I have switched the milestone to 6.0.4 as I haven't yet tagged and started the release, so we managed to squeak it in :) Thanks @notz for the PR! |
Description
This pull request standardizes the use of single quotes for string literals in SQL queries across multiple files to improve consistency and align with coding standards. The changes primarily affect SQL join conditions in the
EmailBundle
andPageBundle
.Standardization of string literals in SQL queries:
app/bundles/EmailBundle/Entity/StatRepository.php
: Updated theleftJoin
condition ingetSentEmailToContactData
to use single quotes for theemail
string literal.app/bundles/EmailBundle/Stats/Helper/BouncedHelper.php
: Changed thejoin
condition ingenerateStats
to use single quotes for theemail
string literal.app/bundles/EmailBundle/Stats/Helper/UnsubscribedHelper.php
: Updated thejoin
condition ingenerateStats
to use single quotes for theemail
string literal.app/bundles/PageBundle/Entity/RedirectRepository.php
: Modified thejoin
condition ingetMostHitEmailRedirects
to use single quotes for theemail
string literal.