-
Notifications
You must be signed in to change notification settings - Fork 203
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
EZP-30573: As a Developer I want to filter by status when using ContentService::loadVersions method #2652
Conversation
d388d34
to
3b3f895
Compare
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.
This is a feature, not an improvement, moreover it changes API interface for 3 bug-fix LTS releases if merged into 6.7
. Please target it to master
.
@alongosz I totally understand your point of view, even agree with it, but my motivation for this PR is a customer's report complaining about the performance of |
3b3f895
to
90c2aa1
Compare
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.
Besides inline comments, the integration test is missing for introduced changes
* | ||
* @return \eZ\Publish\API\Repository\Values\Content\VersionInfo[] Sorted by creation date | ||
*/ | ||
public function loadVersions(ContentInfo $contentInfo) | ||
public function loadVersions(ContentInfo $contentInfo, $status = null) |
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 wondering about introducing struct representing "loading options" here: In the feature, we might need to support other filters (e.g. creator) and pagination
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 agree. It would be nice to have something like that, but honestly, I really don't want to do anything more than what is necessary for improving the mentioned command.
Good idea, but it should go to master
then 😉
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.
And we don't currently do struct for loading options, we did for a bit on load content, but we dropped it when we found a way around.
…ntService::loadVersions method
9924af6
to
275bed2
Compare
…g ContentService::loadVersions method
@alongosz I rebased it against 7.5 as we discussed |
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've missed one more important thing:
* | ||
* @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo | ||
* @param null|int $status |
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.
nitpick : int|null,
this is covered by new cs-fixer afair.
This have multiple occurrence, btw.
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.
Fixed in 25fb74f.
@micszo we need round of QA here. |
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.
QA Approved on eZ Platform EE v2.5.1 with diff.
Merged up to |
7.5
/master
This PR introduces the new
$status
argument forContentService::loadVersions
method.For more information please refer to JIRA ticket.
TODO:
$ composer fix-cs
).