]> git.agnieray.net Git - galette.git/commitdiff
Update faker, zend-i18n, add php 7.4 faker patch
authorJohan Cwiklinski <jcwiklinski@teclib.com>
Sat, 19 Oct 2019 21:31:20 +0000 (23:31 +0200)
committerJohan Cwiklinski <jcwiklinski@teclib.com>
Sun, 20 Oct 2019 05:55:50 +0000 (07:55 +0200)
.travis.yml
galette/composer.json
galette/composer.lock
patches/0001-Fix-PHP-7.4-array-syntax.patch [new file with mode: 0644]

index 3ab67992414b34a48492eea90e68800964a30382..e3e42f541476cf9b3c0282c46a1b721cecbc3c92 100644 (file)
@@ -27,7 +27,6 @@ php:
 matrix:
   allow_failures:
     - php: nightly
-    - php: 7.4snapshot
 
 env:
   - DB=pgsql
index 134106818fa5ef54394a411770191079dfb8af11..a8f029f928264e52680c455a66598be0c2ddf960 100644 (file)
@@ -35,7 +35,7 @@
         "phpmailer/phpmailer": "^6",
         "tecnickcom/tcpdf": "^6.2",
         "akrabat/rka-slim-session-middleware": "dev-master@dev",
-        "fzaninotto/faker": "dev-master#c3f82846fdfd1760b277767ac21426ca030f795e",
+        "fzaninotto/faker": "dev-master",
         "zendframework/zend-i18n": "^2.9",
         "zendframework/zend-cache": "^2.8",
         "soundasleep/html2text": "^0.5.0"
     },
     "config": {
         "optimize-autoloader": true
+    },
+    "scripts": {
+        "post-install-cmd": [
+            "patch -d vendor/fzaninotto/faker/ -p1 < ../patches/0001-Fix-PHP-7.4-array-syntax.patch"
+        ]
     }
 }
