- Is phpofficewetak/phpexcel compatible with PHP 8.1, PHP 8.2 and modern Laravel versions?
- Stock PHPExcel 1.8.2 breaks on PHP 8 runtimes because of curly-brace string offsets, the removed each() function and dynamic property deprecations, and this fork has no confirmed PHP 8.1, 8.2 or 8.3 support. The package description offers no release matrix, so the only way to know is to diff it against upstream 1.8.2 and run a spike on your actual PHP version. Treat it as a hard blocker for Laravel 9 and above until that is proven otherwise.
- How do I install phpofficewetak/phpexcel with Composer in a Laravel project?
- Run composer require phpofficewetak/phpexcel and then call the PHPExcel_* classes directly in your code. Installation is mechanically simple, but the library registers its own autoloader as a side effect of loading, which can collide with Composer's PSR-4 autoloading. Pin an exact version and consider vendoring the package or mirroring it to an internal Composer repository, because a one-star personal-namespace fork can disappear.
- What is the difference between phpofficewetak/phpexcel and PhpSpreadsheet?
- PhpSpreadsheet is the official successor to PHPExcel and uses PSR-4 namespaces, modern PHP support and a maintainable release cadence. This package is a fork of the archived PHPExcel 1.8.2 line, keeping the old PHPExcel_* underscored class names, its bundled autoloader and its fully in-memory object model. What the fork actually changes versus upstream is undocumented, so do not assume any bug or compatibility fixes.
- Is phpofficewetak/phpexcel still maintained and safe to use in production?
- No active upstream exists: PHPExcel was superseded by PhpSpreadsheet and has had no security releases in years, and this fork has one star, zero dependents and an unpublished maintenance story. Supply-chain risk is high because there is no CVE feed watching the fork, and the legacy reader inherits zip-bomb exposure plus known 1900 leap-year and shared-formula quirks. Confine any use to a legacy path behind an adapter and get security sign-off first.
- How do I read an XLSX or CSV file in Laravel using this package?
- Use the legacy IO factory, for example PHPExcel_IOFactory::load($path) or createReaderForFile, then iterate worksheets and cells through the PHPExcel object model. The reader eagerly loads the entire workbook into memory, so row volume matters and there is no streaming path. For anything large, prefer a streaming reader such as openspout rather than hand-rolling chunking on top of PHPExcel.
- Can phpofficewetak/phpexcel handle large exports or queued Laravel jobs?
- There is no queue or container integration, no DI-friendly construction and no chunking built in, so queued exports and chunked reads have to be hand-rolled the way Laravel-Excel v2 did it. The whole workbook is held in memory, and cell caching is configured globally through PHPExcel_Settings, which means one tenant's large export can silently redefine memory behavior for the rest of the request lifecycle. The writer also inherits CSV formula-injection exposure when exports include user-controlled strings.
- Can I run phpofficewetak/phpexcel alongside PhpSpreadsheet in the same Laravel app?
- Yes, the class names do not collide because one uses PHPExcel_* and the other uses PhpOffice\PhpSpreadsheet, and this is the usual phased-migration pattern. The risk is that the package's bundled autoloader can collide with Composer and that both spreadsheet engines get loaded in the same process. Keep PHPExcel inside one adapter class so the cutover is a single pull request.
- What license does phpofficewetak/phpexcel use, and can I redistribute it?
- The package metadata reports NOASSERTION, so automated license compliance tooling cannot clear it, and the original LGPL-2.1 headers may have been altered in the fork. Legal review is mandatory before you ship or redistribute it in a product. Until that clears, treat the license as unknown rather than assuming LGPL-2.1 applies.
- How do I unit test or mock code that uses PHPExcel classes?
- You effectively cannot mock PHPExcel itself: there is no PSR-4 autoloading, no container binding, static global configuration through PHPExcel_Settings and no seam for injecting a fake. The workable approach is to hide it behind your own SpreadsheetReader and SpreadsheetWriter interfaces and mock those in tests. That also gives you a one-file swap when you move to PhpSpreadsheet.
- What should I use instead of phpofficewetak/phpexcel for a Laravel project?
- Use PhpSpreadsheet directly, maatwebsite/excel v3 which wraps it for Laravel convenience, or openspout v4 for high-volume streaming CSV and XLSX exports. The PHPExcel to PhpSpreadsheet migration is largely mechanical, for example PHPExcel_Worksheet becomes PhpOffice\PhpSpreadsheet\Worksheet\Worksheet and PHPExcel_IOFactory::load becomes IOFactory::load. Build new features on PhpSpreadsheet, let the old PHPExcel path drain, and avoid adopting the fork for greenfield work.