Skip to content

[Bugfix]: Ensure getConditionVariableTypes() is used in all DAOs#18789

Merged
kingjia90 merged 2 commits intopimcore:11.5from
jdreesen:bugfix/getConditionVariableTypes
Nov 19, 2025
Merged

[Bugfix]: Ensure getConditionVariableTypes() is used in all DAOs#18789
kingjia90 merged 2 commits intopimcore:11.5from
jdreesen:bugfix/getConditionVariableTypes

Conversation

@jdreesen
Copy link
Copy Markdown
Contributor

Changes in this pull request

Passes the types to all queries in all DAOs.
This is necessary for advanced queries, e.g., with IN(?).
Doctrine needs the types in this case.

Additional info

This was already done for Notes in #9935.

There is a similar PR in pimcore/ecommerce-framework-bundle#277

@github-actions
Copy link
Copy Markdown

Review Checklist

  • Target branch (11.5 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Oct 28, 2025

Quality Gate Passed Quality Gate passed

Issues
2 New issues
59 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
5.1% Duplication on New Code

See analysis details on SonarQube Cloud

@jdreesen
Copy link
Copy Markdown
Contributor Author

Sonar complaints about the long lines (they were already too long before the change, though).
Do you want me to break them down into multiple lines?

@kingjia90
Copy link
Copy Markdown
Contributor

kingjia90 commented Oct 29, 2025

Thank you for your PR!

Sonar complaints about the long lines (they were already too long before the change, though). Do you want me to break them down into multiple lines?

No need that 😉 i've marked them all as accepted for the moment, we (actually Herbert) had some idea to use tools like RectorPHP to automate this kind of coding standard work to polish all the legacy code.

@jdreesen
Copy link
Copy Markdown
Contributor Author

Rector is a great tool! But I don't think it does any formatting. I usually run PHP-CS-Fixer after Rector to format the changed code. But I don't think PHP-CS-Fixer can do this kind of formatting (splitting long lines) either. You probably need something like Mago for that 🤔

@herbertroth
Copy link
Copy Markdown
Member

@jdreesen @kingjia90 Rector alone will not do the Job. Rector is AST-based, not whitespace-aware, so it’s intentionally not meant for layout formatting. But Rector can help in a two step approach.

  • Rector for structure
  • PHP-CS-Fixer or ECS for wrapping
    I'm testing workflows that first improve readability by simplifying code and sometimes incidentally shorten long lines with rector and after this use PhpCsFixer for formatting, including line length.
    This is work in progress and there is no timeline for this. It's a side project :-)

@jdreesen
Copy link
Copy Markdown
Contributor Author

jdreesen commented Nov 6, 2025

Is there any chance that this will be considered for Pimcore 11.5.13?

@jdreesen
Copy link
Copy Markdown
Contributor Author

Friendly ping.

The other PR (pimcore/ecommerce-framework-bundle#277) has already been merged.

@kingjia90 kingjia90 self-assigned this Nov 19, 2025
@kingjia90 kingjia90 added this to the 11.5.13 milestone Nov 19, 2025
@kingjia90 kingjia90 merged commit 8f14a1a into pimcore:11.5 Nov 19, 2025
28 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
@jdreesen jdreesen deleted the bugfix/getConditionVariableTypes branch November 19, 2025 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants