Skip to content

feat: Add marko/inertia-react package#51

Merged
markshust merged 5 commits intomarko-php:developfrom
ps-carvalho:feature/marko-inertia-react-package
May 2, 2026
Merged

feat: Add marko/inertia-react package#51
markshust merged 5 commits intomarko-php:developfrom
ps-carvalho:feature/marko-inertia-react-package

Conversation

@ps-carvalho
Copy link
Copy Markdown
Contributor

@ps-carvalho ps-carvalho commented May 1, 2026

Summary

PR 3/5 in the Vite + Inertia package-import sequence. This revises marko/inertia and marko/inertia-react per maintainer feedback:

  • Adds parent-owned inertia.assetEntry and inertia.ssr.bundle slots to marko/inertia.
  • Defaults Inertia::render() to config('inertia.assetEntry') when no asset entry is passed.
  • Adds Marko\Inertia\Frontend\InertiaFrontendInterface as a frontend marker contract.
  • Changes marko/inertia-react to overlay config/inertia.php, dropping the unused config/inertia-react.php and PHP ssrEntry key.
  • Adds a React marker binding through module.php so multi-install conflicts are loud through the existing binding registry mechanism.
  • Updates docs to omit the per-render asset string and use unpinned npm install commands.

Maintainer Feedback Addressed

  • No pseudo-functionality: the shipped config now overlays keys consumed by marko/inertia.
  • Multi-install protection: the companion registers the frontend marker binding instead of relying on silent config merge order.
  • Build-time/runtime split: ssrEntry is no longer shipped in PHP config.
  • Version guidance: npm commands are unpinned and point to Inertia.js for current adapter support.
  • Package-count tests remain derived; no count bump included.

Test Plan

  • vendor/bin/pest packages/inertia/tests packages/inertia-react/tests --colors=never
  • vendor/bin/phpcs --standard=phpcs.xml packages/inertia packages/inertia-react
  • vendor/bin/php-cs-fixer fix packages/inertia --dry-run --diff --using-cache=no
  • vendor/bin/php-cs-fixer fix packages/inertia-react --dry-run --diff --using-cache=no
  • composer validate --strict --no-check-lock packages/inertia-react/composer.json
  • composer validate --strict --no-check-lock
  • vendor/bin/pest tests/IntegrationVerificationTest.php tests/PackagingTest.php packages/inertia/tests packages/inertia-react/tests --colors=never

@github-actions github-actions Bot added the enhancement New feature or request label May 1, 2026
@ps-carvalho ps-carvalho force-pushed the feature/marko-inertia-react-package branch from a376b7a to 45a6e3f Compare May 1, 2026 22:23
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels May 1, 2026
…o-config

- Nest test namespace as Marko\Inertia\React\Tests\ to match every other
  Marko driver sibling (Marko\Cache\File\Tests\, Marko\Database\PgSql\Tests\)
- Drop ssr.bundle config slot from companion and parent (no PHP consumer;
  Marko's SSR client only reads inertia.ssr.enabled and inertia.ssr.url)
- Link the Inertia.js docs reference in the npm install note
- Document the inertia.assetEntry overlay slot in the parent inertia docs

Refs marko-php#17.

Co-Authored-By: Paulo Carvalho <paulofrediani@icloud.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@markshust markshust merged commit 37fb123 into marko-php:develop May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants