Skip to content

Conversation

@ManukMinasyan
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings October 29, 2025 18:46
@ManukMinasyan ManukMinasyan merged commit 95eaf21 into 2.x Oct 29, 2025
2 checks passed
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 pull request downgrades Laravel framework support from version 12 to version 11, along with making various code quality improvements. The changes include adding explicit return types to closures, refactoring empty value checks to use in_array() for better type safety, removing default parameters from rescue() helper calls, and updating PHPDoc type hints.

  • Downgraded Laravel framework from v12 to v11 with corresponding package updates
  • Added explicit return types to numerous closure functions throughout the codebase
  • Refactored empty value checks from chained comparisons to in_array() for strict type checking
  • Removed default null parameters from rescue() helper function calls

Reviewed Changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
composer.json Updated orchestra/testbench requirement from ^10.0 to ^9.0
composer.lock Downgraded Laravel framework from v12.36.1 to v11.46.1 with dependency updates
.github/workflows/run-tests.yml Updated CI matrix to use Laravel 11., testbench 9., and carbon 2.*
tests/TestCase.php Removed second argument from config()->set() call
tests/Feature/Integration/Resources/Pages/CreateRecordTest.php Removed test case for 'date field must be valid date'
src/Services/Visibility/FrontendVisibilityService.php Replaced chained comparisons with in_array() for empty checks
src/Providers/EntityServiceProvider.php Added return type array to closure
src/Models/CustomFieldSection.php Removed 'bool' from PHPDoc type annotation
src/Models/CustomFieldOption.php Replaced chained comparisons with in_array()
src/Models/CustomField.php Removed 'bool' from PHPDoc type annotation
src/Filament/Management/Pages/CustomFieldsManagementPage.php Replaced chained comparisons with in_array() in two methods
src/Filament/Management/Forms/Components/VisibilityComponent.php Removed default null parameters from rescue() calls
src/Filament/Management/Forms/Components/CustomFieldValidationComponent.php Added return type to closure and replaced chained comparisons
src/Filament/Integration/Migrations/CustomFieldsMigrator.php Added return type array to closure
src/Filament/Integration/Builders/InfolistBuilder.php Added return type bool to nested closure
src/Filament/Integration/Base/AbstractFormComponent.php Refactored visibility check logic and simplified ternary
src/Enums/VisibilityOperator.php Added return type array to closure
src/Enums/ValidationRule.php Replaced chained comparisons with in_array()
src/Enums/FieldDataType.php Added return type array to closure
src/EntitySystem/EntityCollection.php Added return type array to closures in two methods
src/Data/CustomFieldSectionSettingsData.php Simplified empty class definition
src/CustomFields.php Changed static:: to self:: for property access
rector.php Removed strictBooleans configuration option

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

// Fix Spatie Laravel Data configuration for testing
config()->set('data.throw_when_max_depth_reached', false);
config()->set('data.max_transformation_depth', null);
config()->set('data.max_transformation_depth');
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The config()->set() call is missing its second argument. The value parameter is required to set a configuration value. This line should either provide a value (e.g., null) or be removed if the configuration should not be set.

Suggested change
config()->set('data.max_transformation_depth');
config()->set('data.max_transformation_depth', null);

Copilot uses AI. Check for mistakes.
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