Skip to content

Conversation

@mikadamczyk
Copy link
Contributor

@mikadamczyk mikadamczyk commented Nov 28, 2025

🎫 Issue N/A

Related PRs:

Description:

  • Added optional includeSystem flag to ContentTypeService::loadContentTypeGroups (contracts, decorators, siteaccess-aware) and wired it through persistence/cache/gateway so system groups can be fetched while keeping the default non-system filter.
  • Updated Doctrine gateway to skip is_system filter when includeSystem=true; cache handler now maintains separate keys for lists with/without system groups and invalidates both on create/update/delete.
  • Added integration coverage for system-group inclusion and adjusted cache tests to reflect new keys/signatures.

For QA:

Documentation:


try {
$defaultGroupsIterable = $contentTypeService->loadContentTypeGroups();
$defaultGroups = is_array($defaultGroupsIterable) ? $defaultGroupsIterable : iterator_to_array($defaultGroupsIterable);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIR our polyfill iterator_to_array should be able to handle that for you.

/**
* Test that system ContentTypeGroups are returned only when explicitly requested.
*
* @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::loadContentTypeGroups()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add @covers annotation to specific methods. We add it only for a class the top of a test case class. It makes coverage report somehow incomplete AFAIR.

Comment on lines 223 to 224
->with($this->equalTo(false))
->will($this->returnValue([]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was legacy style.
Rather:

Suggested change
->with($this->equalTo(false))
->will($this->returnValue([]));
->with(false)
->willReturnValue([]);

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants