Compare commits

..

No commits in common. "59f66359368c3fdac75d57db884812393138a2bd" and "8d59abf78c4dff6ef7d13bb7e8ac109cbecdda9e" have entirely different histories.

7 changed files with 160 additions and 463 deletions

View File

@ -13,7 +13,7 @@
"PdToolKit\\": "src/"
}
},
"require-dev": {
"illuminate/http": "5.*"
"require": {
"illuminate/http": "^5.5"
}
}

441
composer.lock generated
View File

@ -1,24 +1,23 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "89c4efd9f30183c9f385b99df9bbda0a",
"packages": [],
"packages-dev": [
"content-hash": "f807b62673cb935be7233f59ceb15f57",
"packages": [
{
"name": "doctrine/inflector",
"version": "1.3.1",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1"
"reference": "5527a48b7313d15261292c149e55e26eae771b0a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1",
"reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a",
"reference": "5527a48b7313d15261292c149e55e26eae771b0a",
"shasum": "",
"mirrors": [
{
@ -49,10 +48,6 @@
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
@ -61,6 +56,10 @@
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
@ -78,7 +77,7 @@
"singularize",
"string"
],
"time": "2019-10-30T19:59:35+00:00"
"time": "2018-01-09T20:05:19+00:00"
},
{
"name": "illuminate/contracts",
@ -370,16 +369,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.27.0",
"version": "2.25.3",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "13b8485a8690f103bf19cba64879c218b102b726"
"reference": "d07636581795383e2fea2d711212d30f941f2039"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/13b8485a8690f103bf19cba64879c218b102b726",
"reference": "13b8485a8690f103bf19cba64879c218b102b726",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d07636581795383e2fea2d711212d30f941f2039",
"reference": "d07636581795383e2fea2d711212d30f941f2039",
"shasum": "",
"mirrors": [
{
@ -391,7 +390,7 @@
"require": {
"ext-json": "*",
"php": "^7.1.8 || ^8.0",
"symfony/translation": "^3.4 || ^4.0 || ^5.0"
"symfony/translation": "^3.4 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
@ -406,9 +405,6 @@
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
},
"laravel": {
"providers": [
"Carbon\\Laravel\\ServiceProvider"
@ -442,7 +438,7 @@
"datetime",
"time"
],
"time": "2019-11-20T06:59:06+00:00"
"time": "2019-10-20T11:05:44+00:00"
},
{
"name": "psr/container",
@ -501,16 +497,16 @@
},
{
"name": "psr/log",
"version": "1.1.2",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
"reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"url": "https://api.github.com/repos/php-fig/log/zipball/bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2",
"reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2",
"shasum": "",
"mirrors": [
{
@ -550,7 +546,7 @@
"psr",
"psr-3"
],
"time": "2019-11-01T11:05:21+00:00"
"time": "2019-10-25T08:06:51+00:00"
},
{
"name": "psr/simple-cache",
@ -608,16 +604,16 @@
},
{
"name": "symfony/debug",
"version": "v4.4.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "b8600a1d7d20b0e80906398bb1f50612fa074a8e"
"reference": "cc5c1efd0edfcfd10b354750594a46b3dd2afbbe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/b8600a1d7d20b0e80906398bb1f50612fa074a8e",
"reference": "b8600a1d7d20b0e80906398bb1f50612fa074a8e",
"url": "https://api.github.com/repos/symfony/debug/zipball/cc5c1efd0edfcfd10b354750594a46b3dd2afbbe",
"reference": "cc5c1efd0edfcfd10b354750594a46b3dd2afbbe",
"shasum": "",
"mirrors": [
{
@ -634,12 +630,12 @@
"symfony/http-kernel": "<3.4"
},
"require-dev": {
"symfony/http-kernel": "^3.4|^4.0|^5.0"
"symfony/http-kernel": "~3.4|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -666,82 +662,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2019-11-28T13:33:56+00:00"
},
{
"name": "symfony/error-handler",
"version": "v4.4.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "a1ad02d62789efed1d2b2796f1c15e0c6a00fc3b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/a1ad02d62789efed1d2b2796f1c15e0c6a00fc3b",
"reference": "a1ad02d62789efed1d2b2796f1c15e0c6a00fc3b",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": "^7.1.3",
"psr/log": "~1.0",
"symfony/debug": "^4.4",
"symfony/var-dumper": "^4.4|^5.0"
},
"require-dev": {
"symfony/http-kernel": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\ErrorHandler\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony ErrorHandler Component",
"homepage": "https://symfony.com",
"time": "2019-12-01T08:46:01+00:00"
"time": "2019-09-19T15:51:53+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v4.4.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "b3c3068a72623287550fe20b84a2b01dcba2686f"
"reference": "6229f58993e5a157f6096fc7145c0717d0be8807"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f",
"reference": "b3c3068a72623287550fe20b84a2b01dcba2686f",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6229f58993e5a157f6096fc7145c0717d0be8807",
"reference": "6229f58993e5a157f6096fc7145c0717d0be8807",
"shasum": "",
"mirrors": [
{
@ -763,12 +697,12 @@
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/expression-language": "^3.4|^4.0|^5.0",
"symfony/http-foundation": "^3.4|^4.0|^5.0",
"symfony/service-contracts": "^1.1|^2",
"symfony/stopwatch": "^3.4|^4.0|^5.0"
"symfony/config": "~3.4|~4.0",
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/expression-language": "~3.4|~4.0",
"symfony/http-foundation": "^3.4|^4.0",
"symfony/service-contracts": "^1.1",
"symfony/stopwatch": "~3.4|~4.0"
},
"suggest": {
"symfony/dependency-injection": "",
@ -777,7 +711,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -804,7 +738,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2019-11-28T13:33:56+00:00"
"time": "2019-10-01T16:40:32+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@ -872,16 +806,16 @@
},
{
"name": "symfony/finder",
"version": "v4.4.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "ce8743441da64c41e2a667b8eb66070444ed911e"
"reference": "5e575faa95548d0586f6bedaeabec259714e44d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e",
"reference": "ce8743441da64c41e2a667b8eb66070444ed911e",
"url": "https://api.github.com/repos/symfony/finder/zipball/5e575faa95548d0586f6bedaeabec259714e44d1",
"reference": "5e575faa95548d0586f6bedaeabec259714e44d1",
"shasum": "",
"mirrors": [
{
@ -896,7 +830,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -923,20 +857,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2019-11-17T21:56:56+00:00"
"time": "2019-09-16T11:29:48+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v4.4.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5"
"reference": "76590ced16d4674780863471bae10452b79210a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/8bccc59e61b41963d14c3dbdb23181e5c932a1d5",
"reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/76590ced16d4674780863471bae10452b79210a5",
"reference": "76590ced16d4674780863471bae10452b79210a5",
"shasum": "",
"mirrors": [
{
@ -947,17 +881,17 @@
},
"require": {
"php": "^7.1.3",
"symfony/mime": "^4.3|^5.0",
"symfony/mime": "^4.3",
"symfony/polyfill-mbstring": "~1.1"
},
"require-dev": {
"predis/predis": "~1.0",
"symfony/expression-language": "^3.4|^4.0|^5.0"
"symfony/expression-language": "~3.4|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -984,20 +918,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2019-11-28T13:33:56+00:00"
"time": "2019-10-04T19:48:13+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v4.4.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "e4187780ed26129ee86d5234afbebf085e144f88"
"reference": "5f08141850932e8019c01d8988bf3ed6367d2991"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/e4187780ed26129ee86d5234afbebf085e144f88",
"reference": "e4187780ed26129ee86d5234afbebf085e144f88",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/5f08141850932e8019c01d8988bf3ed6367d2991",
"reference": "5f08141850932e8019c01d8988bf3ed6367d2991",
"shasum": "",
"mirrors": [
{
@ -1009,18 +943,18 @@
"require": {
"php": "^7.1.3",
"psr/log": "~1.0",
"symfony/error-handler": "^4.4",
"symfony/event-dispatcher": "^4.4",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/debug": "~3.4|~4.0",
"symfony/event-dispatcher": "^4.3",
"symfony/http-foundation": "^4.1.1",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-php73": "^1.9"
},
"conflict": {
"symfony/browser-kit": "<4.3",
"symfony/config": "<3.4",
"symfony/console": ">=5",
"symfony/dependency-injection": "<4.3",
"symfony/translation": "<4.2",
"symfony/var-dumper": "<4.1.1",
"twig/twig": "<1.34|<2.4,>=2"
},
"provide": {
@ -1028,32 +962,34 @@
},
"require-dev": {
"psr/cache": "~1.0",
"symfony/browser-kit": "^4.3|^5.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/console": "^3.4|^4.0",
"symfony/css-selector": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^4.3|^5.0",
"symfony/dom-crawler": "^3.4|^4.0|^5.0",
"symfony/expression-language": "^3.4|^4.0|^5.0",
"symfony/finder": "^3.4|^4.0|^5.0",
"symfony/process": "^3.4|^4.0|^5.0",
"symfony/routing": "^3.4|^4.0|^5.0",
"symfony/stopwatch": "^3.4|^4.0|^5.0",
"symfony/templating": "^3.4|^4.0|^5.0",
"symfony/translation": "^4.2|^5.0",
"symfony/translation-contracts": "^1.1|^2",
"twig/twig": "^1.34|^2.4|^3.0"
"symfony/browser-kit": "^4.3",
"symfony/config": "~3.4|~4.0",
"symfony/console": "~3.4|~4.0",
"symfony/css-selector": "~3.4|~4.0",
"symfony/dependency-injection": "^4.3",
"symfony/dom-crawler": "~3.4|~4.0",
"symfony/expression-language": "~3.4|~4.0",
"symfony/finder": "~3.4|~4.0",
"symfony/process": "~3.4|~4.0",
"symfony/routing": "~3.4|~4.0",
"symfony/stopwatch": "~3.4|~4.0",
"symfony/templating": "~3.4|~4.0",
"symfony/translation": "~4.2",
"symfony/translation-contracts": "^1.1",
"symfony/var-dumper": "^4.1.1",
"twig/twig": "^1.34|^2.4"
},
"suggest": {
"symfony/browser-kit": "",
"symfony/config": "",
"symfony/console": "",
"symfony/dependency-injection": ""
"symfony/dependency-injection": "",
"symfony/var-dumper": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -1080,20 +1016,20 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2019-12-01T14:06:38+00:00"
"time": "2019-10-07T15:06:41+00:00"
},
{
"name": "symfony/mime",
"version": "v5.0.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
"reference": "0e6a4ced216e49d457eddcefb61132173a876d79"
"reference": "32f71570547b91879fdbd9cf50317d556ae86916"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79",
"reference": "0e6a4ced216e49d457eddcefb61132173a876d79",
"url": "https://api.github.com/repos/symfony/mime/zipball/32f71570547b91879fdbd9cf50317d556ae86916",
"reference": "32f71570547b91879fdbd9cf50317d556ae86916",
"shasum": "",
"mirrors": [
{
@ -1103,21 +1039,18 @@
]
},
"require": {
"php": "^7.2.5",
"php": "^7.1.3",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0"
},
"conflict": {
"symfony/mailer": "<4.4"
},
"require-dev": {
"egulias/email-validator": "^2.1.10",
"symfony/dependency-injection": "^4.4|^5.0"
"symfony/dependency-injection": "~3.4|^4.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -1148,20 +1081,20 @@
"mime",
"mime-type"
],
"time": "2019-11-30T14:12:50+00:00"
"time": "2019-09-19T17:00:15+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.13.1",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
"shasum": "",
"mirrors": [
{
@ -1179,7 +1112,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@ -1212,20 +1145,20 @@
"polyfill",
"portable"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.13.1",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46"
"reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46",
"reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6af626ae6fa37d396dc90a399c0ff08e5cfc45b2",
"reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2",
"shasum": "",
"mirrors": [
{
@ -1245,7 +1178,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@ -1280,20 +1213,20 @@
"portable",
"shim"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.13.1",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"shasum": "",
"mirrors": [
{
@ -1311,7 +1244,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@ -1345,20 +1278,20 @@
"portable",
"shim"
],
"time": "2019-11-27T14:18:11+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.13.1",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "66fea50f6cb37a35eea048d75a7d99a45b586038"
"reference": "04ce3335667451138df4307d6a9b61565560199e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038",
"reference": "66fea50f6cb37a35eea048d75a7d99a45b586038",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e",
"reference": "04ce3335667451138df4307d6a9b61565560199e",
"shasum": "",
"mirrors": [
{
@ -1373,7 +1306,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@ -1406,20 +1339,20 @@
"portable",
"shim"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.13.1",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "4b0e2222c55a25b4541305a053013d5647d3a25f"
"reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f",
"reference": "4b0e2222c55a25b4541305a053013d5647d3a25f",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188",
"reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188",
"shasum": "",
"mirrors": [
{
@ -1434,7 +1367,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@ -1470,20 +1403,20 @@
"portable",
"shim"
],
"time": "2019-11-27T16:25:15+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/translation",
"version": "v4.4.1",
"version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "897fb68ee7933372517b551d6f08c6d4bb0b8c40"
"reference": "fe6193b066c457c144333c06aaa869a2d42a167f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/897fb68ee7933372517b551d6f08c6d4bb0b8c40",
"reference": "897fb68ee7933372517b551d6f08c6d4bb0b8c40",
"url": "https://api.github.com/repos/symfony/translation/zipball/fe6193b066c457c144333c06aaa869a2d42a167f",
"reference": "fe6193b066c457c144333c06aaa869a2d42a167f",
"shasum": "",
"mirrors": [
{
@ -1495,12 +1428,11 @@
"require": {
"php": "^7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/translation-contracts": "^1.1.6|^2"
"symfony/translation-contracts": "^1.1.6"
},
"conflict": {
"symfony/config": "<3.4",
"symfony/dependency-injection": "<3.4",
"symfony/http-kernel": "<4.4",
"symfony/yaml": "<3.4"
},
"provide": {
@ -1508,14 +1440,15 @@
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/console": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/finder": "~2.8|~3.0|~4.0|^5.0",
"symfony/http-kernel": "^4.4",
"symfony/intl": "^3.4|^4.0|^5.0",
"symfony/service-contracts": "^1.1.2|^2",
"symfony/yaml": "^3.4|^4.0|^5.0"
"symfony/config": "~3.4|~4.0",
"symfony/console": "~3.4|~4.0",
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/finder": "~2.8|~3.0|~4.0",
"symfony/http-kernel": "~3.4|~4.0",
"symfony/intl": "~3.4|~4.0",
"symfony/service-contracts": "^1.1.2",
"symfony/var-dumper": "~3.4|~4.0",
"symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"psr/log-implementation": "To use logging capability in translator",
@ -1525,7 +1458,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -1552,20 +1485,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2019-11-12T17:18:47+00:00"
"time": "2019-09-27T14:37:39+00:00"
},
{
"name": "symfony/translation-contracts",
"version": "v2.0.1",
"version": "v1.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation-contracts.git",
"reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed"
"reference": "364518c132c95642e530d9b2d217acbc2ccac3e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed",
"reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/364518c132c95642e530d9b2d217acbc2ccac3e6",
"reference": "364518c132c95642e530d9b2d217acbc2ccac3e6",
"shasum": "",
"mirrors": [
{
@ -1575,7 +1508,7 @@
]
},
"require": {
"php": "^7.2.5"
"php": "^7.1.3"
},
"suggest": {
"symfony/translation-implementation": ""
@ -1583,7 +1516,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
"dev-master": "1.1-dev"
}
},
"autoload": {
@ -1615,90 +1548,10 @@
"interoperability",
"standards"
],
"time": "2019-11-18T17:27:11+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v5.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "a4862009387721e155be6dc115061f42ee209205"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/a4862009387721e155be6dc115061f42ee209205",
"reference": "a4862009387721e155be6dc115061f42ee209205",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": "^7.2.5",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4"
},
"require-dev": {
"ext-iconv": "*",
"symfony/console": "^4.4|^5.0",
"symfony/process": "^4.4|^5.0",
"twig/twig": "^2.4|^3.0"
},
"suggest": {
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
"ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
},
"bin": [
"Resources/bin/var-dump-server"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"files": [
"Resources/functions/dump.php"
],
"psr-4": {
"Symfony\\Component\\VarDumper\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony mechanism for exploring and dumping PHP variables",
"homepage": "https://symfony.com",
"keywords": [
"debug",
"dump"
],
"time": "2019-11-28T14:20:16+00:00"
"time": "2019-09-17T11:12:18+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],

View File

@ -12,21 +12,26 @@ class ApiException extends Exception
* 返回到接口的验证码
* @var int $response_code
*/
protected $response_code = 400000;
protected $response_code = 0;
/**
* ApiException constructor.
* @param string $message
* @param int $response_code
* @param Throwable|null $previous
*/
public function __construct(string $message, Throwable $previous = null)
{
parent::__construct($message, $this->response_code, $previous);
public function __construct(
$message,
$response_code = 400000,
Throwable $previous = null
) {
parent::__construct($message, 0, $previous);
$this->response_code = $response_code;
}
public static function fromException(Exception $e)
public static function formException(Exception $e, $response_code = 400000)
{
return new ApiException($e->getMessage(), $e);
return new ApiException($e->getMessage(), $response_code, $e);
}
/**

View File

@ -1,8 +0,0 @@
<?php
namespace PdToolKit\Exceptions;
class ApiInvalidParamException extends ApiException
{
protected $response_code = 400400;
}

View File

@ -1,15 +0,0 @@
<?php
namespace PdToolKit\Exceptions;
use Throwable;
class ApiSystemException extends ApiException
{
protected $response_code = 400000;
public function __construct($message = "网络波动,稍后再试", Throwable $previous = null)
{
parent::__construct($message, $previous);
}
}

View File

@ -1,42 +0,0 @@
<?php
namespace PdToolKit\Traits;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use PdToolKit\Exceptions\ApiException;
use PdToolKit\Exceptions\ApiInvalidParamException;
trait ControllerTraits
{
public function success($data = null, $message = '请求成功')
{
return new JsonResponse([
'code' => 0,
'message' => $message,
'data' => $data,
]);
}
/**
* @param Request $request
* @param array $rules
* @param array $messages
* @param array $customAttributes
* @return array
* @throws ApiException
*/
public function validateRequestParams(Request $request, array $rules, array $messages = [], array $customAttributes = [])
{
$validator = Validator::make($request->all(), $rules, $messages, $customAttributes);
if ($validator->fails()) {
throw new ApiInvalidParamException($validator->errors()->first());
}
return $request->only(collect($rules)->keys()->map(function ($rule) {
return Str::contains($rule, '.') ? explode('.', $rule)[0] : $rule;
})->unique()->toArray());
}
}

View File

@ -1,96 +0,0 @@
<?php
namespace PdToolKit\Utils;
use Illuminate\Support\Arr;
/**
* Class Decimal
* @package PdToolKit\Utils
* @method Decimal add(int|float|string|Decimal $v);
* @method Decimal sub(int|float|string|Decimal $v);
* @method Decimal mul(int|float|string|Decimal $v);
* @method Decimal div(int|float|string|Decimal $v);
*/
class Decimal
{
protected $source;
protected $dp;
// Rounds away from zero.
const ROUND_UP = 0;
// Rounds towards zero.
const ROUND_DOWN = 1;
function __construct($v, int $dp = 8)
{
if (!$this->isNumeric($v)) {
throw new \Exception("value type must be int|float|string|Decimal.");
}
$this->dp = $dp;
$val = $v instanceof Decimal ? $v->getSource() : $v;
$this->source = bcadd($val, "0", $dp);
}
private function isNumeric($v)
{
if ($v instanceof Decimal) return true;
return is_numeric($v);
}
function getSource()
{
return $this->source;
}
function __call($name, $arguments)
{
$methods = ['add', 'sub', 'mul', 'div'];
if (in_array($name, $methods)) {
$method = "bc$name";
$v = new Decimal($arguments[0]);
return new Decimal($method($this->source, $v->getSource()));
}
throw new \Exception("method $name not found.");
}
function __toString(): string
{
return $this->source;
}
function equals($v): bool
{
return (new Decimal($v))->getSource() == new Decimal($this->source);
}
function toDecimalPlaces(int $dp, int $rm = self::ROUND_UP): Decimal
{
return new Decimal($this->toFixed($dp, $rm), $dp);
}
function toFixed(int $dp, int $rm = self::ROUND_UP): string
{
if ($rm == self::ROUND_UP) {
return number_format($this->source, $dp, ".", "");
}
if ($rm == self::ROUND_DOWN) {
return bcadd($this->source, 0, $dp);
}
throw new \Exception("$rm must be " . self::ROUND_UP . ' or ' . self::ROUND_DOWN);
}
function toInt(): int
{
return (int) $this->source;
}
function toFloat(): float
{
return (float) $this->source;
}
}