Aller au contenu
PHP Ecosystem
Explore

Installation

Ce contenu n’est pas encore disponible dans votre langue.

The package requires PHP 8.3+ and Yii ~2.0.55 || ^22.0@dev: Yii 2.0.55 or later within the 2.0 line, or Yii 22. The selected framework release may require a newer PHP version; check its resolved requirements.

The built-in archiver uses the zip extension. It is needed only when an export produces several files or sets forceArchive; single CSV files and custom archivers work without it.

Terminal window
composer require yii2-extensions/csv-export:^0.1

Applications running Yii 2.0 must keep their existing source for Yii’s Bower assets, such as Asset Packagist, in the application’s root composer.json. CSV Export does not provide those assets. This step is not needed for Yii 22.

To install the development branch from Packagist instead of the stable version, require yii2-extensions/csv-export:dev-main.

Check the installed version with composer show yii2-extensions/csv-export.

This line is a breaking migration, not a drop-in replacement. The Composer name is yii2-extensions/csv-export and the namespace is yii2\extensions\csvexport; there are no legacy class aliases and no Composer replace.

Exports are written to a private child of @runtime/csv-export. The application must define the @runtime alias, which every Yii application does, and the process must be able to create directories there. Change the parent with resultConfig.basePath as described in configuration.

Continue with configuration, usage examples, or the agent skill installation.

Back to documentation