Skip to content

Conversation

@joshtorres
Copy link
Member

Update the library package to support Laravel 10 and 11 with PHP 8.2+. Livewire constraint remains flexible (2.10+/3.0+) for compatibility with both versions.

Changes:

  • Update PHP requirement to ^8.2
  • Update Laravel support to 10 and 11 (drops 8 and 9)
  • Update CI to test Laravel 10/11 with PHP 8.2/8.3
  • Keep Livewire ^2.10||^3.0 for flexibility

See v1.1.0 tag for Laravel 8/9 support (1.x branch).

- Update PHP requirement to ^8.2
- Update illuminate/contracts to ^10.0 || ^11.0
- Update orchestra/testbench to ^8.0 || ^9.0
- Update pest to ^2.0 || ^3.0
- Update phpunit to ^10.0 || ^11.0
- Update collision to ^7.0 || ^8.0
- Update CI workflow for Laravel 10/11 test matrix
- Keep Livewire ^2.10 || ^3.0 for flexibility

Breaking: Drops Laravel 8/9 and PHP 8.0/8.1 support.
Use 1.x branch for Laravel 8/9 compatibility.
Comment on lines +33 to +35
"pestphp/pest": "^2.0||^3.0",
"pestphp/pest-plugin-laravel": "^2.0||^3.0",
"phpunit/phpunit": "^10.0||^11.0",
Copy link

Choose a reason for hiding this comment

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

Bug: The composer.json constraints for pestphp/pest and phpunit/phpunit are incompatible, which will cause dependency installation to fail.
Severity: MEDIUM

Suggested Fix

To resolve the dependency conflict, update the composer.json constraints to ensure compatible versions are used. One option is to require Pest v2 with PHPUnit v10 exclusively by changing the constraints to "pestphp/pest": "^2.0" and "phpunit/phpunit": "^10.0". Alternatively, to support PHPUnit 11, require Pest v3 by using "pestphp/pest": "^3.0" and "phpunit/phpunit": "^11.0".

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: composer.json#L33-L35

Potential issue: The `composer.json` file defines conflicting version constraints for
development dependencies. It allows for `pestphp/pest` versions `^2.0||^3.0` and
`phpunit/phpunit` versions `^10.0||^11.0`. However, Pest v2 is only compatible with
PHPUnit v10, while Pest v3 is required for PHPUnit v11. This incompatibility will cause
`composer install` or `composer update` to fail with a dependency resolution error if
Composer attempts to install Pest v2 alongside PHPUnit v11, preventing developers from
setting up the project.

Did we get this right? 👍 / 👎 to inform future reviews.

],
"require": {
"php": "^8.0",
"php": "^8.2",
Copy link

Choose a reason for hiding this comment

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

Bug: The composer.json allows Livewire v2, but the code uses dispatch() with named parameters, a feature exclusive to Livewire v3, which will cause a runtime error.
Severity: HIGH

Suggested Fix

Update the composer.json constraint for livewire/livewire to "^3.0". This will ensure the package is only installed in environments with a compatible Livewire version, preventing the runtime errors caused by the syntax mismatch.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: composer.json#L24

Potential issue: The `composer.json` file specifies a version constraint of
`"livewire/livewire": "^2.10||^3.0"`, permitting installations with Livewire v2.
However, several traits in the codebase, including `WithModal`, `WithNotification`, and
`WithMap`, use the `dispatch()` method with named parameters (e.g.,
`$this->dispatch('notify', message: $message)`). This syntax is an exclusive feature of
Livewire v3. Livewire v2 does not support named parameters in this context and uses the
`emit()` method instead. Consequently, any project using this package with a Livewire v2
installation will encounter a runtime error when these event-dispatching methods are
invoked.

Did we get this right? 👍 / 👎 to inform future reviews.

@joshtorres joshtorres merged commit dce7369 into main Jan 24, 2026
8 checks passed
@joshtorres joshtorres deleted the conductor/laravel-9-compat branch January 24, 2026 00:27
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