Extracted content ID by content type fetching as a strategy #330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposition of a solution for #296 (comment).
I've extracted fetching content ids for content type a separate strategy. Limiting the refactoring to just that, because it's already a bit too complex.
The end goal would be to extract all of those
if-elseif-elseif-else
statements into separate strategies following the internalContentIdListGeneratorStrategyInterface
. I'd like to introduce that as a follow-up (maybe for 4.6 only). The strategy is tied to SF CLI InputInterface so it can be used uniformly instead of the mentionedif-elseif
.Every ContentList is cached by its content type so we don't execute it twice to get total count and the list itself. Other strategies won't require it.
Achieving more SOLID code here, while might look slightly over-engineered, it allows to unit-test specific parts of the solution. There are no tests for specific scenarios
ibexa:reindex
command itself as it's too complicated to be automated. Its basic usage is covered by behat, when installing the Product from scratch.