summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-02-14 15:12:35 +0100
committerIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-02-14 15:52:52 +0100
commit941299fce9de20dce87b687854ac35351f128183 (patch)
treeeff1e952d951f888f3d0cd88fe70f0ce8cb32fe9
parentb335f347ad67f639a2b2e375e07186580cc9e860 (diff)
downloadcsv-941299fce9de20dce87b687854ac35351f128183.zip
csv-941299fce9de20dce87b687854ac35351f128183.tar.gz
csv-941299fce9de20dce87b687854ac35351f128183.tar.bz2
Updating the library dropping PSR-0 in favor of PSR-4
-rw-r--r--README.md17
-rw-r--r--composer.json7
-rw-r--r--phpunit.xml4
-rw-r--r--src/AbstractCsv.php (renamed from src/Bakame/Csv/AbstractCsv.php)0
-rw-r--r--src/Iterator/IteratorQuery.php (renamed from src/Bakame/Csv/Iterator/IteratorQuery.php)0
-rw-r--r--src/Iterator/MapIterator.php (renamed from src/Bakame/Csv/Iterator/MapIterator.php)0
-rw-r--r--src/Reader.php (renamed from src/Bakame/Csv/Reader.php)0
-rw-r--r--src/Writer.php (renamed from src/Bakame/Csv/Writer.php)0
-rw-r--r--test/CsvTest.php (renamed from test/Bakame/Csv/CsvTest.php)0
-rw-r--r--test/Iterator/IteratorQueryTest.php (renamed from test/Bakame/Csv/Iterator/IteratorQueryTest.php)0
-rw-r--r--test/ReaderTest.php (renamed from test/Bakame/Csv/ReaderTest.php)0
-rw-r--r--test/WriterTest.php (renamed from test/Bakame/Csv/WriterTest.php)0
-rw-r--r--test/data/prenoms.csv (renamed from test/Bakame/Csv/data/prenoms.csv)0
-rw-r--r--test/foo.csv (renamed from test/Bakame/Csv/foo.csv)0
14 files changed, 14 insertions, 14 deletions
diff --git a/README.md b/README.md
index dbcf1de..d803628 100644
--- a/README.md
+++ b/README.md
@@ -5,21 +5,22 @@ Bakame.csv
A simple library to easily load, manipulate and save CSV files in PHP 5.4+
-This package is compliant with [PSR-0][], [PSR-1][], and [PSR-2][].
+This package is compliant with [PSR-1][], [PSR-2][], and [PSR-4][].
-[PSR-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[PSR-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
[PSR-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
+[PSR-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
+
System Requirements
-------
You need **PHP >= 5.4.0** and the `mbstring` extension to use `Bakame\Csv` but the latest stable version of PHP is recommended.
-Installation
+Install
-------
-You may install the Bakame.csv package with Composer (recommended) or manually.
+Install the Bakame.csv package with Composer.
```json
{
@@ -29,10 +30,6 @@ You may install the Bakame.csv package with Composer (recommended) or manually.
}
```
-**Manual Install:**
-
-Download and extract the library in a specific directory, then add `'/path/to/Bakame/Csv/src'` to your PSR-0 compliant autoloader.
-
Usage
-------
@@ -197,7 +194,7 @@ $data = $reader->fetchAssoc(['firstname', 'lastname', 'email']);
// ]
//
```
->
+
> * If the number of values in a CSV row is lesser than the number of named keys, the method will add `null` values to compensate for the missing values.
> * If the number of values in a CSV row is greater that the number of named keys the exceeding values will be drop from the result set.
@@ -403,3 +400,5 @@ Credits
- [ignace nyamagana butera](https://github.com/nyamsprod)
- [All Contributors](graphs/contributors)
+
+[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/nyamsprod/bakame.csv/trend.png)](https://bitdeli.com/free "Bitdeli Badge") \ No newline at end of file
diff --git a/composer.json b/composer.json
index d84e9c2..8f7eb4c 100644
--- a/composer.json
+++ b/composer.json
@@ -17,8 +17,9 @@
"ext-mbstring" : "*"
},
"autoload": {
- "psr-0": {
- "Bakame": ["src", "test"]
+ "psr-4": {
+ "Bakame\\Csv\\": "src",
+ "Bakame\\CSv\\": "test"
}
}
-} \ No newline at end of file
+}
diff --git a/phpunit.xml b/phpunit.xml
index a6e7dd5..55cd758 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -13,13 +13,13 @@
<testsuites>
<testsuite name="Bakame CSV Test Suite">
- <directory>test/Bakame</directory>
+ <directory>test</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
- <directory suffix=".php">src/Bakame</directory>
+ <directory suffix=".php">src/</directory>
</whitelist>
</filter>
diff --git a/src/Bakame/Csv/AbstractCsv.php b/src/AbstractCsv.php
index 9b9bd71..9b9bd71 100644
--- a/src/Bakame/Csv/AbstractCsv.php
+++ b/src/AbstractCsv.php
diff --git a/src/Bakame/Csv/Iterator/IteratorQuery.php b/src/Iterator/IteratorQuery.php
index 5541b43..5541b43 100644
--- a/src/Bakame/Csv/Iterator/IteratorQuery.php
+++ b/src/Iterator/IteratorQuery.php
diff --git a/src/Bakame/Csv/Iterator/MapIterator.php b/src/Iterator/MapIterator.php
index 12843c0..12843c0 100644
--- a/src/Bakame/Csv/Iterator/MapIterator.php
+++ b/src/Iterator/MapIterator.php
diff --git a/src/Bakame/Csv/Reader.php b/src/Reader.php
index 028a7bf..028a7bf 100644
--- a/src/Bakame/Csv/Reader.php
+++ b/src/Reader.php
diff --git a/src/Bakame/Csv/Writer.php b/src/Writer.php
index c853324..c853324 100644
--- a/src/Bakame/Csv/Writer.php
+++ b/src/Writer.php
diff --git a/test/Bakame/Csv/CsvTest.php b/test/CsvTest.php
index e912505..e912505 100644
--- a/test/Bakame/Csv/CsvTest.php
+++ b/test/CsvTest.php
diff --git a/test/Bakame/Csv/Iterator/IteratorQueryTest.php b/test/Iterator/IteratorQueryTest.php
index 45e7b6f..45e7b6f 100644
--- a/test/Bakame/Csv/Iterator/IteratorQueryTest.php
+++ b/test/Iterator/IteratorQueryTest.php
diff --git a/test/Bakame/Csv/ReaderTest.php b/test/ReaderTest.php
index 25d0241..25d0241 100644
--- a/test/Bakame/Csv/ReaderTest.php
+++ b/test/ReaderTest.php
diff --git a/test/Bakame/Csv/WriterTest.php b/test/WriterTest.php
index 7b228cb..7b228cb 100644
--- a/test/Bakame/Csv/WriterTest.php
+++ b/test/WriterTest.php
diff --git a/test/Bakame/Csv/data/prenoms.csv b/test/data/prenoms.csv
index 6c6c10f..6c6c10f 100644
--- a/test/Bakame/Csv/data/prenoms.csv
+++ b/test/data/prenoms.csv
diff --git a/test/Bakame/Csv/foo.csv b/test/foo.csv
index 4307de4..4307de4 100644
--- a/test/Bakame/Csv/foo.csv
+++ b/test/foo.csv