Skip to content

Conversation

@mglaman
Copy link
Owner

@mglaman mglaman commented Oct 16, 2025

No description provided.

@mglaman mglaman requested a review from Copilot October 16, 2025 14:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates entity query count operations to return a more specific non-negative integer type (int<0, max>) instead of the generic int type, addressing issue #909 where entity query count() should return non-negative-int.

  • Updated return type for entity query count operations from int to int<0, max>
  • Added comprehensive test coverage for various entity query count scenarios
  • Modified the type extension to use IntegerRangeType::createAllGreaterThanOrEqualTo(0) for better type precision

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/src/Type/data/entity-query-execute.php Updated expected types in existing test assertions from int to int<0, max>
tests/src/Type/data/bug-909.php Added new test file specifically for bug #909 with comprehensive entity query count test cases
tests/src/Type/data/bug-355-entity-query.php Updated expected types in existing test assertions from int to int<0, max>
tests/src/Type/EntityQuery/EntityQueryDynamicReturnTypeExtensionTest.php Added the new bug-909.php test file to the test suite
src/Type/EntityQuery/EntityQueryExecuteWithoutAccessCheckCountType.php Enhanced class to use IntegerRangeType internally and provide proper range description
src/Type/EntityQuery/EntityQueryDynamicReturnTypeExtension.php Updated to return IntegerRangeType::createAllGreaterThanOrEqualTo(0) for count queries with access check

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

2 participants