viest/php-ext-xlswriter-ide-helper
IDE helper stubs for the PHP xlswriter extension, providing autocompletion, type hints, and inline documentation for its classes and methods in your editor. Improves code navigation and reduces errors when writing Excel files with xlswriter, with no runtime overhead.
What the package is. viest/php-ext-xlswriter-ide-helper is a metadata package: it ships stub class definitions for Vtiful\Kernel\Excel and companion types so IDEs and static analyzers understand the API surface of ext-xlswriter. It contains no runtime logic, no exporter, no writer. Every functional guarantee in the referenced skill docs (file mode, constMemory(), nextRow(), autoSize(), SKIP_EMPTY_ROW) comes from the PECL C extension binding libxlsxwriter. This split matters: the helper is a dev-time convenience with near-zero blast radius, while the extension is a native runtime dependency with real deployment and stability consequences.
Architecture fit. Deliberately uncoupled. A dev-only Composer dependency that improves authoring ergonomics for export/import actions and keeps them small and local (as the skill's "no broad abstraction for one export" guidance suggests). It should never be the reason to adopt xlswriter, nor should its absence block adoption — a hand-written PHPStan stub file achieves the same result.
Integration feasibility. Straightforward. composer require --dev, then verify the autoload configuration: if the stubs are registered via autoload.files or a classmap, they can clash with the real extension classes at runtime and produce "cannot redeclare class" errors. Preferred integration is to leave them unloaded and point PHPStan/Psalm at the stub file via stubFiles, or let the IDE index vendor/ only. Coverage should be checked against the exact methods and constants the team uses before relying on it.
Technical risk.
Key questions.
ext-xlswriter version do these stubs track, and is that version pinned in composer.json?Stack fit. Fits any Laravel 8+/PHP 8.x application that has already committed to ext-xlswriter and controls its own PHP image. It does not fit serverless-first stacks without a custom runtime, and it adds nothing for teams staying on PhpSpreadsheet.
Migration path. The helper is not part of a migration decision; the writer is. If replacing maatwebsite/excel or PhpSpreadsheet, run a bounded pilot: one high-volume export and one import, measured on peak memory and wall time, with the legacy path retained behind a flag until results are proven. Add the IDE helper in the same pull request as the first Vtiful\Kernel\Excel code so developers get completion from day one.
Compatibility. Pin the helper to the minor that matches the installed extension rather than floating ^; check the package's PHP constraint against the application's minimum; verify against composer.lock and the CI matrix. Confirm the stub file covers the specific methods the team calls — header, data, insertText, insertDate, insertFormula, constMemory, autoSize, output, openFile, openSheet, nextRow, nextCellCallback, and the Excel::SKIP_* constants.
Sequencing.
extension_loaded('xlswriter') in a health check. This is the gating step; the helper is worthless if the extension cannot be deployed.require-dev; confirm it is not autoloaded in production.storage_path('app/exports'), chunkById + constMemory for large datasets, single output(), deleteFileAfterSend()).nextRow() streaming; avoid whole-file accumulation.Maintenance. Near-zero runtime maintenance; modest hygiene. Track upstream extension releases and bump the helper in the same change. Because the artifact is declarative, the abandonment fallback is cheap: copy the stubs into tests/stubs/ and reference them from the analyzer config. That caps the downside regardless of the maintainer's activity.
Support. No commercial support and no dependents to lean on. The real support burden lands on platform engineering — image builds, patching libxlsxwriter and zlib, and validating cross-environment parity — not on this package.
Scaling. The helper contributes nothing to scale either way. The extension does: memory profile versus PhpSpreadsheet, constMemory() for large writes (accepting the tradeoff of the workbook living in memory), streaming reads with nextRow()/nextCellCallback(), chunkById on the source query, and the XLSX ceiling of 1,048,576 rows per sheet. Imports should run on queue workers with explicit timeouts, not in the request cycle.
Failure modes.
Class "Vtiful\Kernel\Excel" not found. Most likely and highest severity; mitigate with an image assertion and a boot-time capability check.mimes:xlsx plus size caps, isolated queue workers, and timeouts.=, +, -, or @.deleteFileAfterSend() and a scheduled prune of the export directory.Ramp-up. Roughly half a day for a Laravel developer to be productive using the skill's patterns; one to two days for infrastructure to make the extension deployable and observable across all environments. Value is front-loaded for developer experience but is genuinely small — the material upside is xlswriter's memory and speed profile relative to PhpSpreadsheet, and that should be measured before the team standardizes. Net assessment: adopt this package as a low-risk, dev-only convenience if and only if the runtime decision on ext-xlswriter has already been made on its own merits.
How can I help you explore Laravel packages today?