Skip to content

Laravel 13 compatibility#59

Draft
thekevinm wants to merge 1 commit intomasterfrom
shift/laravel-13
Draft

Laravel 13 compatibility#59
thekevinm wants to merge 1 commit intomasterfrom
shift/laravel-13

Conversation

@thekevinm
Copy link
Copy Markdown
Contributor

Summary

Laravel 13 compatibility upgrade for df-system. Composer-only dep matrix bump — no source files needed changes.

Part of the Laravel 11→13 upgrade campaign. Pilot: dreamfactorysoftware/df-core#162. Sibling PRs land in parallel: df-user, df-database, df-sqldb.

Changes

  • composer.json:
    • require: php → ^8.3, add laravel/helpers: ^1.8 (covers heavy array_get/camel_case usage in src/)
    • require-dev: laravel/framework: ^13.7, phpunit: ^11.5.3, orchestra/testbench: ^11.0, mockery: ^1.6, nunomaduro/collision: ^8.6

laravel/framework deliberately stays in require-dev only — package remains framework-agnostic in production.

Test plan

  • composer validate --strict — valid
  • composer install against L13 dep matrix — resolves cleanly with df-core path-repo (laravel/framework v13.7.0, phpunit 11.5.55, testbench v11.1.0)
  • php -l clean over src/ + tests/
  • vendor/bin/phpunit — 100 tests load under PHPUnit 11; failures are df-core's TestCase needing a host-app bootstrap, not df-system regressions
  • Stage 2 host-app integration via shift-173254 worktree — autoload + class_exists smoke for all df-system public classes passes under Laravel 13.7.0
  • Independent code-review-expert pass: PASS (high confidence)

Notes

  • Wave 0 invariants verified: no DispatchesJobs, no CorsService reparenting, no setupBeforeClass typos, no LSP-violating return types, no removed getDates() overrides.
  • WIP /provision feature was preserved via git stash push -u — recoverable from stash@{0} on master (do not lose).

Wave 1 of the 53-package Laravel 11 -> 13 upgrade campaign. Updates
df-system to compose, autoload, and runtime-load cleanly under Laravel
13.7 while preserving the package's framework-agnostic require list and
its public API for downstream consumers (df-core requires df-system,
which transitively means every df-* service package).

Composer (only file touched):
  - Bump php to ^8.3 (matches Laravel 13 minimum + main app shift-173254).
  - Add laravel/helpers ^1.8 (production polyfill for the 68 sites of
    array_get/camel_case/array_except still in src/ + tests/).
  - Add Laravel 13 dev-stack: laravel/framework ^13.7 (require-dev to
    keep df-system framework-agnostic, mirroring df-core), mockery/mockery
    ^1.6, nunomaduro/collision ^8.6, orchestra/testbench ^11.0 (^11 is
    the L13-compatible track; ^10 pins L12), phpunit/phpunit ^11.5.3
    (was @stable - pin to a tested L13-compatible version).

No source changes. Audit found:
  - Zero DispatchesJobs imports (removed in Laravel 11).
  - Zero Fruitcake or CorsService references.
  - Zero Schema::extend / Request::macro / Response::macro usage.
  - ServiceProvider::boot/register use no L11-deprecated patterns.
  - tearDown(): void in src/Testing/UserResourceTestCase.php and
    setUp(): void in tests/SystemServiceTest.php correctly cased for
    PHPUnit 11 (no setupBeforeClass typos).
  - 68 array_get/camel_case sites — laravel/helpers polyfill covers
    them at runtime; deferred refactor to Arr::/Str:: for follow-up.

Stage 1 (package-isolated): composer validate --strict passes, composer
install resolves cleanly with df-core path-repo alias + root version
pin (root must declare version "0.6.99" to satisfy df-core's
"~0.6.2" reverse constraint, since composer rejects "replace" entries
on the root package). PHP lint clean across src/ + tests/. PHPUnit 11
loads tests successfully — all 100 errors are missing-bootstrap/app.php
which is expected for Stage 2.

Stage 2 (host-app shift-173254): composer install requires removing
unupgraded sibling packages (df-mongo-logs, df-git, etc.) before df-
core/df-system L13 can resolve, per documented Wave 0 sibling-blockage.
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