From 3276b3fb1eb327e465051f4a2ad27448406e2050 Mon Sep 17 00:00:00 2001 From: kalpaitch Date: Wed, 7 Mar 2018 13:42:54 +0100 Subject: [PATCH 01/10] Update 'composer.json' --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4e8a836..13cfab6 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "deblan/csv-validator", + "name": "kalpaitch/csv-validator", "description": "CSV validator library", "license": "BSD-2-Clause", "authors": [ @@ -16,7 +16,7 @@ "minimum-stability": "dev", "require": { "php": ">=5.6.0", - "symfony/validator": "2.*", + "symfony/validator": "3.*", "deblan/csv": "v2.0.*" } } From f9553115ee03606efee4000434fe0988fe0d18e1 Mon Sep 17 00:00:00 2001 From: kalpaitch Date: Wed, 7 Mar 2018 13:43:19 +0100 Subject: [PATCH 02/10] Update 'composer.json' --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 13cfab6..4e561ff 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "kalpaitch/csv-validator", + "name": "deblan/csv-validator", "description": "CSV validator library", "license": "BSD-2-Clause", "authors": [ From 95c470e4045cc7571212650ce77a82cca767ba6c Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 29 May 2018 15:37:17 +0200 Subject: [PATCH 03/10] symfony/validator v3.* --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4e8a836..4e561ff 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "minimum-stability": "dev", "require": { "php": ">=5.6.0", - "symfony/validator": "2.*", + "symfony/validator": "3.*", "deblan/csv": "v2.0.*" } } From 6169083b5e7cc698df303f70af4e62180a543888 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 6 Jun 2018 15:55:17 +0200 Subject: [PATCH 04/10] CI --- README.md | 2 +- phpunit.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a83c640..f93e91c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ csv-validator ============= -[![](https://phpci.gitnet.fr/build-status/image/2?branch=master&label=PHPCensor&style=flat-square)](https://phpci.gitnet.fr/build-status/view/2) +[![](https://phpci.gitnet.fr/build-status/image/1?branch=master&label=PHPCensor&style=flat-square)](https://phpci.gitnet.fr/build-status/view/1) CSV validator library diff --git a/phpunit.xml b/phpunit.xml index eabb967..4f465be 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,7 +7,7 @@ convertWarningsToExceptions = "true" processIsolation = "false" stopOnFailure = "false" - syntaxCheck = "false" + syntaxCheck = "true" bootstrap = "vendor/autoload.php" > From af0c45c6bcf9fb5ece330c28c4cea1cec8b877aa Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 6 Jun 2018 19:03:13 +0200 Subject: [PATCH 05/10] CI --- phpci.yml => .php-censor.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename phpci.yml => .php-censor.yml (100%) diff --git a/phpci.yml b/.php-censor.yml similarity index 100% rename from phpci.yml rename to .php-censor.yml From cd43e2fed963fb79c33689024e6b9bd0d804e1d1 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 20 Jan 2020 11:04:04 +0100 Subject: [PATCH 06/10] upgrade dependencies (php7) --- Makefile | 4 ++++ composer.json | 4 ++-- phpunit.xml | 1 - tests/ExampleTest.php | 4 +++- tests/ValidatorTest.php | 5 +++-- tests/ViolationTest.php | 3 ++- 6 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..990a451 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +.PHONY: tests + +tests: + phpunit diff --git a/composer.json b/composer.json index 4e561ff..5b8f1c4 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ }, "minimum-stability": "dev", "require": { - "php": ">=5.6.0", - "symfony/validator": "3.*", + "php": "^7.1.3", + "symfony/validator": "^4", "deblan/csv": "v2.0.*" } } diff --git a/phpunit.xml b/phpunit.xml index 4f465be..eb8c372 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,7 +7,6 @@ convertWarningsToExceptions = "true" processIsolation = "false" stopOnFailure = "false" - syntaxCheck = "true" bootstrap = "vendor/autoload.php" > diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 4d0705f..0be5792 100644 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -1,11 +1,13 @@ */ -class ExampleTest extends \PHPUnit_Framework_TestCase +class ExampleTest extends TestCase { public function testExemple() { diff --git a/tests/ValidatorTest.php b/tests/ValidatorTest.php index f3d75ac..13d6462 100644 --- a/tests/ValidatorTest.php +++ b/tests/ValidatorTest.php @@ -1,18 +1,19 @@ generateParser('example.csv'); $validator = $this->generateValidator($parser); - $this->setExpectedException('\RuntimeException'); + $this->expectException('\RuntimeException'); $validator->isValid(); } diff --git a/tests/ViolationTest.php b/tests/ViolationTest.php index 1fd0484..c798ab4 100644 --- a/tests/ViolationTest.php +++ b/tests/ViolationTest.php @@ -1,9 +1,10 @@ Date: Tue, 1 Sep 2020 16:24:15 +0200 Subject: [PATCH 07/10] add compatibility with deblan/csv@v3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5b8f1c4..dd0a7c3 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,6 @@ "require": { "php": "^7.1.3", "symfony/validator": "^4", - "deblan/csv": "v2.0.*" + "deblan/csv": "v2.0.*|v3.*" } } From fac4371d69f36ee50f918dca99d8e560009d84cd Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 1 Sep 2020 16:24:29 +0200 Subject: [PATCH 08/10] fix issue with validation --- src/Deblan/CsvValidator/Validator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Deblan/CsvValidator/Validator.php b/src/Deblan/CsvValidator/Validator.php index 6374910..b590c9f 100644 --- a/src/Deblan/CsvValidator/Validator.php +++ b/src/Deblan/CsvValidator/Validator.php @@ -122,6 +122,7 @@ class Validator if ($this->parser !== $parser) { $this->parser = $parser; $this->errors = []; + $this->hasValidate = false; } elseif ($this->hasValidate) { return; } From 2d06d4adc5df0f319593b76ea770c206b0b8b2f8 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 1 Sep 2020 16:25:29 +0200 Subject: [PATCH 09/10] add jenkins tests --- Jenkinsfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..6e0cddf --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,25 @@ +pipeline { + agent any + + stages { + stage('PHP 7.1') { + steps { + sh '/usr/local/bin/composer-php7.1 install' + sh 'php7.1 /usr/local/bin/phpunit-7' + } + } + stage('PHP 7.3') { + steps { + sh '/usr/local/bin/composer-php7.3 update' + sh 'php7.3 /usr/local/bin/phpunit-9' + } + } + stage('PHP 7.4') { + steps { + sh '/usr/local/bin/composer-php7.4 update' + sh 'php7.4 /usr/local/bin/phpunit-9' + } + } + } +} + From a2e1ac418c5992be2279049d0003833e800b3f57 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 1 Sep 2020 16:28:22 +0200 Subject: [PATCH 10/10] add jenkins status --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f93e91c..48d866e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ csv-validator ============= -[![](https://phpci.gitnet.fr/build-status/image/1?branch=master&label=PHPCensor&style=flat-square)](https://phpci.gitnet.fr/build-status/view/1) +[![Build Status](https://ci.gitnet.fr/buildStatus/icon?job=Gitnet%2Fcsv-validator%2F3)](https://ci.gitnet.fr/job/Gitnet/job/csv-validator/job/3/) CSV validator library