Reference
Version 2 Upgrade Guide
Upgrade the main package to v2 with native XLS, improved package boundaries, and developer-facing maintenance APIs through the current v2.0.6 mono release.
Move to v2 without carrying old package assumptions forward.
The supported path is a coordinated 2.x release line: align dependencies first, remove v1-era compatibility assumptions, then verify the complete distribution before tagging.
- 01Align dependenciesMain package + ^2.0 release family
- 02Remove old assumptionsNative XLS + clearer package boundaries
- 03Verify and releaseTests, immutable tag, Packagist, docs
These are the boundaries that most often affect existing installations and release automation.
All split repositories are tagged v2.0.0 and internal Composer requirements use ^2.0.
The main package uses a native BIFF8/OLE reader and writer with no PhpSpreadsheet dependency or fallback.
The database package depends on Core and PDO; it does not install XLSX.
The main package owns direct large-XLSX-to-PDO orchestration.
Core uses capability interfaces and actionable optional-package errors instead of importing concrete format classes.
Import-template generation and compatibility fixtures are package-local and do not require Application.
Install the main distribution and keep Composer on the 2.x line.
The public documentation targets mnb/mnb-phpexcel. Split repositories remain implementation and release units rather than extra installation steps for normal documentation users.
Require the supported major line.
composer require mnb/mnb-phpexcel:^2.0Use the complete main package when following the public guides and examples.
Make the release constraint explicit.
{
"require": {
"mnb/mnb-phpexcel": "^2.0"
}
}After a patch release is published, run composer update mnb/mnb-phpexcel -W to refresh the lock file and installed code.
Remove compatibility assumptions that no longer describe v2.
Do this before diagnosing runtime differences. Old class names, fallback expectations, and package assumptions can hide the real upgrade state.
Replace Compatibility\XlsReader and Compatibility\XlsWriter with Reader\XlsReader, Writer\XlsWriter, or Format\Xls.
Remove phpoffice/phpspreadsheet when no unrelated dependency still requires it.
Use MnbExcel for normal reads and writes; specialized Format\Xlsx APIs are included in the same main package.
Treat LargeExcelDatabaseImportEngine as part of the main package.
Treat ODS as a reader-only module.
Apply the compatible v2.0.1 through v2.0.6 maintenance changes.
Projects using ^2.0 can accept these compatible patch releases. Existing tags remain immutable; fixes belong in new patch tags.
v2.0.1Native XMLReader initialization no longer reads libxml-backed properties before the first node.
v2.0.2Worksheet selection throws actionable SheetSelectionException errors with stable codes and caller context.
v2.0.3Added active-sheet discovery, optional sheet selection, normalized empty checks, and assertHasRows().
v2.0.4Added the opt-in MnbExcelErrorHandler for clean developer text, HTML, or JSON rendering.
v2.0.5Structured sheet/workbook summaries distinguish total, source, explicit/implicit empty, skipped, header, and returned row counts.
v2.0.6Current mono-library release and documentation version alignment.
Publish the main package in a repeatable sequence.
Composer versions come from Git tags. Do not add a manual version field to the library Composer file.
- 01
Merge tested changes into main.
- 02
Run Composer validation and the full test suite.
- 03
Create an immutable patch tag such as v2.0.6.
- 04
Push main and the tag.
- 05
Refresh Packagist and verify the installed dist archive.
- 06
Deploy the matching documentation site.
Verify the distribution before you publish the tag.
The upgrade is not complete when Composer resolves. Validate package metadata, runtime behavior, generated files, database paths, and the matching documentation deployment.
- Run composer validate --strict in the main repository.
- Run the main package syntax, smoke, integration, and release checks.
- Run full facade and format interconnectivity tests.
- Confirm composer why phpoffice/phpspreadsheet reports no MNB dependency.
- Open representative native XLS and XLSX output in Microsoft Excel desktop and LibreOffice.
- Test against every supported PDO driver with real transactions and duplicate constraints.
- Validate the documentation site, clean links, code snippets, sitemap, and production routing.