index 2ea09fc07553f9ae7b00dacb8e2e1d148a02807f..3ca0e91f56788dc5137630d1f6a1c53f2263e698 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "1cc099037e416cedb09249f42d5bb716",
+    "content-hash": "bac9c836bffe059cef05247173b8bdfc",
     "packages": [
         {
             "name": "akrabat/rka-slim-session-middleware",
             "source": {
                 "type": "git",
                 "url": "https://github.com/fzaninotto/Faker.git",
-                "reference": "c3f82846fdfd1760b277767ac21426ca030f795e"
+                "reference": "674d89ac0dd42a03cca42523a0f72bdea90b2725"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/c3f82846fdfd1760b277767ac21426ca030f795e",
-                "reference": "c3f82846fdfd1760b277767ac21426ca030f795e",
+                "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/674d89ac0dd42a03cca42523a0f72bdea90b2725",
+                "reference": "674d89ac0dd42a03cca42523a0f72bdea90b2725",
                 "shasum": ""
             },
             "require": {
             "require-dev": {
                 "ext-intl": "*",
                 "phpunit/phpunit": "^4.8.35 || ^5.7",
-                "squizlabs/php_codesniffer": "^1.5"
+                "squizlabs/php_codesniffer": "^2.9.2"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.8-dev"
+                    "dev-master": "1.9-dev"
                 }
             },
             "autoload": {
                 "faker",
                 "fixtures"
             ],
-            "time": "2017-08-30T09:14:20+00:00"
+            "time": "2019-10-17T13:03:13+00:00"
         },
         {
             "name": "mathmarques/smarty-view",
         },
         {
             "name": "zendframework/zend-i18n",
-            "version": "2.9.1",
+            "version": "2.9.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/zendframework/zend-i18n.git",
-                "reference": "9233ee8553564a6e45e8311a7173734ba4e5db9b"
+                "reference": "e17a54b3aee333ab156958f570cde630acee8b07"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/9233ee8553564a6e45e8311a7173734ba4e5db9b",
-                "reference": "9233ee8553564a6e45e8311a7173734ba4e5db9b",
+                "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/e17a54b3aee333ab156958f570cde630acee8b07",
+                "reference": "e17a54b3aee333ab156958f570cde630acee8b07",
                 "shasum": ""
             },
             "require": {
                 "i18n",
                 "zf"
             ],
-            "time": "2019-09-26T11:54:57+00:00"
+            "time": "2019-09-30T12:04:37+00:00"
         },
         {
             "name": "zendframework/zend-servicemanager",
diff --git a/patches/0001-Fix-PHP-7.4-array-syntax.patch b/patches/0001-Fix-PHP-7.4-array-syntax.patch
new file mode 100644 (file)
index 0000000..38904ad
--- /dev/null
@@ -0,0 +1,69 @@
+From a26b3e795b9fdc353a6e984a14dbbb1a35f93be5 Mon Sep 17 00:00:00 2001
+From: Johan Cwiklinski <jcwiklinski@teclib.com>
+Date: Sat, 19 Oct 2019 23:14:40 +0200
+Subject: [PATCH] Fix PHP 7.4 array syntax
+
+---
+ src/Faker/Calculator/Luhn.php            | 4 ++--
+ test/Faker/Provider/fi_FI/PersonTest.php | 4 ++--
+ test/Faker/Provider/sv_SE/PersonTest.php | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/Faker/Calculator/Luhn.php b/src/Faker/Calculator/Luhn.php
+index c37c6c19..1cb71a16 100644
+--- a/src/Faker/Calculator/Luhn.php
++++ b/src/Faker/Calculator/Luhn.php
+@@ -24,10 +24,10 @@ class Luhn
+         $length = strlen($number);
+         $sum = 0;
+         for ($i = $length - 1; $i >= 0; $i -= 2) {
+-            $sum += $number{$i};
++            $sum += $number[$i];
+         }
+         for ($i = $length - 2; $i >= 0; $i -= 2) {
+-            $sum += array_sum(str_split($number{$i} * 2));
++            $sum += array_sum(str_split($number[$i] * 2));
+         }
+         return $sum % 10;
+diff --git a/test/Faker/Provider/fi_FI/PersonTest.php b/test/Faker/Provider/fi_FI/PersonTest.php
+index b979666e..3093178e 100644
+--- a/test/Faker/Provider/fi_FI/PersonTest.php
++++ b/test/Faker/Provider/fi_FI/PersonTest.php
+@@ -71,12 +71,12 @@ class PersonTest extends TestCase
+     public function testPersonalIdentityNumberGeneratesOddValuesForMales()
+     {
+         $pin = $this->faker->personalIdentityNumber(null, 'male');
+-        $this->assertEquals(1, $pin{9} % 2);
++        $this->assertEquals(1, $pin[9] % 2);
+     }
+     public function testPersonalIdentityNumberGeneratesEvenValuesForFemales()
+     {
+         $pin = $this->faker->personalIdentityNumber(null, 'female');
+-        $this->assertEquals(0, $pin{9} % 2);
++        $this->assertEquals(0, $pin[9] % 2);
+     }
+ }
+diff --git a/test/Faker/Provider/sv_SE/PersonTest.php b/test/Faker/Provider/sv_SE/PersonTest.php
+index 584998da..14e32467 100644
+--- a/test/Faker/Provider/sv_SE/PersonTest.php
++++ b/test/Faker/Provider/sv_SE/PersonTest.php
+@@ -50,12 +50,12 @@ class PersonTest extends TestCase
+     public function testPersonalIdentityNumberGeneratesOddValuesForMales()
+     {
+         $pin = $this->faker->personalIdentityNumber(null, 'male');
+-        $this->assertEquals(1, $pin{9} % 2);
++        $this->assertEquals(1, $pin[9] % 2);
+     }
+     public function testPersonalIdentityNumberGeneratesEvenValuesForFemales()
+     {
+         $pin = $this->faker->personalIdentityNumber(null, 'female');
+-        $this->assertEquals(0, $pin{9} % 2);
++        $this->assertEquals(0, $pin[9] % 2);
+     }
+ }
+-- 
+2.21.0
+