- Does modera/direct-bundle work with Laravel out of the box?
- No. It is a Symfony bundle that ships a Bundle class, a DI extension, a config tree, event subscribers and Symfony routing conventions, so Composer may not even resolve it against Laravel 10 or 11. Laravel shares HttpFoundation with Symfony, but the container, configuration and bootstrapping seams are different and must be rewritten rather than adapted. Treat it as a protocol reference, not a drop-in dependency.
- What does modera/direct-bundle actually do on the server side?
- It implements the server side of Sencha's ExtDirect protocol: it exposes service methods as RPC actions, generates the api.js descriptor ExtJS loads at boot, and routes batched JSON calls back to those methods. In practice the reusable value is that protocol layer, namely envelope parsing, batch iteration, per-action exception shaping and descriptor generation. Everything else in the package is Symfony wiring around that core.
- Can I install modera/direct-bundle in a Laravel 10 or 11 project with Composer?
- Unlikely without a fork. The last release was 2016-05-31 with no PHP 8 compatibility work, so Composer platform constraints will probably refuse to resolve on a modern Laravel stack running PHP 8.2. The fastest way to know is a two to three day spike: fork the repo, attempt the install on your target stack, and characterize the breakage before committing to any approach.
- Is modera/direct-bundle still maintained and safe to depend on?
- The project is effectively dormant: last release in May 2016, roughly 2 stars and 0 dependents, and no security response process. The repository is marked READ-ONLY as a subtree split of an upstream monorepo, so patches cannot be merged here and any fix has to go upstream. Depending on it in production means accepting unpatched risk, which is hard to justify for a new Laravel build.
- How would I integrate an ExtDirect endpoint into a Laravel application?
- There are two realistic paths. The quick one is a wrapper service provider plus a single Route::match endpoint that delegates to the bundle's dispatcher, which gets a demo working fastest but is the worst long-term choice. The recommended path is to reimplement the protocol surface as a first-party package, for example app/ExtDirect or a private Composer package, using the bundle only as a specification.
- How much work is it to reimplement ExtDirect support natively in Laravel?
- The protocol layer itself is small, realistically 300 to 600 lines: a POST route through session, CSRF and auth middleware, a dispatcher mapping action and method to callables, an action registry, and api.js generation from that registry. The effort is dominated by conformance details rather than volume. Capture real request and response pairs from the existing endpoint first, because those are the contract the ExtJS client depends on.
- Does modera/direct-bundle handle per-action authorization?
- Based on the technical evaluation, the bundle delegates access control to the host framework's firewall rather than enforcing per-action authorization itself. That matters for a Laravel port, because you must decide explicitly which middleware guards each action and method. Budget for reimplementing that security surface rather than assuming the bundle provides it.
- What PHP versions does modera/direct-bundle support?
- There is no PHP 8 compatibility work in the package, and its platform constraints date from a 2016 release. If your target application runs PHP 8.1 or newer, plan for a fork or a clean port from day one. Do not assume it will install cleanly on Laravel 10 or 11 without changes.
- How should I test an ExtDirect integration in Laravel?
- Treat captured request and response pairs from a working ExtDirect endpoint, or from the client's documented expectations, as your fixture set. Build a conformance checklist of what the client actually depends on, including the api.js descriptor format and response metadata conventions, then assert against those fixtures in feature tests. This is far more reliable than testing the protocol in the abstract.
- What are the alternatives to modera/direct-bundle for a Laravel project?
- If there is no live ExtJS frontend today, the package has no consumer and the evaluation should simply close. If an ExtJS client exists only as an island inside a Vue or React app, skip ExtDirect entirely and expose the same server methods over conventional JSON routes. Only pursue a first-party ExtDirect package when a client is contractually locked to the protocol, and verify the upstream license before copying protocol logic.