Skip to content

Conversation

byjg
Copy link
Owner

@byjg byjg commented Jun 3, 2025


Changes Introduced

  1. Schema Type Compatibility: Expanded type hints in test cases to support both SwaggerSchema and OpenApiSchema, enhancing flexibility in schema handling.
  2. Documentation Updates: Added schema-classes.md detailing schema features. Updated README and existing documents with references and guidance for RestServer integration.
  3. Code Clarity Enhancements: Added #[Override] attributes for methods overriding parent definitions. Made minor adjustments to types and return declarations.
  4. Strict Type Declarations: Introduced strict typing in classes and methods to align with modern PHP practices.
  5. Environment Updates: Added PHP 8.4 support, updated dependencies, refined PHPUnit configurations, and corrected VSCode debug settings.

Checklist

  • Code has been tested on all required environments.
  • Documentation has been reviewed and updated as necessary.
  • Functionality and compatibility have been confirmed with the existing application.

Additional Notes

Ensure PHP 8.4 features are supported in all relevant project environments.

Description by Korbit AI

What change is being made?

Add support for PHP 8.4, improve type safety across the codebase, update composer dependencies, enhance PHPUnit configuration, and include documentation for schema handling, while refactoring code for better readability.

Why are these changes being made?

These changes are essential to accommodate the upcoming PHP 8.4 version, improve code maintainability and robustness through enhanced type safety and dependency updates, and provide clear documentation. Transitioning to more recent PHPUnit versions and refining configurations ensures better test coverage and more informative test outputs.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

byjg added 5 commits June 3, 2025 03:29
Added support for PHP 8.4 in workflows and updated dependency versions for compatibility. Adjusted PHPUnit configuration for more robust error reporting and updated schema to PHPUnit 10.5. Corrected VSCode debug port and improved README formatting.
Updated method signatures and class properties across various files with strict type declarations. This enhances type safety and ensures better compatibility with modern PHP practices.
This update ensures methods explicitly indicate they override a parent class or interface method for better code clarity and consistency. Additionally, minor type adjustments and improvements to return type declarations were made to enhance code robustness.
Created a new document, `schema-classes.md`, detailing the features of `SwaggerSchema` and `OpenApiSchema`. Updated README and `contract-tests.md` to reference schema documentation and added guidance on using the `RestServer` component.
Expanded return type hints in test cases to accept both `SwaggerSchema` and `OpenApiSchema`. This ensures compatibility with both schema types and improves flexibility in schema handling across tests.
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues... but I did find this rooster.

   \\
   (o>
\\_//)
 \_/_)
  _|_
Files scanned
File Path Reviewed
src/Swagger/SwaggerResponseBody.php
src/Exception/BaseException.php
src/OpenApi/OpenApiResponseBody.php
src/OpenApi/OpenApiRequestBody.php
src/MockRequester.php
src/ApiRequester.php
src/Swagger/SwaggerRequestBody.php
src/Swagger/SwaggerSchema.php
src/OpenApi/OpenApiSchema.php
src/Base/Schema.php
src/AbstractRequester.php
src/Base/Body.php

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Updated class names to better reflect their purpose by removing the "Test" suffix. This change applies to both the abstract base class and the specific test classes, aligning class naming with their actual roles.
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.

1 participant