PHPackages                             bakame/csv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. bakame/csv

Abandoned → [league/csv](/?search=league%2Fcsv)Library[PDF &amp; Document Generation](/categories/documents)

bakame/csv
==========

CSV data manipulation made easy in PHP

9.28.0(4mo ago)3.5k83347[2 issues](https://github.com/thephpleague/csv/issues)[1 PRs](https://github.com/thephpleague/csv/pulls)MITPHPPHP ^8.1.2CI passing

Since Dec 3Pushed 5d ago54 watchersCompare

[ Source](https://github.com/thephpleague/csv)[ Packagist](https://packagist.org/packages/bakame/csv)[ Docs](https://csv.thephpleague.com)[ GitHub Sponsors](https://github.com/sponsors/nyamsprod)[ RSS](/packages/bakame-csv/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (8)Versions (85)Used By (0)

CSV
===

[](#csv)

[![Latest Version](https://camo.githubusercontent.com/cdd45b8f7b58a15ccdff03e934a13b39f515c8082ff6ce444d1b8cb0cf1f6dc6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f6373762e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/csv/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build](https://github.com/thephpleague/csv/workflows/build/badge.svg)](https://github.com/thephpleague/csv/actions?query=workflow%3A%22build%22)[![Total Downloads](https://camo.githubusercontent.com/adfdb4bc1efb69e07b322dadbbe0430365ae5c31d4dc52e49b0fd60a108fdfb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f6373762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/csv)

Csv is a library to ease parsing, writing and filtering CSV in PHP. The library goal is to be powerful while remaining lightweight, by utilizing PHP native features whenever possible.

Highlights
----------

[](#highlights)

- Straightforward API
- Read from and Write to CSV documents in a memory efficient and scalable way
- Flexible and powerful query features and array to object mapping.
- Transform CSV documents into popular format (`JSON`, `XML` or `HTML`)
- Support PHP stream filtering capabilities
- Fully documented
- Fully unit tested
- Framework-agnostic

Documentation
-------------

[](#documentation)

Full documentation can be found at [csv.thephpleague.com](https://csv.thephpleague.com).

System Requirements
-------------------

[](#system-requirements)

You need the `ext-filter` extension to use `Csv` and the latest stable version of PHP is recommended.

Please find below the PHP support for `Csv` version 9.

Min. Library VersionMin. PHP VersionMax. Supported PHP Version9.0.0PHP 7.0.10PHP 7.1.x9.1.2PHP 7.0.10PHP 7.2.x9.2.0PHP 7.0.10PHP 7.4.x9.6.0PHP 7.2.5PHP 7.4.x9.6.2PHP 7.2.5PHP 8.0.x9.7.0PHP 7.3.0PHP 8.0.x9.7.3PHP 7.3.0PHP 8.1.x9.8.0PHP 7.4.0PHP 8.1.x9.9.0PHP 8.1.2PHP 8.3.x9.16.0PHP 8.1.2PHP 8.xInstall
-------

[](#install)

Install `Csv` using Composer.

```
composer require league/csv:^9.0
```

Configuration
-------------

[](#configuration)

Warning

**Starting with PHP8.4 Deprecation notices will be trigger if you do not explicitly set the escape parameter.**see [Deprecation for PHP8.4](https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_proprietary_csv_escaping_mechanism) and [CSV and PHP8.4](https://nyamsprod.com/blog/csv-and-php8-4/)

Tip

If your CSV document was created or is read on a **Legacy Macintosh computer**, add the following lines before using the library to help [PHP detect line ending](http://php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-returnvalues).

```
if (!ini_get('auto_detect_line_endings')) {
    ini_set('auto_detect_line_endings', '1');
}
```

Warning

**The ini setting is deprecated since PHP version 8.1 and will be removed in PHP 9.0**

Testing
-------

[](#testing)

The library has:

- a [PHPUnit](https://phpunit.de) test suite.
- a coding style compliance test suite using [PHP CS Fixer](https://cs.symfony.com/).
- a code analysis compliance test suite using [PHPStan](https://github.com/phpstan/phpstan).

To run the tests, run the following command from the project folder.

```
composer test
```

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [ignace nyamagana butera](https://github.com/nyamsprod)
- [All Contributors](https://github.com/thephpleague/csv/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community35

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~27 days

Total

83

Last Release

138d ago

Major Versions

5.4.0 → 6.0.02014-08-28

6.3.0 → 7.0.02015-02-19

7.2.0 → 8.0.02015-12-11

8.2.2 → 9.0.02017-08-18

8.2.3 → 9.1.32018-03-12

PHP version history (8 changes)1.0.0PHP &gt;=5.4.0

8.0.0PHP &gt;=5.5.0

9.0.0PHP &gt;=7.0.10

9.6.0PHP ^7.2.5

9.6.2PHP &gt;=7.2.5

9.7.0PHP ^7.3 || ^8.0

9.8.0PHP ^7.4 || ^8.0

9.9.0PHP ^8.1.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/51073?v=4)[Ignace Nyamagana Butera](/maintainers/nyamsprod)[@nyamsprod](https://github.com/nyamsprod)

---

Top Contributors

[![nyamsprod](https://avatars.githubusercontent.com/u/51073?v=4)](https://github.com/nyamsprod "nyamsprod (1529 commits)")[![pdelre](https://avatars.githubusercontent.com/u/1379248?v=4)](https://github.com/pdelre "pdelre (21 commits)")[![tomkyle](https://avatars.githubusercontent.com/u/412560?v=4)](https://github.com/tomkyle "tomkyle (6 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (5 commits)")[![incredimike](https://avatars.githubusercontent.com/u/125589?v=4)](https://github.com/incredimike "incredimike (5 commits)")[![dmlogic](https://avatars.githubusercontent.com/u/1250252?v=4)](https://github.com/dmlogic "dmlogic (5 commits)")[![george-zakharov](https://avatars.githubusercontent.com/u/11558952?v=4)](https://github.com/george-zakharov "george-zakharov (4 commits)")[![on2](https://avatars.githubusercontent.com/u/7304119?v=4)](https://github.com/on2 "on2 (4 commits)")[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (3 commits)")[![cedric-anne](https://avatars.githubusercontent.com/u/33253653?v=4)](https://github.com/cedric-anne "cedric-anne (3 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (3 commits)")[![jpuck](https://avatars.githubusercontent.com/u/15305396?v=4)](https://github.com/jpuck "jpuck (2 commits)")[![cameroncondry](https://avatars.githubusercontent.com/u/2709431?v=4)](https://github.com/cameroncondry "cameroncondry (2 commits)")[![IonBazan](https://avatars.githubusercontent.com/u/1985514?v=4)](https://github.com/IonBazan "IonBazan (2 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (2 commits)")[![btmash](https://avatars.githubusercontent.com/u/109608?v=4)](https://github.com/btmash "btmash (2 commits)")[![sebsobseb](https://avatars.githubusercontent.com/u/3526974?v=4)](https://github.com/sebsobseb "sebsobseb (2 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (2 commits)")[![webcraft](https://avatars.githubusercontent.com/u/56675?v=4)](https://github.com/webcraft "webcraft (1 commits)")[![ghobaty](https://avatars.githubusercontent.com/u/6379163?v=4)](https://github.com/ghobaty "ghobaty (1 commits)")

---

Tags

csvcsv-convertercsv-documentcsv-filtercsv-queryphpconvertexportcsvfilterimportreadwritetransform

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bakame-csv/health.svg)

```
[![Health](https://phpackages.com/badges/bakame-csv/health.svg)](https://phpackages.com/packages/bakame-csv)
```

###  Alternatives

[league/csv

CSV data manipulation made easy in PHP

3.5k166.1M646](/packages/league-csv)[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[goodby/csv

CSV import/export library

9555.6M23](/packages/goodby-csv)[shuchkin/simplecsv

Parse and retrieve data from CSV files. Export data to CSV.

5192.4k](/packages/shuchkin-simplecsv)[bakame/html-table

convert html table into a PHP data structure

113.0k](/packages/bakame-html-table)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
