Skip to content

Conversation

@onairmarc
Copy link
Member

No description provided.

@onairmarc onairmarc requested a review from a team as a code owner November 24, 2025 16:53
@onairmarc onairmarc changed the title Create Asset Class Create Assert Class Nov 24, 2025
@onairmarc onairmarc requested a review from Copilot November 24, 2025 23:33
Copilot finished reviewing on behalf of onairmarc November 24, 2025 23:35
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 introduces a new Assert class to provide runtime type assertions with PHPStan integration, along with updating development dependencies and cleaning up Rector rules.

  • Creates a new Assert utility class with methods for runtime assertions (true, false, notNull, string)
  • Adds an Assertable trait to simplify assertion usage in classes
  • Updates development dependencies to their latest major versions (PHPStan 2.x, Rector 2.x, Pest 4.x)

Reviewed changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Objects/Support/Assert.php New utility class providing static assertion methods with PHPStan type narrowing annotations
src/Objects/Support/Traits/Assertable.php New trait providing protected assertion methods that delegate to the Assert class
src/Exceptions/AssertionFailedException.php New exception class for assertion failures
src/Objects/Filesystem/Directory.php Refactored current() method to use Assert::string() instead of ImproperBooleanReturnedException
src/Objects/Serializers/JsonSerializer.php Simplified mapper fallback logic by relying on MapName attribute's constructor default
src/Objects/Support/Traits/Macroable.php Added explicit array type hint to $parameters in __callStatic()
src/Objects/Support/Traits/HasEnumValue.php Added PHPStan ignore comment for runtime safety check
src/Support/Internal/Rector/Rector.php Removed several Rector rules from configuration
phpstan.neon Added trait.unused to ignored errors list
composer.json Updated dev dependencies to major versions (PHPStan ^2, Rector ^2, Pest ^4, etc.)
composer.lock Lock file updates for dependency changes
Files not reviewed (2)
  • .idea/php.xml: Language not supported
  • .idea/stdlib.iml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@onairmarc onairmarc merged commit 4fc18d7 into main Nov 24, 2025
6 checks passed
@onairmarc onairmarc deleted the assert branch November 24, 2025 23:51
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