Skip to content

Conversation

@ricardoapaes
Copy link
Member

No description provided.

@ricardoapaes ricardoapaes added the enhancement New feature or request label Aug 30, 2025
@ricardoapaes ricardoapaes self-assigned this Aug 30, 2025
@ricardoapaes ricardoapaes changed the title ⬆️ Upgrading illuminate/database to v8.x ⬆️ Upgrading illuminate/database to v8.x to v12.x Aug 30, 2025
@ricardoapaes ricardoapaes requested a review from Copilot August 30, 2025 10:31
Copy link
Contributor

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 upgrades the illuminate/database dependency from v8.x to v12.x by implementing a legacy factory system to maintain compatibility after Laravel removed the legacy factory functionality.

  • Replaces deprecated Illuminate\Database\Eloquent\Factory with new LegacyFactory and LegacyFactoryBuilder classes
  • Updates composer dependencies to support Laravel versions 8.x through 12.x
  • Maintains backward compatibility for existing factory definitions and usage patterns

Reviewed Changes

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

Show a summary per file
File Description
composer.json Updates illuminate/database, illuminate/events, symfony/finder, and psr/container dependencies to support newer versions
src/LegacyFactory.php New class implementing legacy factory functionality with methods for defining models, states, and loading factory files
src/LegacyFactoryBuilder.php New builder class for creating model instances with support for states, multiple instances, and persistence
src/Eloquent.php Updates factory instantiation and type hints to use new legacy factory classes
tests/Factories/ProdutoFactory.php Updates import and type hint to use new LegacyFactory class
tests/EloquentTest.php Adds type hint for better IDE support

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

@ricardoapaes ricardoapaes merged commit 0f298b2 into master Aug 30, 2025
5 checks passed
@ricardoapaes ricardoapaes deleted the feature/upgrade-eloquent branch August 30, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants