From cb24a89d00cebb37cc6c2b9ffa1c215d77c85ce3 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 14 Aug 2020 22:50:05 +1000 Subject: [PATCH] Fixes for carbon date handling on entities --- .../Requests/Invoice/UpdateInvoiceRequest.php | 3 - app/Models/Credit.php | 3 - app/Models/Quote.php | 5 - app/Repositories/BaseRepository.php | 1 - composer.lock | 265 +++++++++++++----- 5 files changed, 193 insertions(+), 84 deletions(-) diff --git a/app/Http/Requests/Invoice/UpdateInvoiceRequest.php b/app/Http/Requests/Invoice/UpdateInvoiceRequest.php index 2907fc2e13bf..a78cb6626a4c 100644 --- a/app/Http/Requests/Invoice/UpdateInvoiceRequest.php +++ b/app/Http/Requests/Invoice/UpdateInvoiceRequest.php @@ -75,9 +75,6 @@ class UpdateInvoiceRequest extends Request if (array_key_exists('assigned_user_id', $input) && is_string($input['assigned_user_id'])) { $input['assigned_user_id'] = $this->decodePrimaryKey($input['assigned_user_id']); } - info($input['due_date']); - //unset($input['due_date']); - //unset($input['date']); if (isset($input['invitations'])) { foreach ($input['invitations'] as $key => $value) { diff --git a/app/Models/Credit.php b/app/Models/Credit.php index bf84869ed935..3f6aed94c7ce 100644 --- a/app/Models/Credit.php +++ b/app/Models/Credit.php @@ -96,7 +96,6 @@ class Credit extends BaseModel public function getDateAttribute($value) { if (!empty($value)) { - //$value format 'Y:m:d H:i:s' to 'Y-m-d H:i' return (new Carbon($value))->format('Y-m-d'); } return $value; @@ -105,7 +104,6 @@ class Credit extends BaseModel public function getDueDateAttribute($value) { if (!empty($value)) { - //$value format 'Y:m:d H:i:s' to 'Y-m-d H:i' return (new Carbon($value))->format('Y-m-d'); } return $value; @@ -114,7 +112,6 @@ class Credit extends BaseModel public function getPartialDueDateAttribute($value) { if (!empty($value)) { - //$value format 'Y:m:d H:i:s' to 'Y-m-d H:i' return (new Carbon($value))->format('Y-m-d'); } return $value; diff --git a/app/Models/Quote.php b/app/Models/Quote.php index 498acaaf9d52..0f17db4712b2 100644 --- a/app/Models/Quote.php +++ b/app/Models/Quote.php @@ -103,7 +103,6 @@ class Quote extends BaseModel public function getDateAttribute($value) { if (!empty($value)) { - info("parsing date"); return (new Carbon($value))->format('Y-m-d'); } @@ -113,8 +112,6 @@ class Quote extends BaseModel public function getDueDateAttribute($value) { if (!empty($value)) { - - info("parsing due date"); return (new Carbon($value))->format('Y-m-d'); } @@ -124,8 +121,6 @@ class Quote extends BaseModel public function getPartialDueDateAttribute($value) { if (!empty($value)) { - - info("parsing partial date"); return (new Carbon($value))->format('Y-m-d'); } diff --git a/app/Repositories/BaseRepository.php b/app/Repositories/BaseRepository.php index 26657d78f107..02cd86de56ef 100644 --- a/app/Repositories/BaseRepository.php +++ b/app/Repositories/BaseRepository.php @@ -194,7 +194,6 @@ class BaseRepository */ protected function alternativeSave($data, $model) { -// info(print_r($data,1)); $class = new ReflectionClass($model); diff --git a/composer.lock b/composer.lock index 70d7f665f93b..d47da2b8936b 100644 --- a/composer.lock +++ b/composer.lock @@ -107,16 +107,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.147.14", + "version": "3.149.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2ac5757aee4333c382c222880a51bd56930dafc4" + "reference": "0ab4ac60f94d53d55f2c7374deb75d9a58961970" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2ac5757aee4333c382c222880a51bd56930dafc4", - "reference": "2ac5757aee4333c382c222880a51bd56930dafc4", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0ab4ac60f94d53d55f2c7374deb75d9a58961970", + "reference": "0ab4ac60f94d53d55f2c7374deb75d9a58961970", "shasum": "" }, "require": { @@ -188,7 +188,7 @@ "s3", "sdk" ], - "time": "2020-08-06T18:18:37+00:00" + "time": "2020-08-13T18:10:50+00:00" }, { "name": "checkout/checkout-sdk-php", @@ -514,21 +514,21 @@ }, { "name": "composer/package-versions-deprecated", - "version": "1.10.99", + "version": "1.10.99.1", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "dd51b4443d58b34b6d9344cf4c288e621c9a826f" + "reference": "68c9b502036e820c33445ff4d174327f6bb87486" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/dd51b4443d58b34b6d9344cf4c288e621c9a826f", - "reference": "dd51b4443d58b34b6d9344cf4c288e621c9a826f", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/68c9b502036e820c33445ff4d174327f6bb87486", + "reference": "68c9b502036e820c33445ff4d174327f6bb87486", "shasum": "" }, "require": { "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7" + "php": "^7 || ^8" }, "replace": { "ocramius/package-versions": "1.10.99" @@ -579,7 +579,7 @@ "type": "tidelift" } ], - "time": "2020-07-15T08:39:18+00:00" + "time": "2020-08-13T12:55:41+00:00" }, { "name": "composer/semver", @@ -774,6 +774,50 @@ ], "time": "2020-06-04T11:16:35+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "time": "2019-08-29T20:11:49+00:00" + }, { "name": "czproject/git-php", "version": "v3.18.1", @@ -1418,16 +1462,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.18", + "version": "2.1.19", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441" + "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/840d5603eb84cc81a6a0382adac3293e57c1c64c", + "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c", "shasum": "" }, "require": { @@ -1472,7 +1516,7 @@ "validation", "validator" ], - "time": "2020-06-16T20:11:17+00:00" + "time": "2020-08-08T21:28:19+00:00" }, { "name": "fedeisas/laravel-mail-css-inliner", @@ -2892,28 +2936,29 @@ }, { "name": "league/flysystem", - "version": "1.0.70", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493" + "reference": "6e96f54d82e71f71c4108da33ee96a7f57083710" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493", - "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/6e96f54d82e71f71c4108da33ee96a7f57083710", + "reference": "6e96f54d82e71f71c4108da33ee96a7f57083710", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": ">=5.5.9" + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "phpunit/phpunit": "^5.7.26" + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -2978,7 +3023,7 @@ "type": "other" } ], - "time": "2020-07-26T07:20:36+00:00" + "time": "2020-08-12T14:23:41+00:00" }, { "name": "league/flysystem-aws-s3-v3", @@ -3199,6 +3244,57 @@ ], "time": "2020-07-07T12:23:45+00:00" }, + { + "name": "league/mime-type-detection", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "fda190b62b962d96a069fcc414d781db66d65b69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69", + "reference": "fda190b62b962d96a069fcc414d781db66d65b69", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.36", + "phpunit/phpunit": "^8.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2020-08-09T10:34:01+00:00" + }, { "name": "league/oauth1-client", "version": "1.7.0", @@ -3805,16 +3901,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.7.0", + "version": "v4.8.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "21dce06dfbf0365c6a7cc8fdbdc995926c6a9300" + "reference": "8c58eb4cd4f3883f82611abeac2efbc3dbed787e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/21dce06dfbf0365c6a7cc8fdbdc995926c6a9300", - "reference": "21dce06dfbf0365c6a7cc8fdbdc995926c6a9300", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8c58eb4cd4f3883f82611abeac2efbc3dbed787e", + "reference": "8c58eb4cd4f3883f82611abeac2efbc3dbed787e", "shasum": "" }, "require": { @@ -3822,8 +3918,8 @@ "php": ">=7.0" }, "require-dev": { - "ircmaxell/php-yacc": "0.0.5", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + "ircmaxell/php-yacc": "^0.0.6", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -3831,7 +3927,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.7-dev" + "dev-master": "4.8-dev" } }, "autoload": { @@ -3853,7 +3949,7 @@ "parser", "php" ], - "time": "2020-07-25T13:18:53+00:00" + "time": "2020-08-09T10:23:20+00:00" }, { "name": "nwidart/laravel-modules", @@ -4129,16 +4225,16 @@ }, { "name": "opis/closure", - "version": "3.5.5", + "version": "3.5.6", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c" + "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c", + "url": "https://api.github.com/repos/opis/closure/zipball/e8d34df855b0a0549a300cb8cb4db472556e8aa9", + "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9", "shasum": "" }, "require": { @@ -4186,7 +4282,7 @@ "serialization", "serialize" ], - "time": "2020-06-17T14:59:55+00:00" + "time": "2020-08-11T08:46:50+00:00" }, { "name": "paragonie/random_compat", @@ -4838,19 +4934,20 @@ }, { "name": "predis/predis", - "version": "v1.1.1", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/nrk/predis.git", - "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1" + "url": "https://github.com/predishq/predis.git", + "reference": "82eb18c6c3860849cb6e2ff34b0c4b39d5daee46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", - "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1", + "url": "https://api.github.com/repos/predishq/predis/zipball/82eb18c6c3860849cb6e2ff34b0c4b39d5daee46", + "reference": "82eb18c6c3860849cb6e2ff34b0c4b39d5daee46", "shasum": "" }, "require": { + "cweagans/composer-patches": "^1.6", "php": ">=5.3.9" }, "require-dev": { @@ -4861,6 +4958,18 @@ "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" }, "type": "library", + "extra": { + "composer-exit-on-patch-failure": true, + "patches": { + "phpunit/phpunit-mock-objects": { + "Fix PHP 7 and 8 compatibility": "./tests/phpunit_mock_objects.patch" + }, + "phpunit/phpunit": { + "Fix PHP 7 compatibility": "./tests/phpunit_php7.patch", + "Fix PHP 8 compatibility": "./tests/phpunit_php8.patch" + } + } + }, "autoload": { "psr-4": { "Predis\\": "src/" @@ -4884,7 +4993,17 @@ "predis", "redis" ], - "time": "2016-06-16T16:22:20+00:00" + "funding": [ + { + "url": "https://www.paypal.me/tillkruss", + "type": "custom" + }, + { + "url": "https://github.com/tillkruss", + "type": "github" + } + ], + "time": "2020-08-11T17:28:15+00:00" }, { "name": "psr/cache", @@ -5544,16 +5663,16 @@ }, { "name": "seld/jsonlint", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1" + "reference": "3d5eb71705adfa34bd34b993400622932b2f62fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", - "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/3d5eb71705adfa34bd34b993400622932b2f62fd", + "reference": "3d5eb71705adfa34bd34b993400622932b2f62fd", "shasum": "" }, "require": { @@ -5599,7 +5718,7 @@ "type": "tidelift" } ], - "time": "2020-04-30T19:05:18+00:00" + "time": "2020-08-13T09:07:59+00:00" }, { "name": "seld/phar-utils", @@ -6111,16 +6230,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.46.1", + "version": "v7.47.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "fd57205d3e3a1dccab80538654128d5c46a1f5ac" + "reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/fd57205d3e3a1dccab80538654128d5c46a1f5ac", - "reference": "fd57205d3e3a1dccab80538654128d5c46a1f5ac", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306", + "reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306", "shasum": "" }, "require": { @@ -6164,7 +6283,7 @@ "payment processing", "stripe" ], - "time": "2020-08-07T22:11:58+00:00" + "time": "2020-08-13T22:35:56+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -8827,29 +8946,30 @@ }, { "name": "barryvdh/laravel-debugbar", - "version": "v3.3.3", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5" + "reference": "9e785aa5584e8839fd43070202dd7f2e912db51c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/57f2219f6d9efe41ed1bc880d86701c52f261bf5", - "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/9e785aa5584e8839fd43070202dd7f2e912db51c", + "reference": "9e785aa5584e8839fd43070202dd7f2e912db51c", "shasum": "" }, "require": { "illuminate/routing": "^5.5|^6|^7", "illuminate/session": "^5.5|^6|^7", "illuminate/support": "^5.5|^6|^7", - "maximebf/debugbar": "^1.15.1", + "maximebf/debugbar": "^1.16.3", "php": ">=7.0", "symfony/debug": "^3|^4|^5", "symfony/finder": "^3|^4|^5" }, "require-dev": { - "laravel/framework": "5.5.x" + "orchestra/testbench": "^3.5|^4.0|^5.0", + "phpunit/phpunit": "^6.0|^7.0|^8.5|^9.0" }, "type": "library", "extra": { @@ -8897,7 +9017,7 @@ "type": "github" } ], - "time": "2020-05-05T10:53:32+00:00" + "time": "2020-08-11T10:30:51+00:00" }, { "name": "beyondcode/laravel-dump-server", @@ -9032,16 +9152,16 @@ }, { "name": "doctrine/annotations", - "version": "1.10.3", + "version": "1.10.4", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d" + "reference": "bfe91e31984e2ba76df1c1339681770401ec262f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d", - "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/bfe91e31984e2ba76df1c1339681770401ec262f", + "reference": "bfe91e31984e2ba76df1c1339681770401ec262f", "shasum": "" }, "require": { @@ -9051,7 +9171,8 @@ }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", "extra": { @@ -9097,7 +9218,7 @@ "docblock", "parser" ], - "time": "2020-05-25T17:24:27+00:00" + "time": "2020-08-10T19:35:50+00:00" }, { "name": "doctrine/instantiator", @@ -9476,16 +9597,16 @@ }, { "name": "mockery/mockery", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283" + "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283", - "reference": "9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283", + "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", "shasum": "" }, "require": { @@ -9494,7 +9615,7 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0|~9.0" + "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" }, "type": "library", "extra": { @@ -9537,7 +9658,7 @@ "test double", "testing" ], - "time": "2020-07-09T08:23:05+00:00" + "time": "2020-08-11T18:10:21+00:00" }, { "name": "myclabs/deep-copy",