Skip to content

feat!: add Laravel 12 support #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Conversation

lotyp
Copy link
Member

@lotyp lotyp commented May 18, 2025

No description provided.

@lotyp lotyp requested a review from Copilot May 18, 2025 13:54
@github-actions github-actions bot added type: enhancement For features and enhancements (feat) type: maintenance For maintenance, refactor and testing (perf, chore, style, revert, refactor, test, build, ci) labels May 18, 2025
Copy link

@Copilot 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 Laravel 12 support by updating dependency version constraints and modernizing code syntax for anonymous classes and trailing commas.

  • Updated anonymous class instantiation in tests to use the new syntax without parentheses.
  • Added trailing commas in constructor parameters for consistency in multiple files.
  • Adjusted composer.json dependency constraints to support Laravel 12.

Reviewed Changes

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

Show a summary per file
File Description
tests/src/Functional/Manager/SerializerTest.php Updated anonymous class instantiation syntax.
tests/src/Functional/EncoderRegistryTest.php Updated anonymous class instantiation syntax.
tests/app/Objects/User.php Added a trailing comma in constructor parameters.
tests/app/Objects/Product.php Added a trailing comma in constructor parameters.
tests/app/Objects/Post.php Added a trailing comma in constructor parameters.
tests/app/Objects/Author.php Added a trailing comma in constructor parameters.
src/Manager/SerializerManager.php Added a trailing comma in constructor parameters for consistency.
src/Manager/Serializer.php Added a trailing comma in constructor parameters for consistency.
src/Contracts/SerializerInterface.php Added a trailing comma in constructor parameters for consistency.
composer.json Updated dependency version constraints to include Laravel 12 support.

@lotyp lotyp force-pushed the feat/laravel-11-support-main branch from 1cf1f38 to 3a962ee Compare May 18, 2025 13:57
@lotyp lotyp changed the title feat: add laravel 12 support feat!: add Laravel 12 support May 18, 2025
@lotyp lotyp force-pushed the feat/laravel-11-support-main branch 2 times, most recently from d6f3eef to 94c6b50 Compare May 18, 2025 14:24
Copy link

codecov bot commented May 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.50%. Comparing base (54b331b) to head (fdd0857).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #228      +/-   ##
============================================
+ Coverage     98.43%   98.50%   +0.07%     
  Complexity       74       74              
============================================
  Files            15       15              
  Lines           255      268      +13     
============================================
+ Hits            251      264      +13     
  Misses            4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lotyp lotyp force-pushed the feat/laravel-11-support-main branch from 94c6b50 to d1c00c4 Compare May 18, 2025 14:44
@lotyp lotyp force-pushed the feat/laravel-11-support-main branch from d1c00c4 to fdd0857 Compare May 18, 2025 14:47
@lotyp lotyp requested a review from Copilot May 18, 2025 18:15
Copy link

@Copilot 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 adds Laravel 12 support by updating dependency constraints, bumping versions of development tools and GitHub Actions, and making minor stylistic adjustments to improve code consistency.

  • Adjust trailing commas in class constructors for consistency.
  • Update dependency version ranges and static analysis baselines for Laravel 12 compatibility.
  • Bump action versions and add missing PHP extensions in workflow configurations.

Reviewed Changes

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

Show a summary per file
File Description
tests/app/Objects/Post.php Added a trailing comma for consistent constructor parameter formatting.
tests/app/Objects/Author.php Added a trailing comma for consistent constructor parameter formatting.
src/Normalizers/RamseyUuidNormalizer.php Modified the normalization method signature (uses #[Override] and a narrowed return type) and added instance checks.
src/Manager/SerializerManager.php Added trailing commas in constructor parameters.
src/Manager/Serializer.php Added trailing commas in constructor parameters.
src/Contracts/SerializerInterface.php Added trailing commas in constructor parameters.
psalm-baseline.xml Updated baseline to reflect current static analysis configuration.
phpstan-baseline.neon Updated baseline to reflect current PHPStan version.
composer.json Extended illuminate/ package constraints to support Laravel 12 and bumped dev dependency versions.
.github/workflows/* Updated action versions and added the missing iconv extension in various workflow configurations.
Other workflow files Updated action version references and configurations to align with recent updates.
Comments suppressed due to low confidence (1)

src/Normalizers/RamseyUuidNormalizer.php:25

  • The normalize() method now returns a string instead of a union of multiple types as defined by the interface. Please verify that this narrowing of the return type aligns with the expected usage and does not conflict with the broader normalization contract.
public function normalize(mixed $data, ?string $format = null, array $context = []): string

@lotyp lotyp closed this May 18, 2025
@lotyp lotyp deleted the feat/laravel-11-support-main branch May 18, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement For features and enhancements (feat) type: maintenance For maintenance, refactor and testing (perf, chore, style, revert, refactor, test, build, ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant