Skip to content

fix(prism): avoid requiring full laravel framework#1025

Open
MiddleSokilAI wants to merge 1 commit into
prism-php:mainfrom
MiddleSokilAI:sokil/remove-runtime-laravel-framework
Open

fix(prism): avoid requiring full laravel framework#1025
MiddleSokilAI wants to merge 1 commit into
prism-php:mainfrom
MiddleSokilAI:sokil/remove-runtime-laravel-framework

Conversation

@MiddleSokilAI

Copy link
Copy Markdown

Problem

prism-php/prism currently requires the full laravel/framework package at runtime. Packages that only need Prism through laravel/ai then install the complete Laravel framework even when the host application already provides the required Illuminate components.

Change Summary

  • Replace the broad laravel/framework runtime requirement with the concrete Illuminate components used by src/.
  • Keep Laravel 11, 12, and 13 compatibility ranges aligned with the previous framework constraint.
  • Leave dev/test dependencies unchanged.

Validation

  • Parsed composer.json successfully with PowerShell ConvertFrom-Json.
  • Ran git diff --check successfully.
  • Reviewed src/ Illuminate namespace usage against the listed component packages.

Risk

Low-to-medium. This changes dependency metadata only, but consumers relying on Prism to implicitly install unrelated Laravel framework classes may need to require those packages directly.

wishborn added a commit to Particle-Academy/prism that referenced this pull request Jul 7, 2026
…checker

composer-require-checker surfaced undeclared direct dependencies, now
declared: ext-mbstring, ext-openssl, psr/http-message, and
symfony/http-foundation (all already installed transitively via
laravel/framework, so this changes nothing for consumers). laravel/mcp
moves to suggest for the optional LaravelMcpTool integration; its
symbols plus the PHPUnit assertion used by the testing fakes are
whitelisted in composer-require-checker.json.

The custom ReorderMethodsRector was dev tooling shipping inside src/
(the source of phantom PhpParser/Rector symbols) - moved to dev/ under
a Prism\Dev namespace, autoloaded only in autoload-dev and
export-ignored from the dist package.

New Require Checker CI workflow runs the tool on every push/PR. This is
the proper guard for the goal upstream prism-php#1025 aimed at (catching use of
undeclared symbols) without splitting laravel/framework into
illuminate/* packages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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