Conversation
| private const CONTENT_LOCATION_ALIAS = 'ibexa_sort_location'; | ||
| private const SORT_ALIAS = 'ibexa_filter_sort_bookmark_id'; | ||
| private const CONTENT_ITEM_TABLE = 'ezcontentobject'; | ||
| private const CONTENT_ITEM_TABLE = 'ibexa_content'; |
There was a problem hiding this comment.
@alongosz asked me to have a look at this PR and check if it is needed on 5.0 as well, not only 6.0.
Well, it is not needed on 5.0 as 5.0 uses dbal 3. However, the line here is obviously wrong, but test still succeeds. The test builds a FilteringQueryBuilder on in-memory SQLite purely to assemble query text, then asserts on the generated string and the join map (getQueryPart('join'), getSQL()). So no schema is created and nothing is ever run in the test.
My recommendation would be to leave the CONTENT_ITEM_TABLE part as is in this PR and instead do this in a PR merged to 5.0 and up:
+use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway;
use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway as LocationGateway;
- private const CONTENT_ITEM_TABLE = 'ezcontentobject';
->join(
'location',
- self::CONTENT_ITEM_TABLE,
+ ContentGateway::CONTENT_ITEM_TABLE,
'content',
- ->from(self::CONTENT_ITEM_TABLE, 'content');
+ ->from(ContentGateway::CONTENT_ITEM_TABLE, 'content');
I can do that if you agree
There was a problem hiding this comment.
Done, the CONTENT_ITEM_TABLE change is dropped from this PR, only the DBAL 4 adjustments remain. If it looks good, please approve. And yes, please go ahead with the ContentGateway::CONTENT_ITEM_TABLE change against 5.0.
1c26777 to
a04e947
Compare
a04e947 to
a338c28
Compare
|



Description:
The test merged from 5.0 fails on 6.0 because it uses DBAL 3 API removed in DBAL 4:
getQueryPart()and theurlconnection option.The test now checks the generated SQL through
getSQL()and connects to in-memory SQLite the DBAL 4 way, same asBaseLocationSortClauseQueryBuilderTest. No production code changed.For QA:
Test-only change.
vendor/bin/phpunit -c phpunit.xml tests/lib/Persistence/Legacy/Filter– all tests pass.Documentation:
N/A