composeer update
This commit is contained in:
411
composer.lock
generated
411
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "2c44169ebc0c682816bbcd2b8e8e9fdf",
|
||||
"content-hash": "109d1ec3724fb112d737bdce3ba7629c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "balping/json-raw-encoder",
|
||||
@@ -51,16 +51,16 @@
|
||||
},
|
||||
{
|
||||
"name": "cakephp/chronos",
|
||||
"version": "1.2.5",
|
||||
"version": "1.2.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cakephp/chronos.git",
|
||||
"reference": "8a2b005a2db173e1b5493002afb8e1e13c71a62a"
|
||||
"reference": "0292f06e8cc23fc82f0574889da2d8bf27b613c1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/cakephp/chronos/zipball/8a2b005a2db173e1b5493002afb8e1e13c71a62a",
|
||||
"reference": "8a2b005a2db173e1b5493002afb8e1e13c71a62a",
|
||||
"url": "https://api.github.com/repos/cakephp/chronos/zipball/0292f06e8cc23fc82f0574889da2d8bf27b613c1",
|
||||
"reference": "0292f06e8cc23fc82f0574889da2d8bf27b613c1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -104,7 +104,7 @@
|
||||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2019-04-23T19:00:57+00:00"
|
||||
"time": "2019-06-17T15:19:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "consoletvs/charts",
|
||||
@@ -254,21 +254,24 @@
|
||||
},
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
"version": "v1.0.1",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/lexer.git",
|
||||
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
|
||||
"reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
|
||||
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
|
||||
"url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8",
|
||||
"reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@@ -276,8 +279,8 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Doctrine\\Common\\Lexer\\": "lib/"
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@@ -298,13 +301,16 @@
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
|
||||
"homepage": "https://www.doctrine-project.org/projects/lexer.html",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"docblock",
|
||||
"lexer",
|
||||
"parser"
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2014-09-09T13:34:57+00:00"
|
||||
"time": "2019-06-08T11:03:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
@@ -362,16 +368,16 @@
|
||||
},
|
||||
{
|
||||
"name": "egulias/email-validator",
|
||||
"version": "2.1.8",
|
||||
"version": "2.1.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/egulias/EmailValidator.git",
|
||||
"reference": "c26463ff9241f27907112fbcd0c86fa670cfef98"
|
||||
"reference": "128cc721d771ec2c46ce59698f4ca42b73f71b25"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c26463ff9241f27907112fbcd0c86fa670cfef98",
|
||||
"reference": "c26463ff9241f27907112fbcd0c86fa670cfef98",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/128cc721d771ec2c46ce59698f4ca42b73f71b25",
|
||||
"reference": "128cc721d771ec2c46ce59698f4ca42b73f71b25",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -415,7 +421,7 @@
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2019-05-16T22:02:54+00:00"
|
||||
"time": "2019-06-23T10:14:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
@@ -892,17 +898,62 @@
|
||||
"time": "2018-09-29T18:48:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.8.19",
|
||||
"name": "kylekatarnls/update-helper",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "47bb1471b727a0c1497143dccf46aacf73c0ce6b"
|
||||
"url": "https://github.com/kylekatarnls/update-helper.git",
|
||||
"reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/47bb1471b727a0c1497143dccf46aacf73c0ce6b",
|
||||
"reference": "47bb1471b727a0c1497143dccf46aacf73c0ce6b",
|
||||
"url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/b34a46d7f5ec1795b4a15ac9d46b884377262df9",
|
||||
"reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.1.0",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeclimate/php-test-reporter": "dev-master",
|
||||
"composer/composer": "^2.0.x-dev",
|
||||
"phpunit/phpunit": ">=4.8.35 <6.0"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "UpdateHelper\\ComposerPlugin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"UpdateHelper\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kyle",
|
||||
"email": "kylekatarnls@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Update helper",
|
||||
"time": "2019-06-05T08:34:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.8.24",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "bb2a0afef35f508f77c049c51f04087a14de0055"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/bb2a0afef35f508f77c049c51f04087a14de0055",
|
||||
"reference": "bb2a0afef35f508f77c049c51f04087a14de0055",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1036,20 +1087,20 @@
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2019-05-28T13:19:37+00:00"
|
||||
"time": "2019-06-19T16:40:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/horizon",
|
||||
"version": "v3.2.1",
|
||||
"version": "v3.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/horizon.git",
|
||||
"reference": "a9204280f72a1c6d3874e0f98b68e354b212311a"
|
||||
"reference": "a6e4a89525e328ef8009509b8da02d0bc98f264f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/horizon/zipball/a9204280f72a1c6d3874e0f98b68e354b212311a",
|
||||
"reference": "a9204280f72a1c6d3874e0f98b68e354b212311a",
|
||||
"url": "https://api.github.com/repos/laravel/horizon/zipball/a6e4a89525e328ef8009509b8da02d0bc98f264f",
|
||||
"reference": "a6e4a89525e328ef8009509b8da02d0bc98f264f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1105,7 +1156,7 @@
|
||||
"laravel",
|
||||
"queue"
|
||||
],
|
||||
"time": "2019-05-21T19:58:03+00:00"
|
||||
"time": "2019-06-14T12:32:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/socialite",
|
||||
@@ -1303,16 +1354,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.52",
|
||||
"version": "1.0.53",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "c5a5097156387970e6f0ccfcdf03f752856f3391"
|
||||
"reference": "08e12b7628f035600634a5e76d95b5eb66cea674"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c5a5097156387970e6f0ccfcdf03f752856f3391",
|
||||
"reference": "c5a5097156387970e6f0ccfcdf03f752856f3391",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/08e12b7628f035600634a5e76d95b5eb66cea674",
|
||||
"reference": "08e12b7628f035600634a5e76d95b5eb66cea674",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1383,7 +1434,7 @@
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2019-05-20T20:21:14+00:00"
|
||||
"time": "2019-06-18T20:09:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/oauth1-client",
|
||||
@@ -1528,31 +1579,34 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "1.37.1",
|
||||
"version": "1.38.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "5be4fdf97076a685b23efdedfc2b73ad0c5eab70"
|
||||
"reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/5be4fdf97076a685b23efdedfc2b73ad0c5eab70",
|
||||
"reference": "5be4fdf97076a685b23efdedfc2b73ad0c5eab70",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8dd4172bfe1784952c4d58c4db725d183b1c23ad",
|
||||
"reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"kylekatarnls/update-helper": "^1.1",
|
||||
"php": ">=5.3.9",
|
||||
"symfony/translation": "~2.6 || ~3.0 || ~4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "^1.2",
|
||||
"friendsofphp/php-cs-fixer": "~2",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7"
|
||||
},
|
||||
"suggest": {
|
||||
"friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.",
|
||||
"phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors."
|
||||
},
|
||||
"bin": [
|
||||
"bin/upgrade-carbon"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"update-helper": "Carbon\\Upgrade",
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Carbon\\Laravel\\ServiceProvider"
|
||||
@@ -1582,7 +1636,7 @@
|
||||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2019-04-19T10:27:42+00:00"
|
||||
"time": "2019-06-03T15:41:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@@ -1635,63 +1689,18 @@
|
||||
],
|
||||
"time": "2019-05-25T20:07:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nullx27/eveonline-socialite",
|
||||
"version": "v0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nullx27/eveonline-socialite.git",
|
||||
"reference": "f1964175cf634add879a507ac96947cef485fe5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nullx27/eveonline-socialite/zipball/f1964175cf634add879a507ac96947cef485fe5e",
|
||||
"reference": "f1964175cf634add879a507ac96947cef485fe5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"laravel/socialite": "3.*",
|
||||
"php": "^5.6 || ^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"nullx27\\Socialite\\EveOnline\\Providers\\EveOnlineServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"nullx27\\Socialite\\EveOnline\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andre Peiffer",
|
||||
"email": "necrotex@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "EveOnline SSO Provider for Laravel Socialite",
|
||||
"time": "2017-12-20T14:38:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
"version": "3.2.0",
|
||||
"version": "3.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opis/closure.git",
|
||||
"reference": "09b4389715a7eec100176ea58286649181753508"
|
||||
"reference": "f846725591203098246276b2e7b9e8b7814c4965"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/09b4389715a7eec100176ea58286649181753508",
|
||||
"reference": "09b4389715a7eec100176ea58286649181753508",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/f846725591203098246276b2e7b9e8b7814c4965",
|
||||
"reference": "f846725591203098246276b2e7b9e8b7814c4965",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1699,12 +1708,12 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"jeremeamia/superclosure": "^2.0",
|
||||
"phpunit/phpunit": "^4.0|^5.0|^6.0|^7.0"
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.2.x-dev"
|
||||
"dev-master": "3.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1739,7 +1748,7 @@
|
||||
"serialization",
|
||||
"serialize"
|
||||
],
|
||||
"time": "2019-05-05T12:50:25+00:00"
|
||||
"time": "2019-05-31T20:04:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
@@ -2340,16 +2349,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "707b619d2c3bedf0224d56f95f77dabc60102305"
|
||||
"reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/707b619d2c3bedf0224d56f95f77dabc60102305",
|
||||
"reference": "707b619d2c3bedf0224d56f95f77dabc60102305",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/d50bbeeb0e17e6dd4124ea391eff235e932cbf64",
|
||||
"reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2411,11 +2420,11 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-27T08:16:38+00:00"
|
||||
"time": "2019-06-05T13:25:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
@@ -2468,16 +2477,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "97cde06d798f1326857090bc1b7c8f9d225c3dcb"
|
||||
"reference": "4e025104f1f9adb1f7a2d14fb102c9986d6e97c6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/97cde06d798f1326857090bc1b7c8f9d225c3dcb",
|
||||
"reference": "97cde06d798f1326857090bc1b7c8f9d225c3dcb",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/4e025104f1f9adb1f7a2d14fb102c9986d6e97c6",
|
||||
"reference": "4e025104f1f9adb1f7a2d14fb102c9986d6e97c6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2520,20 +2529,20 @@
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-20T16:16:12+00:00"
|
||||
"time": "2019-05-30T16:10:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "c71314cd3b9420b732e1526f33a24eff5430b5b3"
|
||||
"reference": "4e6c670af81c4fb0b6c08b035530a9915d0b691f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c71314cd3b9420b732e1526f33a24eff5430b5b3",
|
||||
"reference": "c71314cd3b9420b732e1526f33a24eff5430b5b3",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4e6c670af81c4fb0b6c08b035530a9915d0b691f",
|
||||
"reference": "4e6c670af81c4fb0b6c08b035530a9915d0b691f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2590,20 +2599,20 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-28T07:50:59+00:00"
|
||||
"time": "2019-05-30T16:10:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher-contracts",
|
||||
"version": "v1.1.1",
|
||||
"version": "v1.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
||||
"reference": "8fa2cf2177083dd59cf8e44ea4b6541764fbda69"
|
||||
"reference": "c61766f4440ca687de1084a5c00b08e167a2575c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8fa2cf2177083dd59cf8e44ea4b6541764fbda69",
|
||||
"reference": "8fa2cf2177083dd59cf8e44ea4b6541764fbda69",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c",
|
||||
"reference": "c61766f4440ca687de1084a5c00b08e167a2575c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2648,11 +2657,11 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-05-22T12:23:29+00:00"
|
||||
"time": "2019-06-20T06:46:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
@@ -2701,16 +2710,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "e8da078912bed1339f046c3a9488a5cbd0605971"
|
||||
"reference": "b7e4945dd9b277cd24e93566e4da0a87956392a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e8da078912bed1339f046c3a9488a5cbd0605971",
|
||||
"reference": "e8da078912bed1339f046c3a9488a5cbd0605971",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/b7e4945dd9b277cd24e93566e4da0a87956392a9",
|
||||
"reference": "b7e4945dd9b277cd24e93566e4da0a87956392a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2752,20 +2761,20 @@
|
||||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-29T18:10:42+00:00"
|
||||
"time": "2019-06-06T10:05:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "b4ce396bdce518978a17324d3d39d61058d039e6"
|
||||
"reference": "738ad561cd6a8d1c44ee1da941b2e628e264c429"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/b4ce396bdce518978a17324d3d39d61058d039e6",
|
||||
"reference": "b4ce396bdce518978a17324d3d39d61058d039e6",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/738ad561cd6a8d1c44ee1da941b2e628e264c429",
|
||||
"reference": "738ad561cd6a8d1c44ee1da941b2e628e264c429",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2844,20 +2853,20 @@
|
||||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-30T06:21:08+00:00"
|
||||
"time": "2019-06-06T13:23:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mime.git",
|
||||
"reference": "0b166aee243364cd9de05755d2e9651876090abb"
|
||||
"reference": "ec2c5565de60e03f33d4296a655e3273f0ad1f8b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/0b166aee243364cd9de05755d2e9651876090abb",
|
||||
"reference": "0b166aee243364cd9de05755d2e9651876090abb",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/ec2c5565de60e03f33d4296a655e3273f0ad1f8b",
|
||||
"reference": "ec2c5565de60e03f33d4296a655e3273f0ad1f8b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2903,7 +2912,7 @@
|
||||
"mime",
|
||||
"mime-type"
|
||||
],
|
||||
"time": "2019-05-22T13:16:28+00:00"
|
||||
"time": "2019-06-04T09:22:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@@ -3258,16 +3267,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "a5e3dd4e93a364668034a3cb6efa963d0b33ab45"
|
||||
"reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/a5e3dd4e93a364668034a3cb6efa963d0b33ab45",
|
||||
"reference": "a5e3dd4e93a364668034a3cb6efa963d0b33ab45",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c",
|
||||
"reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3303,20 +3312,20 @@
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-26T20:47:49+00:00"
|
||||
"time": "2019-05-30T16:10:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/routing.git",
|
||||
"reference": "e6cc85f03102ef5e4aedfe636f83e58cf6fd7338"
|
||||
"reference": "9b31cd24f6ad2cebde6845f6daa9c6d69efe2465"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/e6cc85f03102ef5e4aedfe636f83e58cf6fd7338",
|
||||
"reference": "e6cc85f03102ef5e4aedfe636f83e58cf6fd7338",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/9b31cd24f6ad2cebde6845f6daa9c6d69efe2465",
|
||||
"reference": "9b31cd24f6ad2cebde6845f6daa9c6d69efe2465",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3379,27 +3388,27 @@
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2019-05-20T16:16:12+00:00"
|
||||
"time": "2019-06-05T09:16:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v1.1.2",
|
||||
"version": "v1.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0"
|
||||
"reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0",
|
||||
"reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d",
|
||||
"reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
"php": "^7.1.3",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/container": "",
|
||||
"symfony/service-implementation": ""
|
||||
},
|
||||
"type": "library",
|
||||
@@ -3437,20 +3446,20 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-05-28T07:50:59+00:00"
|
||||
"time": "2019-06-13T11:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "f7e90f0f90e354f99f20aa9ead95a1b201b126f9"
|
||||
"reference": "5dda505e5f65d759741dfaf4e54b36010a4b57aa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/f7e90f0f90e354f99f20aa9ead95a1b201b126f9",
|
||||
"reference": "f7e90f0f90e354f99f20aa9ead95a1b201b126f9",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/5dda505e5f65d759741dfaf4e54b36010a4b57aa",
|
||||
"reference": "5dda505e5f65d759741dfaf4e54b36010a4b57aa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3513,20 +3522,20 @@
|
||||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-28T09:09:27+00:00"
|
||||
"time": "2019-06-03T20:27:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
"version": "v1.1.2",
|
||||
"version": "v1.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation-contracts.git",
|
||||
"reference": "93597ce975d91c52ebfaca1253343cd9ccb7916d"
|
||||
"reference": "cb4b18ad7b92a26e83b65dde940fab78339e6f3c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/93597ce975d91c52ebfaca1253343cd9ccb7916d",
|
||||
"reference": "93597ce975d91c52ebfaca1253343cd9ccb7916d",
|
||||
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/cb4b18ad7b92a26e83b65dde940fab78339e6f3c",
|
||||
"reference": "cb4b18ad7b92a26e83b65dde940fab78339e6f3c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3570,20 +3579,20 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-05-27T08:16:38+00:00"
|
||||
"time": "2019-06-13T11:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "2fd2ecf7913fb96f0c2e941ca15bb702184c6574"
|
||||
"reference": "f974f448154928d2b5fb7c412bd23b81d063f34b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2fd2ecf7913fb96f0c2e941ca15bb702184c6574",
|
||||
"reference": "2fd2ecf7913fb96f0c2e941ca15bb702184c6574",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/f974f448154928d2b5fb7c412bd23b81d063f34b",
|
||||
"reference": "f974f448154928d2b5fb7c412bd23b81d063f34b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3646,7 +3655,7 @@
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2019-05-01T12:55:49+00:00"
|
||||
"time": "2019-06-05T02:08:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tijsverkoyen/css-to-inline-styles",
|
||||
@@ -3748,16 +3757,16 @@
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v3.3.3",
|
||||
"version": "v3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/phpdotenv.git",
|
||||
"reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde"
|
||||
"reference": "5084b23845c24dbff8ac6c204290c341e4776c92"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/dbcc609971dd9b55f48b8008b553d79fd372ddde",
|
||||
"reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/5084b23845c24dbff8ac6c204290c341e4776c92",
|
||||
"reference": "5084b23845c24dbff8ac6c204290c341e4776c92",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3771,7 +3780,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.3-dev"
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -3796,7 +3805,7 @@
|
||||
"env",
|
||||
"environment"
|
||||
],
|
||||
"time": "2019-03-06T09:39:45+00:00"
|
||||
"time": "2019-06-15T22:40:20+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -3919,16 +3928,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.3.1",
|
||||
"version": "2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7"
|
||||
"reference": "1a1a1044ad00e285bd2825fac4c3a0443d90ad33"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/bc0fd11bc455cc20ee4b5edabc63ebbf859324c7",
|
||||
"reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/1a1a1044ad00e285bd2825fac4c3a0443d90ad33",
|
||||
"reference": "1a1a1044ad00e285bd2825fac4c3a0443d90ad33",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3976,7 +3985,7 @@
|
||||
"throwable",
|
||||
"whoops"
|
||||
],
|
||||
"time": "2018-10-23T09:00:00+00:00"
|
||||
"time": "2019-06-23T09:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
@@ -4509,16 +4518,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
|
||||
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4539,8 +4548,8 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Prophecy\\": "src/"
|
||||
"psr-4": {
|
||||
"Prophecy\\": "src/Prophecy"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@@ -4568,7 +4577,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2018-08-05T17:53:17+00:00"
|
||||
"time": "2019-06-13T12:50:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@@ -4726,16 +4735,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "8b389aebe1b8b0578430bda0c7c95a829608e059"
|
||||
"reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059",
|
||||
"reference": "8b389aebe1b8b0578430bda0c7c95a829608e059",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
|
||||
"reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4771,7 +4780,7 @@
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2019-02-20T10:12:59+00:00"
|
||||
"time": "2019-06-07T04:22:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
@@ -4824,16 +4833,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "7.5.12",
|
||||
"version": "7.5.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "9ba59817745b0fe0c1a5a3032dfd4a6d2994ad1c"
|
||||
"reference": "b9278591caa8630127f96c63b598712b699e671c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ba59817745b0fe0c1a5a3032dfd4a6d2994ad1c",
|
||||
"reference": "9ba59817745b0fe0c1a5a3032dfd4a6d2994ad1c",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b9278591caa8630127f96c63b598712b699e671c",
|
||||
"reference": "b9278591caa8630127f96c63b598712b699e671c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4904,7 +4913,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2019-05-28T11:59:40+00:00"
|
||||
"time": "2019-06-19T12:01:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
@@ -5474,16 +5483,16 @@
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/theseer/tokenizer.git",
|
||||
"reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8"
|
||||
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8",
|
||||
"reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8",
|
||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
|
||||
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5510,7 +5519,7 @@
|
||||
}
|
||||
],
|
||||
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
||||
"time": "2019-04-04T09:56:43+00:00"
|
||||
"time": "2019-06-13T22:48:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
|
||||
1
vendor/bin/upgrade-carbon
vendored
Symbolic link
1
vendor/bin/upgrade-carbon
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../nesbot/carbon/bin/upgrade-carbon
|
||||
10
vendor/cakephp/chronos/Dockerfile
vendored
Normal file
10
vendor/cakephp/chronos/Dockerfile
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Basic docker based environment
|
||||
# Necessary to trick dokku into building the documentation
|
||||
# using dockerfile instead of herokuish
|
||||
FROM php:7.3
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
VOLUME ["/code"]
|
||||
|
||||
CMD [ '/bin/bash' ]
|
||||
4
vendor/cakephp/chronos/README.md
vendored
4
vendor/cakephp/chronos/README.md
vendored
@@ -140,8 +140,8 @@ a mutable variant of `Date`.
|
||||
|
||||
# Documentation
|
||||
|
||||
A more descriptive documentation can be found at [book.cakephp.org/3.0/en/chronos.html](http://book.cakephp.org/3.0/en/chronos.html).
|
||||
A more descriptive documentation can be found at [book.cakephp.org/chronos/1.x/en/](https://book.cakephp.org/chronos/1.x/en/).
|
||||
|
||||
# API Documentation
|
||||
|
||||
API documentation can be found on [api.cakephp.org/chronos](http://api.cakephp.org/chronos).
|
||||
API documentation can be found on [api.cakephp.org/chronos](https://api.cakephp.org/chronos).
|
||||
|
||||
19
vendor/cakephp/chronos/docs.Dockerfile
vendored
Normal file
19
vendor/cakephp/chronos/docs.Dockerfile
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generate the HTML output.
|
||||
FROM markstory/cakephp-docs-builder as builder
|
||||
|
||||
RUN pip install git+https://github.com/sphinx-contrib/video.git@master
|
||||
|
||||
COPY docs /data/docs
|
||||
|
||||
RUN cd /data/docs-builder && \
|
||||
# In the future repeat website for each version
|
||||
make website LANGS="en fr ja pt" SOURCE=/data/docs DEST=/data/website/1.x
|
||||
|
||||
# Build a small nginx container with just the static site in it.
|
||||
FROM nginx:1.15-alpine
|
||||
|
||||
COPY --from=builder /data/website /data/website
|
||||
COPY --from=builder /data/docs-builder/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Move each version into place
|
||||
RUN mv /data/website/1.x/html/ /usr/share/nginx/html/1.x
|
||||
0
vendor/cakephp/chronos/docs/config/__init__.py
vendored
Normal file
0
vendor/cakephp/chronos/docs/config/__init__.py
vendored
Normal file
46
vendor/cakephp/chronos/docs/config/all.py
vendored
Normal file
46
vendor/cakephp/chronos/docs/config/all.py
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# Global configuration information used across all the
|
||||
# translations of documentation.
|
||||
#
|
||||
# Import the base theme configuration
|
||||
from cakephpsphinx.config.all import *
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.x'
|
||||
|
||||
# The search index version.
|
||||
search_version = 'chronos-1'
|
||||
|
||||
# The marketing display name for the book.
|
||||
version_name = ''
|
||||
|
||||
# Project name shown in the black header bar
|
||||
project = 'Chronos'
|
||||
|
||||
# Other versions that display in the version picker menu.
|
||||
version_list = [
|
||||
{'name': '1.x', 'number': '/chronos/1.x', 'title': '1.x', 'current': True},
|
||||
]
|
||||
|
||||
# Languages available.
|
||||
languages = ['en', 'fr', 'ja', 'pt']
|
||||
|
||||
# The GitHub branch name for this version of the docs
|
||||
# for edit links to point at.
|
||||
branch = 'master'
|
||||
|
||||
# Current version being built
|
||||
version = '1.x'
|
||||
|
||||
# Language in use for this directory.
|
||||
language = 'en'
|
||||
|
||||
show_root_link = True
|
||||
|
||||
repository = 'cakephp/chronos'
|
||||
|
||||
source_path = 'docs/'
|
||||
9
vendor/cakephp/chronos/docs/en/conf.py
vendored
Normal file
9
vendor/cakephp/chronos/docs/en/conf.py
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import sys, os
|
||||
|
||||
# Append the top level directory of the docs, so we can import from the config dir.
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
# Pull in all the configuration options defined in the global config file..
|
||||
from config.all import *
|
||||
|
||||
language = 'en'
|
||||
7
vendor/cakephp/chronos/docs/en/contents.rst
vendored
Normal file
7
vendor/cakephp/chronos/docs/en/contents.rst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: CakePHP Chronos
|
||||
|
||||
/index
|
||||
|
||||
API <https://api.cakephp.org/chronos>
|
||||
313
vendor/cakephp/chronos/docs/en/index.rst
vendored
Normal file
313
vendor/cakephp/chronos/docs/en/index.rst
vendored
Normal file
@@ -0,0 +1,313 @@
|
||||
Chronos
|
||||
#######
|
||||
|
||||
Chronos provides a zero-dependency collection of extensions to the ``DateTime``
|
||||
object. In addition to convenience methods, Chronos provides:
|
||||
|
||||
* ``Date`` objects for representing calendar dates.
|
||||
* Immutable date and datetime objects.
|
||||
* A pluggable translation system. Only English translations are included in the
|
||||
library. However, ``cakephp/i18n`` can be used for full language support.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
To install Chronos, you should use ``composer``. From your
|
||||
application's ROOT directory (where composer.json file is located) run the
|
||||
following::
|
||||
|
||||
php composer.phar require cakephp/chronos "@stable"
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
Chronos provides a number of extensions to the DateTime objects provided by PHP.
|
||||
Chronos provides 5 classes that cover mutable and immutable date/time variants
|
||||
and extensions to ``DateInterval``.
|
||||
|
||||
* ``Cake\Chronos\Chronos`` is an immutable *date and time* object.
|
||||
* ``Cake\Chronos\Date`` is a immutable *date* object.
|
||||
* ``Cake\Chronos\MutableDateTime`` is a mutable *date and time* object.
|
||||
* ``Cake\Chronos\MutableDate`` is a mutable *date* object.
|
||||
* ``Cake\Chronos\ChronosInterval`` is an extension to the ``DateInterval``
|
||||
object.
|
||||
|
||||
Lastly, if you want to typehint against Chronos-provided date/time objects you
|
||||
should use ``Cake\Chronos\ChronosInterface``. All of the date and time objects
|
||||
implement this interface.
|
||||
|
||||
Creating Instances
|
||||
------------------
|
||||
|
||||
There are many ways to get an instance of Chronos or Date. There are a number of
|
||||
factory methods that work with different argument sets::
|
||||
|
||||
use Cake\Chronos\Chronos;
|
||||
|
||||
$now = Chronos::now();
|
||||
$today = Chronos::today();
|
||||
$yesterday = Chronos::yesterday();
|
||||
$tomorrow = Chronos::tomorrow();
|
||||
|
||||
// Parse relative expressions
|
||||
$date = Chronos::parse('+2 days, +3 hours');
|
||||
|
||||
// Date and time integer values.
|
||||
$date = Chronos::create(2015, 12, 25, 4, 32, 58);
|
||||
|
||||
// Date or time integer values.
|
||||
$date = Chronos::createFromDate(2015, 12, 25);
|
||||
$date = Chronos::createFromTime(11, 45, 10);
|
||||
|
||||
// Parse formatted values.
|
||||
$date = Chronos::createFromFormat('m/d/Y', '06/15/2015');
|
||||
|
||||
Working with Immutable Objects
|
||||
------------------------------
|
||||
|
||||
If you've used PHP's ``DateTime`` objects, you're comfortable with *mutable*
|
||||
objects. Chronos offers mutable objects, but it also provides *immutable*
|
||||
objects. Immutable objects create copies of objects each time an object is
|
||||
modified. Because modifier methods around datetimes are not always transparent,
|
||||
data can be modified accidentally or without the developer knowing.
|
||||
Immutable objects prevent accidental changes to
|
||||
data, and make code free of order-based dependency issues. Immutability
|
||||
does mean that you will need to remember to replace variables when using
|
||||
modifiers::
|
||||
|
||||
// This code doesn't work with immutable objects
|
||||
$time->addDay(1);
|
||||
doSomething($time);
|
||||
return $time;
|
||||
|
||||
// This works like you'd expect
|
||||
$time = $time->addDay(1);
|
||||
$time = doSomething($time);
|
||||
return $time;
|
||||
|
||||
By capturing the return value of each modification your code will work as
|
||||
expected. If you ever have an immutable object, and want to create a mutable
|
||||
one, you can use ``toMutable()``::
|
||||
|
||||
$inplace = $time->toMutable();
|
||||
|
||||
Date Objects
|
||||
------------
|
||||
|
||||
PHP only provides a single DateTime object. Representing calendar dates can be
|
||||
a bit awkward with this class as it includes timezones, and time components that
|
||||
don't really belong in the concept of a 'day'. Chronos provides a ``Date``
|
||||
object that allows you to represent dates. The time and timezone for these
|
||||
objects is always fixed to ``00:00:00 UTC`` and all formatting/difference
|
||||
methods operate at the day resolution::
|
||||
|
||||
use Cake\Chronos\Date;
|
||||
|
||||
$today = Date::today();
|
||||
|
||||
// Changes to the time/timezone are ignored.
|
||||
$today->modify('+1 hours');
|
||||
|
||||
// Outputs '2015-12-20'
|
||||
echo $today;
|
||||
|
||||
Modifier Methods
|
||||
----------------
|
||||
|
||||
Chronos objects provide modifier methods that let you modify the value in
|
||||
a granular way::
|
||||
|
||||
// Set components of the datetime value.
|
||||
$halloween = Date::create()
|
||||
->year(2015)
|
||||
->month(10)
|
||||
->day(31)
|
||||
->hour(20)
|
||||
->minute(30);
|
||||
|
||||
You can also modify parts of a date relatively::
|
||||
|
||||
$future = Date::create()
|
||||
->addYear(1)
|
||||
->subMonth(2)
|
||||
->addDays(15)
|
||||
->addHours(20)
|
||||
->subMinutes(2);
|
||||
|
||||
It is also possible to make big jumps to defined points in time::
|
||||
|
||||
$time = Chronos::create();
|
||||
$time->startOfDay();
|
||||
$time->endOfDay();
|
||||
$time->startOfMonth();
|
||||
$time->endOfMonth();
|
||||
$time->startOfYear();
|
||||
$time->endOfYear();
|
||||
$time->startOfWeek();
|
||||
$time->endOfWeek();
|
||||
|
||||
Or jump to specific days of the week::
|
||||
|
||||
$time->next(ChronosInterface::TUESDAY);
|
||||
$time->previous(ChronosInterface::MONDAY);
|
||||
|
||||
When modifying dates/times across :abbr:`DST (Daylight Savings Time)` transitions
|
||||
your operations may gain/lose an additional hours resulting in hour values that
|
||||
don't add up. You can avoid these issues by first changing your timezone to
|
||||
``UTC``, modifying the time::
|
||||
|
||||
// Additional hour gained.
|
||||
$time = new Chronos('2014-03-30 00:00:00', 'Europe/London');
|
||||
debug($time->modify('+24 hours')); // 2014-03-31 01:00:00
|
||||
|
||||
// First switch to UTC, and modify
|
||||
$time = $time->setTimezone('UTC')
|
||||
->modify('+24 hours');
|
||||
|
||||
Once you are done modifying the time you can add the original timezone to get
|
||||
the localized time.
|
||||
|
||||
Comparison Methods
|
||||
------------------
|
||||
|
||||
Once you have 2 instances of Chronos date/time objects you can compare them in
|
||||
a variety of ways::
|
||||
|
||||
// Full suite of comparators exist
|
||||
// ne, gt, lt, lte.
|
||||
$first->eq($second);
|
||||
$first->gte($second);
|
||||
|
||||
// See if the current object is between two others.
|
||||
$now->between($start, $end);
|
||||
|
||||
// Find which argument is closest or farthest.
|
||||
$now->closest($june, $november);
|
||||
$now->farthest($june, $november);
|
||||
|
||||
You can also inquire about where a given value falls on the calendar::
|
||||
|
||||
$now->isToday();
|
||||
$now->isYesterday();
|
||||
$now->isFuture();
|
||||
$now->isPast();
|
||||
|
||||
// Check the day of the week
|
||||
$now->isWeekend();
|
||||
|
||||
// All other weekday methods exist too.
|
||||
$now->isMonday();
|
||||
|
||||
You can also find out if a value was within a relative time period::
|
||||
|
||||
$time->wasWithinLast('3 days');
|
||||
$time->isWithinNext('3 hours');
|
||||
|
||||
Generating Differences
|
||||
----------------------
|
||||
|
||||
In addition to comparing datetimes, calculating differences or deltas between
|
||||
two values is a common task::
|
||||
|
||||
// Get a DateInterval representing the difference
|
||||
$first->diff($second);
|
||||
|
||||
// Get difference as a count of specific units.
|
||||
$first->diffInHours($second);
|
||||
$first->diffInDays($second);
|
||||
$first->diffInWeeks($second);
|
||||
$first->diffInYears($second);
|
||||
|
||||
You can generate human readable differences suitable for use in a feed or
|
||||
timeline::
|
||||
|
||||
// Difference from now.
|
||||
echo $date->diffForHumans();
|
||||
|
||||
// Difference from another point in time.
|
||||
echo $date->diffForHumans($other); // 1 hour ago;
|
||||
|
||||
Formatting Strings
|
||||
------------------
|
||||
|
||||
Chronos provides a number of methods for displaying our outputting datetime
|
||||
objects::
|
||||
|
||||
// Uses the format controlled by setToStringFormat()
|
||||
echo $date;
|
||||
|
||||
// Different standard formats
|
||||
echo $time->toAtomString(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toCookieString(); // Thursday, 25-Dec-1975 14:15:16 EST
|
||||
echo $time->toIso8601String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRfc822String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc850String(); // Thursday, 25-Dec-75 14:15:16 EST
|
||||
echo $time->toRfc1036String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc1123String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc2822String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc3339String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRssString(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toW3cString(); // 1975-12-25T14:15:16-05:00
|
||||
|
||||
// Get the quarter/week
|
||||
echo $time->toQuarter(); // 4
|
||||
echo $time->toWeek(); // 52
|
||||
|
||||
// Generic formatting
|
||||
echo $time->toTimeString(); // 14:15:16
|
||||
echo $time->toDateString(); // 1975-12-25
|
||||
echo $time->toDateTimeString(); // 1975-12-25 14:15:16
|
||||
echo $time->toFormattedDateString(); // Dec 25, 1975
|
||||
echo $time->toDayDateTimeString(); // Thu, Dec 25, 1975 2:15 PM
|
||||
|
||||
Extracting Date Components
|
||||
--------------------------
|
||||
|
||||
Getting parts of a date object can be done by directly accessing properties::
|
||||
|
||||
$time = new Chronos('2015-12-31 23:59:58');
|
||||
$time->year; // 2015
|
||||
$time->month; // 12
|
||||
$time->day; // 31
|
||||
$time->hour // 23
|
||||
$time->minute // 59
|
||||
$time->second // 58
|
||||
|
||||
Other properties that can be accessed are:
|
||||
|
||||
- timezone
|
||||
- timezoneName
|
||||
- micro
|
||||
- dayOfWeek
|
||||
- dayOfMonth
|
||||
- dayOfYear
|
||||
- daysInMonth
|
||||
- timestamp
|
||||
- quarter
|
||||
|
||||
Testing Aids
|
||||
------------
|
||||
|
||||
When writing unit tests, it is helpful to fixate the current time. Chronos lets
|
||||
you fix the current time for each class. As part of your test suite's bootstrap
|
||||
process you can include the following::
|
||||
|
||||
Chronos::setTestNow(Chronos::now());
|
||||
MutableDateTime::setTestNow(MutableDateTime::now());
|
||||
Date::setTestNow(Date::now());
|
||||
MutableDate::setTestNow(MutableDate::now());
|
||||
|
||||
This will fix the current time of all objects to be the point at which the test
|
||||
suite started.
|
||||
|
||||
For example, if you fixate the ``Chronos`` to some moment in the past, any new
|
||||
instance of ``Chronos`` created with ``now`` or a relative time string, will be
|
||||
returned relative to the fixated time::
|
||||
|
||||
Chronos::setTestNow(new Chronos('1975-12-25 00:00:00'));
|
||||
|
||||
$time = new Chronos(); // 1975-12-25 00:00:00
|
||||
$time = new Chronos('1 hour ago'); // 1975-12-24 23:00:00
|
||||
|
||||
To reset the fixation, simply call ``setTestNow()`` again with no parameter or
|
||||
with ``null`` as a parameter.
|
||||
9
vendor/cakephp/chronos/docs/fr/conf.py
vendored
Normal file
9
vendor/cakephp/chronos/docs/fr/conf.py
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import sys, os
|
||||
|
||||
# Append the top level directory of the docs, so we can import from the config dir.
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
# Pull in all the configuration options defined in the global config file..
|
||||
from config.all import *
|
||||
|
||||
language = 'fr'
|
||||
7
vendor/cakephp/chronos/docs/fr/contents.rst
vendored
Normal file
7
vendor/cakephp/chronos/docs/fr/contents.rst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: CakePHP Chronos
|
||||
|
||||
/index
|
||||
|
||||
API <https://api.cakephp.org/chronos>
|
||||
306
vendor/cakephp/chronos/docs/fr/index.rst
vendored
Normal file
306
vendor/cakephp/chronos/docs/fr/index.rst
vendored
Normal file
@@ -0,0 +1,306 @@
|
||||
Chronos
|
||||
#######
|
||||
|
||||
Chronos fournit une collection d'extensions sans aucune dépendance pour l'objet
|
||||
``DateTime``. En plus de méthodes pratiques, Chronos fournit:
|
||||
|
||||
* Des objets ``Date`` pour représenter les dates du calendrier.
|
||||
* Des objets immutables pour les dates et les datetimes.
|
||||
* Un système de traduction intégrable. Seules les traductions anglaises sont
|
||||
inclues dans la librairie. Cependant, ``cakephp/i18n`` peut être utilisé
|
||||
pour un support complet d'autres langues.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Pour installer Chronos, vous devez utiliser ``composer``. A partir du répertoire
|
||||
ROOT de votre application (où le fichier composer.json se trouve) exécutez ce
|
||||
qui suit::
|
||||
|
||||
php composer.phar require cakephp/chronos "@stable"
|
||||
|
||||
Vue d'Ensemble
|
||||
--------------
|
||||
|
||||
Chronos fournit un certain nombre d'extensions pour les objets DateTime fournis
|
||||
par PHP. Chronos fournit 5 classes qui gèrent les variantes mutables et
|
||||
immutables de date/time et les extensions de ``DateInterval``.
|
||||
|
||||
* ``Cake\Chronos\Chronos`` est un objet de *date et time* immutable.
|
||||
* ``Cake\Chronos\Date`` est un objet de *date* immutable.
|
||||
* ``Cake\Chronos\MutableDateTime`` est un objet de *date et time* mutable.
|
||||
* ``Cake\Chronos\MutableDate`` est un objet de *date* mutable.
|
||||
* ``Cake\Chronos\ChronosInterval`` est une extension pour l'objet
|
||||
``DateInterval``.
|
||||
|
||||
Enfin si vous voulez typer selon les objets date/time fournis par Chronos,
|
||||
vous devez utiliser ``Cake\Chronos\ChronosInterface``. Tous les objets date et
|
||||
time implémentent cette interface.
|
||||
|
||||
Créer des Instances
|
||||
-------------------
|
||||
|
||||
Il y a plusieurs façons d'obtenir une instance de Chronos ou de Date. Il y a
|
||||
un certain nombre de méthodes factory qui fonctionnent avec des ensembles
|
||||
ayant des arguments différents::
|
||||
|
||||
use Cake\Chronos\Chronos;
|
||||
|
||||
$now = Chronos::now();
|
||||
$today = Chronos::today();
|
||||
$yesterday = Chronos::yesterday();
|
||||
$tomorrow = Chronos::tomorrow();
|
||||
|
||||
// Parse les expressions relatives
|
||||
$date = Chronos::parse('+2 days, +3 hours');
|
||||
|
||||
// Les valeurs d'entier de Date et time.
|
||||
$date = Chronos::create(2015, 12, 25, 4, 32, 58);
|
||||
|
||||
// Les valeurs d'entier pour Date ou time.
|
||||
$date = Chronos::createFromDate(2015, 12, 25);
|
||||
$date = Chronos::createFromTime(11, 45, 10);
|
||||
|
||||
// Parse les valeurs formatées.
|
||||
$date = Chronos::createFromFormat('m/d/Y', '06/15/2015');
|
||||
|
||||
Travailler avec les Objets Immutables
|
||||
-------------------------------------
|
||||
|
||||
Si vous avez utilisé les objets ``DateTime`` de PHP, vous êtes à l'aise avec
|
||||
les objets *mutable*. Chronos offre des objets mutables, mais elle fournit
|
||||
également des objets *immutables*. Les objets Immutables créent des copies des
|
||||
objets à chaque fois qu'un objet est modifié. Puisque les méthodes de
|
||||
modification autour des datetimes ne sont pas toujours transparentes, les
|
||||
données peuvent être modifiées accidentellement ou sans que le développeur ne
|
||||
le sache. Les objets immutables évitent les changements accidentels des
|
||||
données et permettent de s'affranchir de tout problème lié à l'ordre d'appel
|
||||
des fonctions ou des dépendances. L'immutabilité signifie que vous devez vous
|
||||
souvenir de remplacer les variables quand vous utilisez les modificateurs::
|
||||
|
||||
// Ce code ne fonctionne pas avec les objets immutables
|
||||
$time->addDay(1);
|
||||
doSomething($time);
|
||||
return $time;
|
||||
|
||||
// Ceci fonctionne comme vous le souhaitez
|
||||
$time = $time->addDay(1);
|
||||
$time = doSomething($time);
|
||||
return $time;
|
||||
|
||||
En capturant la valeur de retour pour chaque modification, votre code
|
||||
fonctionnera comme souhaité. Si vous avez déjà créé un objet immutable, et que
|
||||
vous souhaitez un objet mutable, vous pouvez utiliser ``toMutable()``::
|
||||
|
||||
$inplace = $time->toMutable();
|
||||
|
||||
Objets Date
|
||||
-----------
|
||||
|
||||
PHP fournit seulement un unique objet DateTime. Représenter les dates de
|
||||
calendrier peut être un peu gênant avec cette classe puisqu'elle inclut les
|
||||
timezones, et les composants de time qui n'appartiennent pas vraiment
|
||||
dans le concept d'un 'jour'. Chronos fournit un objet ``Date`` qui vous permet
|
||||
de représenter les dates. Les time et timezone pour ces objets sont toujours
|
||||
fixés à ``00:00:00 UTC`` et toutes les méthodes de formatage/différence
|
||||
fonctionnent au niveau du jour::
|
||||
|
||||
use Cake\Chronos\Date;
|
||||
|
||||
$today = Date::today();
|
||||
|
||||
// Changements selon le time/timezone sont ignorés.
|
||||
$today->modify('+1 hours');
|
||||
|
||||
// Affiche '2015-12-20'
|
||||
echo $today;
|
||||
|
||||
Méthodes de Modification
|
||||
------------------------
|
||||
|
||||
Les objets Chronos fournissent des méthodes de modification qui vous laissent
|
||||
modifier la valeur d'une façon assez précise::
|
||||
|
||||
// Définit les composants de la valeur du datetime.
|
||||
$halloween = Date::create()
|
||||
->year(2015)
|
||||
->month(10)
|
||||
->day(31)
|
||||
->hour(20)
|
||||
->minute(30);
|
||||
|
||||
Vous pouvez aussi modifier les parties de la date de façon relative::
|
||||
|
||||
$future = Date::create()
|
||||
->addYear(1)
|
||||
->subMonth(2)
|
||||
->addDays(15)
|
||||
->addHours(20)
|
||||
->subMinutes(2);
|
||||
|
||||
Il est également possible de faire des sauts vers des points définis dans le
|
||||
temps::
|
||||
|
||||
$time = Chronos::create();
|
||||
$time->startOfDay();
|
||||
$time->endOfDay();
|
||||
$time->startOfMonth();
|
||||
$time->endOfMonth();
|
||||
$time->startOfYear();
|
||||
$time->endOfYear();
|
||||
$time->startOfWeek();
|
||||
$time->endOfWeek();
|
||||
|
||||
Ou de sauter à un jour spécifique de la semaine::
|
||||
|
||||
$time->next(ChronosInterface::TUESDAY);
|
||||
$time->previous(ChronosInterface::MONDAY);
|
||||
|
||||
Méthodes de Comparaison
|
||||
-----------------------
|
||||
|
||||
Une fois que vous avez 2 instances d'objets date/time de Chronos, vous pouvez
|
||||
les comparer de plusieurs façons::
|
||||
|
||||
// Suite complète de comparateurs existante
|
||||
// ne, gt, lt, lte.
|
||||
$first->eq($second);
|
||||
$first->gte($second);
|
||||
|
||||
// Regardez si l'objet courant est entre deux autres.
|
||||
$now->between($start, $end);
|
||||
|
||||
// Trouver l'argument le plus proche ou le plus éloigné.
|
||||
$now->closest($june, $november);
|
||||
$now->farthest($june, $november);
|
||||
|
||||
Vous pouvez aussi vous renseigner sur le moment où une valeur donnée tombe dans
|
||||
le calendrier::
|
||||
|
||||
$now->isToday();
|
||||
$now->isYesterday();
|
||||
$now->isFuture();
|
||||
$now->isPast();
|
||||
|
||||
// Vérifie le jour de la semaine
|
||||
$now->isWeekend();
|
||||
|
||||
// Toutes les autres méthodes des jours de la semaine existent aussi.
|
||||
$now->isMonday();
|
||||
|
||||
Vous pouvez aussi trouver si une valeur était dans une période de temps relative::
|
||||
|
||||
$time->wasWithinLast('3 days');
|
||||
$time->isWithinNext('3 hours');
|
||||
|
||||
Générer des Différences
|
||||
-----------------------
|
||||
|
||||
En plus de comparer les datetimes, calculer les différences ou les deltas entre
|
||||
des valeurs est une tâche courante::
|
||||
|
||||
// Récupère un DateInterval représentant la différence
|
||||
$first->diff($second);
|
||||
|
||||
// Récupère la différence en tant que nombre d'unités spécifiques.
|
||||
$first->diffInHours($second);
|
||||
$first->diffInDays($second);
|
||||
$first->diffInWeeks($second);
|
||||
$first->diffInYears($second);
|
||||
|
||||
Vous pouvez générer des différences lisibles qui peuvent vous servir pour
|
||||
l'utilisation d'un feed ou d'une timeline::
|
||||
|
||||
// Différence à partir de maintenant.
|
||||
echo $date->diffForHumans();
|
||||
|
||||
// Différence à partir d'un autre point du temps.
|
||||
echo $date->diffForHumans($other); // 1 hour ago;
|
||||
|
||||
Formater les Chaînes
|
||||
--------------------
|
||||
|
||||
Chronos fournit un certain nombre de méthodes pour afficher nos sorties d'objets
|
||||
datetime::
|
||||
|
||||
// Utilise le format contrôlé par setToStringFormat()
|
||||
echo $date;
|
||||
|
||||
// Différents formats standards
|
||||
echo $time->toAtomString(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toCookieString(); // Thursday, 25-Dec-1975 14:15:16 EST
|
||||
echo $time->toIso8601String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRfc822String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc850String(); // Thursday, 25-Dec-75 14:15:16 EST
|
||||
echo $time->toRfc1036String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc1123String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc2822String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc3339String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRssString(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toW3cString(); // 1975-12-25T14:15:16-05:00
|
||||
|
||||
// Récupère le trimestre
|
||||
echo $time->toQuarter(); // 4;
|
||||
// Récupère la semaine
|
||||
echo $time->toWeek(); // 52;
|
||||
|
||||
// Formatage générique
|
||||
echo $time->toTimeString(); // 14:15:16
|
||||
echo $time->toDateString(); // 1975-12-25
|
||||
echo $time->toDateTimeString(); // 1975-12-25 14:15:16
|
||||
echo $time->toFormattedDateString(); // Dec 25, 1975
|
||||
echo $time->toDayDateTimeString(); // Thu, Dec 25, 1975 2:15 PM
|
||||
|
||||
Extraire des Fragments de Date
|
||||
------------------------------
|
||||
|
||||
Il est possible de récupérer des parties d'un objet date en accédant directement
|
||||
à ses propriétés::
|
||||
|
||||
$time = new Chronos('2015-12-31 23:59:58');
|
||||
$time->year; // 2015
|
||||
$time->month; // 12
|
||||
$time->day; // 31
|
||||
$time->hour // 23
|
||||
$time->minute // 59
|
||||
$time->second // 58
|
||||
|
||||
Les autres propriétés accessibles sont:
|
||||
|
||||
- timezone
|
||||
- timezoneName
|
||||
- micro
|
||||
- dayOfWeek
|
||||
- dayOfMonth
|
||||
- dayOfYear
|
||||
- daysInMonth
|
||||
- timestamp
|
||||
- quarter
|
||||
|
||||
Aides aux Tests
|
||||
---------------
|
||||
|
||||
Quand vous écrivez des tests unitaires, il peut être utile de fixer le *time*
|
||||
courant. Chronos vous permet de fixer le time courant pour chaque classe.
|
||||
Pour l'intégrer dans votre processus de démarrage (bootstrap) de suite de tests,
|
||||
vous pouvez inclure ce qui suit::
|
||||
|
||||
Chronos::setTestNow(Chronos::now());
|
||||
MutableDateTime::setTestNow(MutableDateTime::now());
|
||||
Date::setTestNow(Date::now());
|
||||
MutableDate::setTestNow(MutableDate::now());
|
||||
|
||||
Ceci va fixer le time courant de tous les objets selon le moment où la suite de
|
||||
tests a démarré.
|
||||
|
||||
Par exemple, si vous fixez le ``Chronos`` à un moment du passé, chaque nouvelle
|
||||
instance de ``Chronos`` créée avec ``now`` ou une chaine de temps relative, sera
|
||||
retournée relativement à la date fixée::
|
||||
|
||||
Chronos::setTestNow(new Chronos('1975-12-25 00:00:00'));
|
||||
|
||||
$time = new Chronos(); // 1975-12-25 00:00:00
|
||||
$time = new Chronos('1 hour ago'); // 1975-12-24 23:00:00
|
||||
|
||||
Pour réinitialiser la "fixation" du temps, appelez simplement ``setTestNow()``
|
||||
sans paramètre ou avec ``null`` comme paramètre.
|
||||
9
vendor/cakephp/chronos/docs/ja/conf.py
vendored
Normal file
9
vendor/cakephp/chronos/docs/ja/conf.py
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import sys, os
|
||||
|
||||
# Append the top level directory of the docs, so we can import from the config dir.
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
# Pull in all the configuration options defined in the global config file..
|
||||
from config.all import *
|
||||
|
||||
language = 'ja'
|
||||
7
vendor/cakephp/chronos/docs/ja/contents.rst
vendored
Normal file
7
vendor/cakephp/chronos/docs/ja/contents.rst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: CakePHP Chronos
|
||||
|
||||
/index
|
||||
|
||||
API <https://api.cakephp.org/chronos>
|
||||
304
vendor/cakephp/chronos/docs/ja/index.rst
vendored
Normal file
304
vendor/cakephp/chronos/docs/ja/index.rst
vendored
Normal file
@@ -0,0 +1,304 @@
|
||||
Chronos
|
||||
#######
|
||||
|
||||
Chronos (クロノス) は、 ``DateTime`` オブジェクトへの拡張の依存関係の無いコレクションを提供します。
|
||||
便利なメソッドに加えて、Chronos は以下を提供します。
|
||||
|
||||
* カレンダー日付のための ``Date`` オブジェクト
|
||||
* イミュータブルな日付と日時オブジェクト
|
||||
* プラグインのような翻訳システム。ライブラリーは英語のみの翻訳を含んでいます。
|
||||
しかし、全ての言語サポートのために、 ``cakephp/i18n`` を使うことができます。
|
||||
|
||||
インストール
|
||||
------------
|
||||
|
||||
Chronos をインストールするためには、 ``composer`` を利用することができます。
|
||||
アプリケーションの ROOT ディレクトリー(composer.json ファイルのある場所)
|
||||
で以下のように実行します。 ::
|
||||
|
||||
php composer.phar require cakephp/chronos "@stable"
|
||||
|
||||
概要
|
||||
----
|
||||
|
||||
Chronos は PHP が提供する DateTime オブジェクトのいくつかの拡張を提供します。
|
||||
Chronos は ``DateInterval`` の拡張機能および、ミュータブル(変更可能)と
|
||||
イミュータブル(変更不可)な 日付/時刻 の派生系をカバーする5つのクラスを提供します。
|
||||
|
||||
* ``Cake\Chronos\Chronos`` はイミュータブルな *日付と時刻* オブジェクト。
|
||||
* ``Cake\Chronos\Date`` はイミュータブルな *日付* オブジェクト。
|
||||
* ``Cake\Chronos\MutableDateTime`` はミュータブルな *日付と時刻* オブジェクト。
|
||||
* ``Cake\Chronos\MutableDate`` はミュータブルな *日付* オブジェクト。
|
||||
* ``Cake\Chronos\ChronosInterval`` は ``DateInterval`` の拡張機能。
|
||||
|
||||
最後に、もしあなたが Chronos が提供する 日付/時刻 のオブジェクトに対して型宣言を行ないたい場合、
|
||||
``Cake\Chronos\ChronosInterface`` を使用することができます。
|
||||
全ての日付と時間のオブジェクトはこのインターフェイスを実装しています。
|
||||
|
||||
インスタンスの作成
|
||||
------------------
|
||||
|
||||
Chronos または Date のインスタンスを取得するためには、多くの方法があります。
|
||||
異なる引数セットで動作する多くのファクトリーメソッドがあります。 ::
|
||||
|
||||
use Cake\Chronos\Chronos;
|
||||
|
||||
$now = Chronos::now();
|
||||
$today = Chronos::today();
|
||||
$yesterday = Chronos::yesterday();
|
||||
$tomorrow = Chronos::tomorrow();
|
||||
|
||||
// 相対式のパース
|
||||
$date = Chronos::parse('+2 days, +3 hours');
|
||||
|
||||
// 日付と時間の整数値
|
||||
$date = Chronos::create(2015, 12, 25, 4, 32, 58);
|
||||
|
||||
// 日付または時間の整数値
|
||||
$date = Chronos::createFromDate(2015, 12, 25);
|
||||
$date = Chronos::createFromTime(11, 45, 10);
|
||||
|
||||
// 整形した値にパース
|
||||
$date = Chronos::createFromFormat('m/d/Y', '06/15/2015');
|
||||
|
||||
イミュータブルオブジェクトの動作
|
||||
--------------------------------
|
||||
|
||||
もしあなたが、PHP の ``DateTime`` オブジェクトを使用したことがあるなら、
|
||||
*ミュータブル* オブジェクトは簡単に使用できます。
|
||||
Chronos はミュータブルオブジェクトを提供しますが、これは *イミュータブル* オブジェクトにもなります。
|
||||
イミュータブルオブジェクトはオブジェクトが変更されるたびにオブジェクトのコピーを作ります。
|
||||
なぜなら、日時周りの変更メソッドは必ずしも透明でないため、データが誤って、
|
||||
または開発者が知らない内に変更してしまうからです。
|
||||
イミュータブルオブジェクトはデータが誤って変更されることを防止し、
|
||||
順序ベースの依存関係の問題の無いコードを作ります。
|
||||
不変性は、変更時に忘れずに変数を置き換える必要があることを意味しています。 ::
|
||||
|
||||
// このコードはイミュータブルオブジェクトでは動作しません
|
||||
$time->addDay(1);
|
||||
doSomething($time);
|
||||
return $time
|
||||
|
||||
// このコードは期待通りに動作します
|
||||
$time = $time->addDay(1);
|
||||
$time = doSomething($time);
|
||||
return $time
|
||||
|
||||
各修正の戻り値をキャプチャーすることによって、コードは期待通りに動作します。
|
||||
イミュータブルオブジェクトを持っていて、ミュータブルオブジェクトを作りたい場合、
|
||||
``toMutable()`` が使用できます。 ::
|
||||
|
||||
$inplace = $time->toMutable();
|
||||
|
||||
日付オブジェクト
|
||||
------------------
|
||||
|
||||
PHP は単純な DateTime オブジェクトだけを提供します。このクラスのカレンダー日付の表現で、
|
||||
タイムゾーンおよび、本当に「日」の概念に属していないタイムコンポーネントを含むと、
|
||||
少し厄介な可能性があります。
|
||||
Chronos は日時表現のための ``Date`` オブジェクトを提供します。
|
||||
これらのオブジェクトの時間とタイムゾーンは常に ``00:00:00 UTC`` に固定されており、
|
||||
全ての書式/差分のメソッドは一日単位で動作します。 ::
|
||||
|
||||
use Cake\Chronos\Date;
|
||||
|
||||
$today = Date::today();
|
||||
|
||||
// 時間/タイムゾーンの変更は無視されます
|
||||
$today->modify('+1 hours');
|
||||
|
||||
// 出力 '2015-12-20'
|
||||
echo $today;
|
||||
|
||||
変更メソッド
|
||||
------------
|
||||
|
||||
Chronos オブジェクトは細やかに値を変更できるメソッドを提供します。 ::
|
||||
|
||||
// 日時の値のコンポーネントを設定
|
||||
$halloween = Date::create()
|
||||
->year(2015)
|
||||
->month(10)
|
||||
->day(31)
|
||||
->hour(20)
|
||||
->minute(30);
|
||||
|
||||
また、日付部分を相対日付に変更することもできます。 ::
|
||||
|
||||
$future = Date::create()
|
||||
->addYear(1)
|
||||
->subMonth(2)
|
||||
->addDays(15)
|
||||
->addHours(20)
|
||||
->subMinutes(2);
|
||||
|
||||
また、ある時間の中で、定義された時点に飛ぶことも可能です。 ::
|
||||
|
||||
$time = Chronos::create();
|
||||
$time->startOfDay();
|
||||
$time->endOfDay();
|
||||
$time->startOfMonth();
|
||||
$time->endOfMonth();
|
||||
$time->startOfYear();
|
||||
$time->endOfYear();
|
||||
$time->startOfWeek();
|
||||
$time->endOfWeek();
|
||||
|
||||
また、1週間中の特定の日にも飛べます。 ::
|
||||
|
||||
$time->next(ChronosInterface::TUESDAY);
|
||||
$time->previous(ChronosInterface::MONDAY);
|
||||
|
||||
:abbr:`DST (夏時間)` の遷移の前後で日付/時間を変更すると、
|
||||
あなたの操作で時間が増減するかもしれませんが、その結果、意図しない時間の値になります。
|
||||
これらの問題を回避するには、最初にタイムゾーンを ``UTC`` に変更し、時間を変更します。 ::
|
||||
|
||||
// 余分な時間が追加されました
|
||||
$time = new Chronos('2014-03-30 00:00:00', 'Europe/London');
|
||||
debug($time->modify('+24 hours')); // 2014-03-31 01:00:00
|
||||
|
||||
// 最初に UTC に切り替え、そして更新
|
||||
$time = $time->setTimezone('UTC')
|
||||
->modify('+24 hours');
|
||||
|
||||
時間を変更すると、元のタイムゾーンを追加してローカライズされた時間を取得することができます。
|
||||
|
||||
比較メソッド
|
||||
------------
|
||||
|
||||
Chronos の日付/時間オブジェクトの2つのインスタンスを様々な方法で比較することができます。 ::
|
||||
|
||||
// 比較のフルセットが存在します
|
||||
// ne, gt, lt, lte.
|
||||
$first->eq($second);
|
||||
$first->gte($second);
|
||||
|
||||
// カレントオブジェクトが2つのオブジェクトの間にあるかどうかを確認します。
|
||||
$now->between($start, $end);
|
||||
|
||||
// どちらの引数が最も近い (closest) か、または最も遠い (farthest) かを見つけます。
|
||||
$now->closest($june, $november);
|
||||
$now->farthest($june, $november);
|
||||
|
||||
また、与えられた値のカレンダーに当たる場所について問い合わせできます。 ::
|
||||
|
||||
$now->isToday();
|
||||
$now->isYesterday();
|
||||
$now->isFuture();
|
||||
$now->isPast();
|
||||
|
||||
// 曜日をチェック
|
||||
$now->isWeekend();
|
||||
|
||||
// 他の曜日のメソッドも全て存在します。
|
||||
$now->isMonday();
|
||||
|
||||
また、値が相対的な期間内にあったかどうかを見つけることができます。 ::
|
||||
|
||||
$time->wasWithinLast('3 days');
|
||||
$time->isWithinNext('3 hours');
|
||||
|
||||
差の生成
|
||||
--------
|
||||
|
||||
日時比較に加えて、2つの値の差や変化の計算は一般的なタスクです。 ::
|
||||
|
||||
// 差をあらわす DateInterval を取得
|
||||
$first->diff($second);
|
||||
|
||||
// 特定の単位での差を取得
|
||||
$first->diffInHours($second);
|
||||
$first->diffInDays($second);
|
||||
$first->diffInWeeks($second);
|
||||
$first->diffInYears($second);
|
||||
|
||||
フィードやタイムラインで使用するのに適した、人が読める形式の差を生成することができます。 ::
|
||||
|
||||
// 現在からの差
|
||||
echo $date->diffForHumans();
|
||||
|
||||
// 別の時点からの差
|
||||
echo $date->diffForHumans($other); // 1時間前;
|
||||
|
||||
フォーマットの設定
|
||||
------------------
|
||||
|
||||
Chronos は、出力した日時オブジェクトを表示するための多くのメソッドを提供します。 ::
|
||||
|
||||
// setToStringFormat() が制御するフォーマットを使用します
|
||||
echo $date;
|
||||
|
||||
// 別の標準フォーマット
|
||||
echo $time->toAtomString(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toCookieString(); // Thursday, 25-Dec-1975 14:15:16 EST
|
||||
echo $time->toIso8601String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRfc822String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc850String(); // Thursday, 25-Dec-75 14:15:16 EST
|
||||
echo $time->toRfc1036String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc1123String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc2822String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc3339String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRssString(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toW3cString(); // 1975-12-25T14:15:16-05:00
|
||||
|
||||
// クォーター/週数を取得
|
||||
echo $time->toQuarter(); // 4;
|
||||
echo $time->toWeek(); // 52
|
||||
|
||||
// 一般的なフォーマット
|
||||
echo $time->toTimeString(); // 14:15:16
|
||||
echo $time->toDateString(); // 1975-12-25
|
||||
echo $time->toDateTimeString(); // 1975-12-25 14:15:16
|
||||
echo $time->toFormattedDateString(); // Dec 25, 1975
|
||||
echo $time->toDayDateTimeString(); // Thu, Dec 25, 1975 2:15 PM
|
||||
|
||||
日付要素の抽出
|
||||
--------------
|
||||
|
||||
日付オブジェクトのプロパティーに直接アクセスして要素を取得することができます。 ::
|
||||
|
||||
$time = new Chronos('2015-12-31 23:59:58');
|
||||
$time->year; // 2015
|
||||
$time->month; // 12
|
||||
$time->day; // 31
|
||||
$time->hour // 23
|
||||
$time->minute // 59
|
||||
$time->second // 58
|
||||
|
||||
以下のプロパティーにもアクセスできます。 :
|
||||
|
||||
- timezone
|
||||
- timezoneName
|
||||
- micro
|
||||
- dayOfWeek
|
||||
- dayOfMonth
|
||||
- dayOfYear
|
||||
- daysInMonth
|
||||
- timestamp
|
||||
- quarter
|
||||
|
||||
テストの支援
|
||||
------------
|
||||
|
||||
単体テストを書いている時、現在時刻を固定すると便利です。Chronos は、
|
||||
各クラスの現在時刻を修正することができます。
|
||||
テストスイートの bootstrap 処理に以下を含めることができます。 ::
|
||||
|
||||
Chronos::setTestNow(Chronos::now());
|
||||
MutableDateTime::setTestNow(MutableDateTime::now());
|
||||
Date::setTestNow(Date::now());
|
||||
MutableDate::setTestNow(MutableDate::now());
|
||||
|
||||
これでテストスイートが開始された時点で全てのオブジェクトの現在時刻を修正します。
|
||||
|
||||
例えば、 ``Chronos`` を過去のある瞬間に固定した場合、新たな ``Chronos``
|
||||
のインスタンスが生成する ``now`` または相対時刻の文字列は、
|
||||
固定された時刻の相対を返却します。 ::
|
||||
|
||||
Chronos::setTestNow(new Chronos('1975-12-25 00:00:00'));
|
||||
|
||||
$time = new Chronos(); // 1975-12-25 00:00:00
|
||||
$time = new Chronos('1 hour ago'); // 1975-12-24 23:00:00
|
||||
|
||||
固定をリセットするには、 ``setTestNow()`` をパラメーター無し、または ``null`` を設定して
|
||||
再び呼び出してください。
|
||||
9
vendor/cakephp/chronos/docs/pt/conf.py
vendored
Normal file
9
vendor/cakephp/chronos/docs/pt/conf.py
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import sys, os
|
||||
|
||||
# Append the top level directory of the docs, so we can import from the config dir.
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
# Pull in all the configuration options defined in the global config file..
|
||||
from config.all import *
|
||||
|
||||
language = 'pt'
|
||||
7
vendor/cakephp/chronos/docs/pt/contents.rst
vendored
Normal file
7
vendor/cakephp/chronos/docs/pt/contents.rst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: CakePHP Chronos
|
||||
|
||||
/index
|
||||
|
||||
API <https://api.cakephp.org/chronos>
|
||||
285
vendor/cakephp/chronos/docs/pt/index.rst
vendored
Normal file
285
vendor/cakephp/chronos/docs/pt/index.rst
vendored
Normal file
@@ -0,0 +1,285 @@
|
||||
Chronos
|
||||
#######
|
||||
|
||||
O Chronos oferece uma coleção independente de extensões para lidar com o objeto
|
||||
``DateTime``. Além de métodos de conveniência, o Chronos oferece:
|
||||
|
||||
* Objetos ``Date`` para representar datas de calendário.
|
||||
* Objetos *date* e *datetime* imutáveis.
|
||||
* Um sistema de tradução acoplável. Apenas traduções em inglês estão incluídas
|
||||
na biblioteca. Todavia, ``cakephp/i18n`` pode ser usado para suporte completo
|
||||
a idiomas.
|
||||
|
||||
Instalação
|
||||
----------
|
||||
|
||||
Para instalar o Chronos, você deve usar o ``composer``. A partir do diretório
|
||||
*ROOT* de sua aplicação (local onde o arquivo composer.json está localizado)
|
||||
execute o seguinte comando::
|
||||
|
||||
php composer.phar require cakephp/chronos "@stable"
|
||||
|
||||
Visão geral
|
||||
-----------
|
||||
|
||||
Chronos oferece extensões para lidar com objetos *DateTime* do PHP. 5 classes
|
||||
cobrem variantes de data/hora mutáveis e imutáveis e uma extensão do objeto
|
||||
``DateInterval``.
|
||||
|
||||
* ``Cake\Chronos\Chronos`` é um objeto *date & time* imutável.
|
||||
* ``Cake\Chronos\Date`` é um objeto *date* imutável.
|
||||
* ``Cake\Chronos\MutableDateTime`` é um objeto *date and time* mutável.
|
||||
* ``Cake\Chronos\MutableDate`` é um objeto *date* mutável.
|
||||
* ``Cake\Chronos\ChronosInterval`` é uma extensão do objeto ``DateInterval``.
|
||||
|
||||
Por último, se você quiser usar o *typehint* em objetos do Chronos, será preciso
|
||||
usar a interface ``Cake\Chronos\ChronosInterface``. Todos os objetos de data e
|
||||
hora implementam essa interface.
|
||||
|
||||
Criando instâncias
|
||||
------------------
|
||||
|
||||
Existem várias maneiras de criar instâncias do Chronos ou mesmo, do objeto Date.
|
||||
Um número considerável de métodos padrão que funcionam com conjuntos diferentes
|
||||
de argumentos::
|
||||
|
||||
use Cake\Chronos\Chronos;
|
||||
|
||||
$now = Chronos::now();
|
||||
$today = Chronos::today();
|
||||
$yesterday = Chronos::yesterday();
|
||||
$tomorrow = Chronos::tomorrow();
|
||||
|
||||
// Interpreta expressões relativas.
|
||||
$date = Chronos::parse('+2 days, +3 hours');
|
||||
|
||||
// Valores inteiros de Date e Time.
|
||||
$date = Chronos::create(2015, 12, 25, 4, 32, 58);
|
||||
|
||||
// Valores inteiros de Date ou Time.
|
||||
$date = Chronos::createFromDate(2015, 12, 25);
|
||||
$date = Chronos::createFromTime(11, 45, 10);
|
||||
|
||||
// Interpreta valores formatados.
|
||||
$date = Chronos::createFromFormat('m/d/Y', '06/15/2015');
|
||||
|
||||
Trabalhando com objetos imutáveis
|
||||
---------------------------------
|
||||
|
||||
Se você é familiarizado com os objetos ``DateTime`` do PHP, você se sentirá
|
||||
confortável com objetos *mutáveis*. Além de objetos mutáveis o Chronos também
|
||||
oferece objetos imutáveis que por sua vez criam cópias de objetos toda vez que
|
||||
um objeto é modificado. Devido ao fato de que metodos modificadores relativos
|
||||
a data e hora nem sempre serem transparentes, informações podem ser modificadas
|
||||
acidentalmente ou sem que o desenvolvedor saiba. Objetos imutáveis previnem
|
||||
essas alterações acidentais nos dados. Imutabilidade significa que você deverá
|
||||
lembrar de substituir variáveis usando modificadores::
|
||||
|
||||
// Esse código não funciona com objetos imutáveis
|
||||
$time->addDay(1);
|
||||
doSomething($time);
|
||||
return $time;
|
||||
|
||||
// Esse funciona como o esperado
|
||||
$time = $time->addDay(1);
|
||||
$time = doSomething($time);
|
||||
return $time;
|
||||
|
||||
Ao capturar o valor de retorno de cada modificação, seu código funcionará como o
|
||||
esperado. Se você tem um objeto imutável e quer criar um mutável a partir do
|
||||
mesmo, use ``toMutable()``::
|
||||
|
||||
$inplace = $time->toMutable();
|
||||
|
||||
Objetos Date
|
||||
------------
|
||||
|
||||
O PHP disponibiliza um único objeto DateTime. Representar datas de calendário
|
||||
pode ser um pouco desconfortável por essa classe, uma vez que ela inclui
|
||||
*timezones* e componentes de hora que realmente não se encaixam no conceito de
|
||||
'dia'. O Chronos oferece um objeto ``Date`` para representar datas. A hora e a
|
||||
zona desse objeto é sempre fixado em ``00:00:00 UTC`` e todos os métodos de
|
||||
formatação/diferença operam sob a resolução de dia::
|
||||
|
||||
use Cake\Chronos\Date;
|
||||
|
||||
$today = Date::today();
|
||||
|
||||
// Mudanças na hora/timezone são ignoradas
|
||||
$today->modify('+1 hours');
|
||||
|
||||
// Exibe '2016-08-15'
|
||||
echo $today;
|
||||
|
||||
Métodos modificadores
|
||||
---------------------
|
||||
|
||||
Objetos Chronos disponibilizam métodos que permitem a modificação de valores de
|
||||
forma granular::
|
||||
|
||||
// Define componentes do valor datetime
|
||||
$halloween = Date::create()
|
||||
->year(2015)
|
||||
->month(10)
|
||||
->day(31)
|
||||
->hour(20)
|
||||
->minute(30);
|
||||
|
||||
Você também pode modificar partes da data relativamente::
|
||||
|
||||
$future = Date::create()
|
||||
->addYear(1)
|
||||
->subMonth(2)
|
||||
->addDays(15)
|
||||
->addHours(20)
|
||||
->subMinutes(2);
|
||||
|
||||
Também é possível realizar grandes saltos para períodos definidos no tempo::
|
||||
|
||||
$time = Chronos::create();
|
||||
$time->startOfDay();
|
||||
$time->startOfMonth();
|
||||
$time->endOfMonth();
|
||||
$time->endOfYear();
|
||||
$time->startOfWeek();
|
||||
$time->endOfWeek();
|
||||
|
||||
Ou ainda para dias específicos da semana::
|
||||
|
||||
$time->next(ChronosInterface::TUESDAY);
|
||||
$time->previous(ChronosInterface::MONDAY);
|
||||
|
||||
Métodos de comparação
|
||||
---------------------
|
||||
|
||||
Uma vez que você possui 2 instâncias de objetos data/hora do Chronos, é possível
|
||||
compará-los de várias maneiras::
|
||||
|
||||
// Coleção completa de comparadores
|
||||
// ne, gt, lt, lte.
|
||||
$first->eq($second);
|
||||
$first->gte($second);
|
||||
|
||||
// Veja se o objeto atual está entre outros
|
||||
$now->between($start, $end);
|
||||
|
||||
// Encontre qual argumento está mais perto ou mais longe
|
||||
$now->closest($june, $november);
|
||||
$now->farthest($june, $november);
|
||||
|
||||
Você também pode arguir sobre quando um determinado valor cai no calendário::
|
||||
|
||||
$now->isToday();
|
||||
$now->isYesterday();
|
||||
$now->isFuture();
|
||||
$now->isPast();
|
||||
|
||||
// Verifica se o dia é no final de semana
|
||||
$now->isWeekend();
|
||||
|
||||
// Todos os métodos para outros dias da semana existem também
|
||||
$now->isMonday();
|
||||
|
||||
Você também pode verificar se um determinado valor está dentro de um período de
|
||||
tempo relativo::
|
||||
|
||||
$time->wasWithinLast('3 days');
|
||||
$time->isWithinNext('3 hours');
|
||||
|
||||
Gerando diferenças
|
||||
------------------
|
||||
|
||||
Em adição à comparação de *datetimes*, calcular diferenças ou deltas entre
|
||||
valores é uma tarefa simples::
|
||||
|
||||
// Recebe um DateInterval representando a diferença
|
||||
$first->diff($second);
|
||||
|
||||
// Recebe a diferença como um contador de unidades específicas
|
||||
$first->diffInHours($second);
|
||||
$first->diffInDays($second);
|
||||
$first->diffInWeeks($second);
|
||||
$first->diffInYears($second);
|
||||
|
||||
Você pode gerar diferenças de fácil leitura para humanos para usar em um *feed*
|
||||
ou *timeline*::
|
||||
|
||||
// Diferença em relação ao momento atual
|
||||
echo $date->diffForHumans();
|
||||
|
||||
// Diferença em relação a outro período no tempo
|
||||
echo $date->diffForHumans($other); // 1 hora atrás;
|
||||
|
||||
Formatando strings
|
||||
------------------
|
||||
|
||||
O Chronos disponibiliza métodos para exibir nossos objetos *datetime*::
|
||||
|
||||
// Usa o formato controlado por setToStringFormat()
|
||||
echo $date;
|
||||
|
||||
// Diferentes padrões de formato
|
||||
echo $time->toAtomString(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toCookieString(); // Thursday, 25-Dec-1975 14:15:16 EST
|
||||
echo $time->toIso8601String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRfc822String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc850String(); // Thursday, 25-Dec-75 14:15:16 EST
|
||||
echo $time->toRfc1036String(); // Thu, 25 Dec 75 14:15:16 -0500
|
||||
echo $time->toRfc1123String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc2822String(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toRfc3339String(); // 1975-12-25T14:15:16-05:00
|
||||
echo $time->toRssString(); // Thu, 25 Dec 1975 14:15:16 -0500
|
||||
echo $time->toW3cString(); // 1975-12-25T14:15:16-05:00
|
||||
|
||||
// Recebe o trimestre
|
||||
echo $time->toQuarter(); // 4;
|
||||
|
||||
Extraindo componentes de data
|
||||
-----------------------------
|
||||
|
||||
Podemos receber partes de um objeto *date* acessando propriedades::
|
||||
|
||||
$time = new Chronos('2015-12-31 23:59:58');
|
||||
$time->year; // 2015
|
||||
$time->month; // 12
|
||||
$time->day; // 31
|
||||
$time->hour // 23
|
||||
$time->minute // 59
|
||||
$time->second // 58
|
||||
|
||||
Outras propriedades que podem ser acessadas são:
|
||||
|
||||
- timezone
|
||||
- timezoneName
|
||||
- micro
|
||||
- dayOfWeek
|
||||
- dayOfMonth
|
||||
- dayOfYear
|
||||
- daysInMonth
|
||||
- timestamp
|
||||
- quarter
|
||||
|
||||
Auxílio para testes
|
||||
-------------------
|
||||
|
||||
Ao escrever testes unitários, fixar a hora atual é bastante útil. O Chronos
|
||||
lhe permite fixar a hora atual para cada classe. Como parte das suas ferramentas
|
||||
de testes, você pode incluir o seguinte::
|
||||
|
||||
Chronos::setTestNow(Chronos::now());
|
||||
MutableDateTime::setTestNow(MutableDateTime::now());
|
||||
Date::setTestNow(Date::now());
|
||||
MutableDate::setTestNow(MutableDate::now());
|
||||
|
||||
Isso irá corrigir a hora atual de todos os objetos para o momento em que o
|
||||
processo de testes foi iniciado.
|
||||
|
||||
Por exemplo, se você fixar o ``Chronos`` em algum momento no passado, qualquer
|
||||
nova instância do ``Chronos`` criada com ``now`` ou uma *string* de tempo
|
||||
relativa, teremos um retorno referente ao tempo fixado::
|
||||
|
||||
Chronos::setTestNow(new Chronos('1975-12-25 00:00:00'));
|
||||
|
||||
$time = new Chronos(); // 1975-12-25 00:00:00
|
||||
$time = new Chronos('1 hour ago'); // 1975-12-24 23:00:00
|
||||
|
||||
3
vendor/cakephp/chronos/src/Chronos.php
vendored
3
vendor/cakephp/chronos/src/Chronos.php
vendored
@@ -110,7 +110,8 @@ class Chronos extends DateTimeImmutable implements ChronosInterface
|
||||
$testNow = $testNow->modify($time);
|
||||
}
|
||||
|
||||
if ($tz !== $testNow->getTimezone()) {
|
||||
$relativetime = static::isTimeExpression($time);
|
||||
if (!$relativetime && $tz !== $testNow->getTimezone()) {
|
||||
$testNow = $testNow->setTimezone($tz === null ? date_default_timezone_get() : $tz);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,10 +101,10 @@ class MutableDateTime extends DateTime implements ChronosInterface
|
||||
$testNow = $testNow->modify($time);
|
||||
}
|
||||
|
||||
if ($tz !== $testNow->getTimezone()) {
|
||||
$relativetime = static::isTimeExpression($time);
|
||||
if (!$relativetime && $tz !== $testNow->getTimezone()) {
|
||||
$testNow = $testNow->setTimezone($tz === null ? date_default_timezone_get() : $tz);
|
||||
}
|
||||
|
||||
$time = $testNow->format('Y-m-d H:i:s.u');
|
||||
parent::__construct($time, $tz);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,22 @@ trait RelativeKeywordTrait
|
||||
{
|
||||
protected static $relativePattern = '/this|next|last|tomorrow|yesterday|midnight|today|[+-]|first|last|ago/i';
|
||||
|
||||
/**
|
||||
* Determine if there is just a time in the time string
|
||||
*
|
||||
* @param string $time The time string to check.
|
||||
* @return bool true if there is a keyword, otherwise false
|
||||
*/
|
||||
private static function isTimeExpression($time)
|
||||
{
|
||||
// Just a time
|
||||
if (preg_match('/^[0-2]?[0-9]:[0-5][0-9](?::[0-5][0-9])?$/', $time)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if there is a relative keyword in the time string, this is to
|
||||
* create dates relative to now for test instances. e.g.: next tuesday
|
||||
@@ -29,6 +45,9 @@ trait RelativeKeywordTrait
|
||||
*/
|
||||
public static function hasRelativeKeywords($time)
|
||||
{
|
||||
if (self::isTimeExpression($time)) {
|
||||
return true;
|
||||
}
|
||||
// skip common format with a '-' in it
|
||||
if (preg_match('/[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}/', $time) !== 1) {
|
||||
return preg_match(static::$relativePattern, $time) > 0;
|
||||
|
||||
10
vendor/composer/autoload_classmap.php
vendored
10
vendor/composer/autoload_classmap.php
vendored
@@ -109,9 +109,12 @@ return array(
|
||||
'App\\Providers\\AppServiceProvider' => $baseDir . '/app/Providers/AppServiceProvider.php',
|
||||
'App\\Providers\\AuthServiceProvider' => $baseDir . '/app/Providers/AuthServiceProvider.php',
|
||||
'App\\Providers\\BroadcastServiceProvider' => $baseDir . '/app/Providers/BroadcastServiceProvider.php',
|
||||
'App\\Providers\\EveOnlineOAuthProvider' => $baseDir . '/app/Providers/EveOnlineOAuthProvider.php',
|
||||
'App\\Providers\\EveOnlineOAuthServiceProvider' => $baseDir . '/app/Providers/EveOnlineOAuthServiceProvider.php',
|
||||
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
|
||||
'App\\Providers\\HorizonServiceProvider' => $baseDir . '/app/Providers/HorizonServiceProvider.php',
|
||||
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
|
||||
'App\\Traits\\EveOAuth' => $baseDir . '/app/Traits/EveOAuth.php',
|
||||
'AvailableUserPermissions' => $baseDir . '/database/seeds/AvailableUserPermissions.php',
|
||||
'Balping\\JsonRaw\\Encoder' => $vendorDir . '/balping/json-raw-encoder/src/Encoder.php',
|
||||
'Balping\\JsonRaw\\Raw' => $vendorDir . '/balping/json-raw-encoder/src/Raw.php',
|
||||
@@ -145,6 +148,7 @@ return array(
|
||||
'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
|
||||
'Carbon\\Laravel\\ServiceProvider' => $vendorDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php',
|
||||
'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php',
|
||||
'Carbon\\Upgrade' => $vendorDir . '/nesbot/carbon/src/Carbon/Upgrade.php',
|
||||
'Collective\\Html\\Componentable' => $vendorDir . '/laravelcollective/html/src/Componentable.php',
|
||||
'Collective\\Html\\Eloquent\\FormAccessible' => $vendorDir . '/laravelcollective/html/src/Eloquent/FormAccessible.php',
|
||||
'Collective\\Html\\FormBuilder' => $vendorDir . '/laravelcollective/html/src/FormBuilder.php',
|
||||
@@ -4204,6 +4208,9 @@ return array(
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php',
|
||||
'UpdateHelper\\ComposerPlugin' => $vendorDir . '/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php',
|
||||
'UpdateHelper\\UpdateHelper' => $vendorDir . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php',
|
||||
'UpdateHelper\\UpdateHelperInterface' => $vendorDir . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php',
|
||||
'Webmozart\\Assert\\Assert' => $vendorDir . '/webmozart/assert/src/Assert.php',
|
||||
'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php',
|
||||
'Whoops\\Exception\\Formatter' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Formatter.php',
|
||||
@@ -4225,9 +4232,6 @@ return array(
|
||||
'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php',
|
||||
'WikiTableSeeder' => $baseDir . '/database/seeds/WikiTableSeeder.php',
|
||||
'XdgBaseDir\\Xdg' => $vendorDir . '/dnoegel/php-xdg-base-dir/src/Xdg.php',
|
||||
'nullx27\\Socialite\\EveOnline\\Providers\\EveOnlineServiceProvider' => $vendorDir . '/nullx27/eveonline-socialite/src/Providers/EveOnlineServiceProvider.php',
|
||||
'nullx27\\Socialite\\EveOnline\\Providers\\EveOnlineSocialiteProvider' => $vendorDir . '/nullx27/eveonline-socialite/src/Providers/EveOnlineSocialiteProvider.php',
|
||||
'nullx27\\Socialite\\EveOnline\\Traits\\EveAuth' => $vendorDir . '/nullx27/eveonline-socialite/src/Traits/EveAuth.php',
|
||||
'phpDocumentor\\Reflection\\DocBlock' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock.php',
|
||||
'phpDocumentor\\Reflection\\DocBlockFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php',
|
||||
'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php',
|
||||
|
||||
2
vendor/composer/autoload_files.php
vendored
2
vendor/composer/autoload_files.php
vendored
@@ -15,8 +15,8 @@ return array(
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php',
|
||||
'34122c0574b76bf21c9a8db62b5b9cf3' => $vendorDir . '/cakephp/chronos/src/carbon_compat.php',
|
||||
|
||||
3
vendor/composer/autoload_namespaces.php
vendored
3
vendor/composer/autoload_namespaces.php
vendored
@@ -6,9 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'),
|
||||
'UpdateHelper\\' => array($vendorDir . '/kylekatarnls/update-helper/src'),
|
||||
'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src'),
|
||||
'Parsedown' => array($vendorDir . '/erusev/parsedown'),
|
||||
'Mockery' => array($vendorDir . '/mockery/mockery/library'),
|
||||
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'),
|
||||
);
|
||||
|
||||
3
vendor/composer/autoload_psr4.php
vendored
3
vendor/composer/autoload_psr4.php
vendored
@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
|
||||
'nullx27\\Socialite\\EveOnline\\' => array($vendorDir . '/nullx27/eveonline-socialite/src'),
|
||||
'XdgBaseDir\\' => array($vendorDir . '/dnoegel/php-xdg-base-dir/src'),
|
||||
'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
|
||||
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
|
||||
@@ -41,6 +40,7 @@ return array(
|
||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
||||
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
||||
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
||||
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
|
||||
'Predis\\' => array($vendorDir . '/predis/predis/src'),
|
||||
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
|
||||
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
|
||||
@@ -63,6 +63,7 @@ return array(
|
||||
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'),
|
||||
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
|
||||
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
|
||||
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
|
||||
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
|
||||
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
|
||||
'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'),
|
||||
|
||||
48
vendor/composer/autoload_static.php
vendored
48
vendor/composer/autoload_static.php
vendored
@@ -16,8 +16,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php',
|
||||
'34122c0574b76bf21c9a8db62b5b9cf3' => __DIR__ . '/..' . '/cakephp/chronos/src/carbon_compat.php',
|
||||
@@ -35,10 +35,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
array (
|
||||
'phpDocumentor\\Reflection\\' => 25,
|
||||
),
|
||||
'n' =>
|
||||
array (
|
||||
'nullx27\\Socialite\\EveOnline\\' => 28,
|
||||
),
|
||||
'X' =>
|
||||
array (
|
||||
'XdgBaseDir\\' => 11,
|
||||
@@ -89,6 +85,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'Psr\\Log\\' => 8,
|
||||
'Psr\\Http\\Message\\' => 17,
|
||||
'Psr\\Container\\' => 14,
|
||||
'Prophecy\\' => 9,
|
||||
'Predis\\' => 7,
|
||||
'PhpParser\\' => 10,
|
||||
),
|
||||
@@ -141,6 +138,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
array (
|
||||
'Dotenv\\' => 7,
|
||||
'Doctrine\\Instantiator\\' => 22,
|
||||
'Doctrine\\Common\\Lexer\\' => 22,
|
||||
'Doctrine\\Common\\Inflector\\' => 26,
|
||||
'DeepCopy\\' => 9,
|
||||
),
|
||||
@@ -169,10 +167,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
|
||||
2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
|
||||
),
|
||||
'nullx27\\Socialite\\EveOnline\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/nullx27/eveonline-socialite/src',
|
||||
),
|
||||
'XdgBaseDir\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src',
|
||||
@@ -305,6 +299,10 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/container/src',
|
||||
),
|
||||
'Prophecy\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
|
||||
),
|
||||
'Predis\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/predis/predis/src',
|
||||
@@ -393,6 +391,10 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
|
||||
),
|
||||
'Doctrine\\Common\\Lexer\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer',
|
||||
),
|
||||
'Doctrine\\Common\\Inflector\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector',
|
||||
@@ -436,12 +438,15 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
);
|
||||
|
||||
public static $prefixesPsr0 = array (
|
||||
'U' =>
|
||||
array (
|
||||
'UpdateHelper\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/kylekatarnls/update-helper/src',
|
||||
),
|
||||
),
|
||||
'P' =>
|
||||
array (
|
||||
'Prophecy\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/phpspec/prophecy/src',
|
||||
),
|
||||
'PhpOption\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/phpoption/phpoption/src',
|
||||
@@ -458,13 +463,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
0 => __DIR__ . '/..' . '/mockery/mockery/library',
|
||||
),
|
||||
),
|
||||
'D' =>
|
||||
array (
|
||||
'Doctrine\\Common\\Lexer\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/doctrine/lexer/lib',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
@@ -571,9 +569,12 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'App\\Providers\\AppServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AppServiceProvider.php',
|
||||
'App\\Providers\\AuthServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AuthServiceProvider.php',
|
||||
'App\\Providers\\BroadcastServiceProvider' => __DIR__ . '/../..' . '/app/Providers/BroadcastServiceProvider.php',
|
||||
'App\\Providers\\EveOnlineOAuthProvider' => __DIR__ . '/../..' . '/app/Providers/EveOnlineOAuthProvider.php',
|
||||
'App\\Providers\\EveOnlineOAuthServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EveOnlineOAuthServiceProvider.php',
|
||||
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
|
||||
'App\\Providers\\HorizonServiceProvider' => __DIR__ . '/../..' . '/app/Providers/HorizonServiceProvider.php',
|
||||
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
|
||||
'App\\Traits\\EveOAuth' => __DIR__ . '/../..' . '/app/Traits/EveOAuth.php',
|
||||
'AvailableUserPermissions' => __DIR__ . '/../..' . '/database/seeds/AvailableUserPermissions.php',
|
||||
'Balping\\JsonRaw\\Encoder' => __DIR__ . '/..' . '/balping/json-raw-encoder/src/Encoder.php',
|
||||
'Balping\\JsonRaw\\Raw' => __DIR__ . '/..' . '/balping/json-raw-encoder/src/Raw.php',
|
||||
@@ -607,6 +608,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
|
||||
'Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php',
|
||||
'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php',
|
||||
'Carbon\\Upgrade' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Upgrade.php',
|
||||
'Collective\\Html\\Componentable' => __DIR__ . '/..' . '/laravelcollective/html/src/Componentable.php',
|
||||
'Collective\\Html\\Eloquent\\FormAccessible' => __DIR__ . '/..' . '/laravelcollective/html/src/Eloquent/FormAccessible.php',
|
||||
'Collective\\Html\\FormBuilder' => __DIR__ . '/..' . '/laravelcollective/html/src/FormBuilder.php',
|
||||
@@ -4666,6 +4668,9 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php',
|
||||
'UpdateHelper\\ComposerPlugin' => __DIR__ . '/..' . '/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php',
|
||||
'UpdateHelper\\UpdateHelper' => __DIR__ . '/..' . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php',
|
||||
'UpdateHelper\\UpdateHelperInterface' => __DIR__ . '/..' . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php',
|
||||
'Webmozart\\Assert\\Assert' => __DIR__ . '/..' . '/webmozart/assert/src/Assert.php',
|
||||
'Whoops\\Exception\\ErrorException' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/ErrorException.php',
|
||||
'Whoops\\Exception\\Formatter' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Formatter.php',
|
||||
@@ -4687,9 +4692,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'Whoops\\Util\\TemplateHelper' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/TemplateHelper.php',
|
||||
'WikiTableSeeder' => __DIR__ . '/../..' . '/database/seeds/WikiTableSeeder.php',
|
||||
'XdgBaseDir\\Xdg' => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src/Xdg.php',
|
||||
'nullx27\\Socialite\\EveOnline\\Providers\\EveOnlineServiceProvider' => __DIR__ . '/..' . '/nullx27/eveonline-socialite/src/Providers/EveOnlineServiceProvider.php',
|
||||
'nullx27\\Socialite\\EveOnline\\Providers\\EveOnlineSocialiteProvider' => __DIR__ . '/..' . '/nullx27/eveonline-socialite/src/Providers/EveOnlineSocialiteProvider.php',
|
||||
'nullx27\\Socialite\\EveOnline\\Traits\\EveAuth' => __DIR__ . '/..' . '/nullx27/eveonline-socialite/src/Traits/EveAuth.php',
|
||||
'phpDocumentor\\Reflection\\DocBlock' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock.php',
|
||||
'phpDocumentor\\Reflection\\DocBlockFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php',
|
||||
'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php',
|
||||
|
||||
471
vendor/composer/installed.json
vendored
471
vendor/composer/installed.json
vendored
File diff suppressed because it is too large
Load Diff
17
vendor/doctrine/lexer/.doctrine-project.json
vendored
Normal file
17
vendor/doctrine/lexer/.doctrine-project.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"active": true,
|
||||
"name": "Lexer",
|
||||
"slug": "lexer",
|
||||
"docsSlug": "doctrine-lexer",
|
||||
"versions": [
|
||||
{
|
||||
"name": "master",
|
||||
"branchName": "master",
|
||||
"slug": "latest",
|
||||
"aliases": [
|
||||
"current",
|
||||
"stable"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
3
vendor/doctrine/lexer/.github/FUNDING.yml
vendored
Normal file
3
vendor/doctrine/lexer/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
patreon: phpdoctrine
|
||||
tidelift: packagist/doctrine%2Flexer
|
||||
custom: https://www.doctrine-project.org/sponsorship.html
|
||||
2
vendor/doctrine/lexer/.gitignore
vendored
Normal file
2
vendor/doctrine/lexer/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
vendor
|
||||
composer.lock
|
||||
2
vendor/doctrine/lexer/LICENSE
vendored
2
vendor/doctrine/lexer/LICENSE
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2006-2013 Doctrine Project
|
||||
Copyright (c) 2006-2018 Doctrine Project
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
2
vendor/doctrine/lexer/README.md
vendored
2
vendor/doctrine/lexer/README.md
vendored
@@ -3,3 +3,5 @@
|
||||
Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
|
||||
|
||||
This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL).
|
||||
|
||||
https://www.doctrine-project.org/projects/lexer.html
|
||||
|
||||
20
vendor/doctrine/lexer/composer.json
vendored
20
vendor/doctrine/lexer/composer.json
vendored
@@ -1,9 +1,15 @@
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
"type": "library",
|
||||
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
|
||||
"keywords": ["lexer", "parser"],
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
|
||||
"keywords": [
|
||||
"php",
|
||||
"parser",
|
||||
"lexer",
|
||||
"annotations",
|
||||
"docblock"
|
||||
],
|
||||
"homepage": "https://www.doctrine-project.org/projects/lexer.html",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
|
||||
@@ -13,8 +19,14 @@
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Doctrine\\Common\\Lexer\\": "lib/" }
|
||||
"psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" }
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" }
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
||||
294
vendor/doctrine/lexer/docs/en/dql-parser.rst
vendored
Normal file
294
vendor/doctrine/lexer/docs/en/dql-parser.rst
vendored
Normal file
@@ -0,0 +1,294 @@
|
||||
DQL Lexer
|
||||
=========
|
||||
|
||||
Here is a more complicated example from the Doctrine ORM project.
|
||||
The ``Doctrine\ORM\Query\Lexer`` implementation for DQL looks something
|
||||
like the following:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
use Doctrine\Common\Lexer\AbstractLexer;
|
||||
|
||||
class Lexer extends AbstractLexer
|
||||
{
|
||||
// All tokens that are not valid identifiers must be < 100
|
||||
public const T_NONE = 1;
|
||||
public const T_INTEGER = 2;
|
||||
public const T_STRING = 3;
|
||||
public const T_INPUT_PARAMETER = 4;
|
||||
public const T_FLOAT = 5;
|
||||
public const T_CLOSE_PARENTHESIS = 6;
|
||||
public const T_OPEN_PARENTHESIS = 7;
|
||||
public const T_COMMA = 8;
|
||||
public const T_DIVIDE = 9;
|
||||
public const T_DOT = 10;
|
||||
public const T_EQUALS = 11;
|
||||
public const T_GREATER_THAN = 12;
|
||||
public const T_LOWER_THAN = 13;
|
||||
public const T_MINUS = 14;
|
||||
public const T_MULTIPLY = 15;
|
||||
public const T_NEGATE = 16;
|
||||
public const T_PLUS = 17;
|
||||
public const T_OPEN_CURLY_BRACE = 18;
|
||||
public const T_CLOSE_CURLY_BRACE = 19;
|
||||
|
||||
// All tokens that are identifiers or keywords that could be considered as identifiers should be >= 100
|
||||
public const T_ALIASED_NAME = 100;
|
||||
public const T_FULLY_QUALIFIED_NAME = 101;
|
||||
public const T_IDENTIFIER = 102;
|
||||
|
||||
// All keyword tokens should be >= 200
|
||||
public const T_ALL = 200;
|
||||
public const T_AND = 201;
|
||||
public const T_ANY = 202;
|
||||
public const T_AS = 203;
|
||||
public const T_ASC = 204;
|
||||
public const T_AVG = 205;
|
||||
public const T_BETWEEN = 206;
|
||||
public const T_BOTH = 207;
|
||||
public const T_BY = 208;
|
||||
public const T_CASE = 209;
|
||||
public const T_COALESCE = 210;
|
||||
public const T_COUNT = 211;
|
||||
public const T_DELETE = 212;
|
||||
public const T_DESC = 213;
|
||||
public const T_DISTINCT = 214;
|
||||
public const T_ELSE = 215;
|
||||
public const T_EMPTY = 216;
|
||||
public const T_END = 217;
|
||||
public const T_ESCAPE = 218;
|
||||
public const T_EXISTS = 219;
|
||||
public const T_FALSE = 220;
|
||||
public const T_FROM = 221;
|
||||
public const T_GROUP = 222;
|
||||
public const T_HAVING = 223;
|
||||
public const T_HIDDEN = 224;
|
||||
public const T_IN = 225;
|
||||
public const T_INDEX = 226;
|
||||
public const T_INNER = 227;
|
||||
public const T_INSTANCE = 228;
|
||||
public const T_IS = 229;
|
||||
public const T_JOIN = 230;
|
||||
public const T_LEADING = 231;
|
||||
public const T_LEFT = 232;
|
||||
public const T_LIKE = 233;
|
||||
public const T_MAX = 234;
|
||||
public const T_MEMBER = 235;
|
||||
public const T_MIN = 236;
|
||||
public const T_NEW = 237;
|
||||
public const T_NOT = 238;
|
||||
public const T_NULL = 239;
|
||||
public const T_NULLIF = 240;
|
||||
public const T_OF = 241;
|
||||
public const T_OR = 242;
|
||||
public const T_ORDER = 243;
|
||||
public const T_OUTER = 244;
|
||||
public const T_PARTIAL = 245;
|
||||
public const T_SELECT = 246;
|
||||
public const T_SET = 247;
|
||||
public const T_SOME = 248;
|
||||
public const T_SUM = 249;
|
||||
public const T_THEN = 250;
|
||||
public const T_TRAILING = 251;
|
||||
public const T_TRUE = 252;
|
||||
public const T_UPDATE = 253;
|
||||
public const T_WHEN = 254;
|
||||
public const T_WHERE = 255;
|
||||
public const T_WITH = 256;
|
||||
|
||||
/**
|
||||
* Creates a new query scanner object.
|
||||
*
|
||||
* @param string $input A query string.
|
||||
*/
|
||||
public function __construct($input)
|
||||
{
|
||||
$this->setInput($input);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getCatchablePatterns()
|
||||
{
|
||||
return [
|
||||
'[a-z_][a-z0-9_]*\:[a-z_][a-z0-9_]*(?:\\\[a-z_][a-z0-9_]*)*', // aliased name
|
||||
'[a-z_\\\][a-z0-9_]*(?:\\\[a-z_][a-z0-9_]*)*', // identifier or qualified name
|
||||
'(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?', // numbers
|
||||
"'(?:[^']|'')*'", // quoted strings
|
||||
'\?[0-9]*|:[a-z_][a-z0-9_]*', // parameters
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getNonCatchablePatterns()
|
||||
{
|
||||
return ['\s+', '(.)'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getType(&$value)
|
||||
{
|
||||
$type = self::T_NONE;
|
||||
|
||||
switch (true) {
|
||||
// Recognize numeric values
|
||||
case (is_numeric($value)):
|
||||
if (strpos($value, '.') !== false || stripos($value, 'e') !== false) {
|
||||
return self::T_FLOAT;
|
||||
}
|
||||
|
||||
return self::T_INTEGER;
|
||||
|
||||
// Recognize quoted strings
|
||||
case ($value[0] === "'"):
|
||||
$value = str_replace("''", "'", substr($value, 1, strlen($value) - 2));
|
||||
|
||||
return self::T_STRING;
|
||||
|
||||
// Recognize identifiers, aliased or qualified names
|
||||
case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'):
|
||||
$name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value);
|
||||
|
||||
if (defined($name)) {
|
||||
$type = constant($name);
|
||||
|
||||
if ($type > 100) {
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
if (strpos($value, ':') !== false) {
|
||||
return self::T_ALIASED_NAME;
|
||||
}
|
||||
|
||||
if (strpos($value, '\\') !== false) {
|
||||
return self::T_FULLY_QUALIFIED_NAME;
|
||||
}
|
||||
|
||||
return self::T_IDENTIFIER;
|
||||
|
||||
// Recognize input parameters
|
||||
case ($value[0] === '?' || $value[0] === ':'):
|
||||
return self::T_INPUT_PARAMETER;
|
||||
|
||||
// Recognize symbols
|
||||
case ($value === '.'):
|
||||
return self::T_DOT;
|
||||
case ($value === ','):
|
||||
return self::T_COMMA;
|
||||
case ($value === '('):
|
||||
return self::T_OPEN_PARENTHESIS;
|
||||
case ($value === ')'):
|
||||
return self::T_CLOSE_PARENTHESIS;
|
||||
case ($value === '='):
|
||||
return self::T_EQUALS;
|
||||
case ($value === '>'):
|
||||
return self::T_GREATER_THAN;
|
||||
case ($value === '<'):
|
||||
return self::T_LOWER_THAN;
|
||||
case ($value === '+'):
|
||||
return self::T_PLUS;
|
||||
case ($value === '-'):
|
||||
return self::T_MINUS;
|
||||
case ($value === '*'):
|
||||
return self::T_MULTIPLY;
|
||||
case ($value === '/'):
|
||||
return self::T_DIVIDE;
|
||||
case ($value === '!'):
|
||||
return self::T_NEGATE;
|
||||
case ($value === '{'):
|
||||
return self::T_OPEN_CURLY_BRACE;
|
||||
case ($value === '}'):
|
||||
return self::T_CLOSE_CURLY_BRACE;
|
||||
|
||||
// Default
|
||||
default:
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
This is roughly what the DQL Parser looks like that uses the above
|
||||
Lexer implementation:
|
||||
|
||||
.. note::
|
||||
|
||||
You can see the full implementation `here <https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/Parser.php>`_.
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
class Parser
|
||||
{
|
||||
private $lexer;
|
||||
|
||||
public function __construct($dql)
|
||||
{
|
||||
$this->lexer = new Lexer();
|
||||
$this->lexer->setInput($dql);
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
public function getAST()
|
||||
{
|
||||
// Parse & build AST
|
||||
$AST = $this->QueryLanguage();
|
||||
|
||||
// ...
|
||||
|
||||
return $AST;
|
||||
}
|
||||
|
||||
public function QueryLanguage()
|
||||
{
|
||||
$this->lexer->moveNext();
|
||||
|
||||
switch ($this->lexer->lookahead['type']) {
|
||||
case Lexer::T_SELECT:
|
||||
$statement = $this->SelectStatement();
|
||||
break;
|
||||
case Lexer::T_UPDATE:
|
||||
$statement = $this->UpdateStatement();
|
||||
break;
|
||||
case Lexer::T_DELETE:
|
||||
$statement = $this->DeleteStatement();
|
||||
break;
|
||||
default:
|
||||
$this->syntaxError('SELECT, UPDATE or DELETE');
|
||||
break;
|
||||
}
|
||||
|
||||
// Check for end of string
|
||||
if ($this->lexer->lookahead !== null) {
|
||||
$this->syntaxError('end of string');
|
||||
}
|
||||
|
||||
return $statement;
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
Now the AST is used to transform the DQL query in to portable SQL for whatever relational
|
||||
database you are using!
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
$parser = new Parser('SELECT u FROM User u');
|
||||
$AST = $parser->getAST(); // returns \Doctrine\ORM\Query\AST\SelectStatement
|
||||
|
||||
What is an AST?
|
||||
===============
|
||||
|
||||
AST stands for `Abstract syntax tree <http://en.wikipedia.org/wiki/Abstract_syntax_tree>`_.
|
||||
In computer science, an abstract syntax tree (AST), or just syntax tree, is a
|
||||
tree representation of the abstract syntactic structure of source code written
|
||||
in a programming language. Each node of the tree denotes a construct occurring in
|
||||
the source code.
|
||||
53
vendor/doctrine/lexer/docs/en/index.rst
vendored
Normal file
53
vendor/doctrine/lexer/docs/en/index.rst
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
Doctrine Lexer is a library that can be used in Top-Down, Recursive
|
||||
Descent Parsers. This lexer is used in Doctrine Annotations and in
|
||||
Doctrine ORM (DQL).
|
||||
|
||||
To write your own parser you just need to extend ``Doctrine\Common\Lexer\AbstractLexer``
|
||||
and implement the following three abstract methods.
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
/**
|
||||
* Lexical catchable patterns.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getCatchablePatterns();
|
||||
|
||||
/**
|
||||
* Lexical non-catchable patterns.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getNonCatchablePatterns();
|
||||
|
||||
/**
|
||||
* Retrieve token type. Also processes the token value if necessary.
|
||||
*
|
||||
* @param string $value
|
||||
* @return integer
|
||||
*/
|
||||
abstract protected function getType(&$value);
|
||||
|
||||
These methods define the `lexical <http://en.wikipedia.org/wiki/Lexical_analysis>`_
|
||||
catchable and non-catchable patterns and a method for returning the
|
||||
type of a token and filtering the value if necessary.
|
||||
|
||||
The Lexer is responsible for giving you an API to walk across a
|
||||
string one character at a time and analyze the type of each character, value and position of
|
||||
each token in the string. The low level API of the lexer is pretty simple:
|
||||
|
||||
- ``setInput($input)`` - Sets the input data to be tokenized. The Lexer is immediately reset and the new input tokenized.
|
||||
- ``reset()`` - Resets the lexer.
|
||||
- ``resetPeek()`` - Resets the peek pointer to 0.
|
||||
- ``resetPosition($position = 0)`` - Resets the lexer position on the input to the given position.
|
||||
- ``isNextToken($token)`` - Checks whether a given token matches the current lookahead.
|
||||
- ``isNextTokenAny(array $tokens)`` - Checks whether any of the given tokens matches the current lookahead.
|
||||
- ``moveNext()`` - Moves to the next token in the input string.
|
||||
- ``skipUntil($type)`` - Tells the lexer to skip input tokens until it sees a token with the given value.
|
||||
- ``isA($value, $token)`` - Checks if given value is identical to the given token.
|
||||
- ``peek()`` - Moves the lookahead token forward.
|
||||
- ``glimpse()`` - Peeks at the next token, returns it and immediately resets the peek.
|
||||
6
vendor/doctrine/lexer/docs/en/sidebar.rst
vendored
Normal file
6
vendor/doctrine/lexer/docs/en/sidebar.rst
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
.. toctree::
|
||||
:depth: 3
|
||||
|
||||
index
|
||||
simple-parser-example
|
||||
dql-parser
|
||||
102
vendor/doctrine/lexer/docs/en/simple-parser-example.rst
vendored
Normal file
102
vendor/doctrine/lexer/docs/en/simple-parser-example.rst
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
Simple Parser Example
|
||||
=====================
|
||||
|
||||
Extend the ``Doctrine\Common\Lexer\AbstractLexer`` class and implement
|
||||
the ``getCatchablePatterns``, ``getNonCatchablePatterns``, and ``getType``
|
||||
methods. Here is a very simple example lexer implementation named ``CharacterTypeLexer``.
|
||||
It tokenizes a string to ``T_UPPER``, ``T_LOWER`` and``T_NUMBER`` tokens:
|
||||
|
||||
.. code-block:: php
|
||||
<?php
|
||||
|
||||
use Doctrine\Common\Lexer\AbstractLexer;
|
||||
|
||||
class CharacterTypeLexer extends AbstractLexer
|
||||
{
|
||||
const T_UPPER = 1;
|
||||
const T_LOWER = 2;
|
||||
const T_NUMBER = 3;
|
||||
|
||||
protected function getCatchablePatterns()
|
||||
{
|
||||
return array(
|
||||
'[a-bA-Z0-9]',
|
||||
);
|
||||
}
|
||||
|
||||
protected function getNonCatchablePatterns()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
protected function getType(&$value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
return self::T_NUMBER;
|
||||
}
|
||||
|
||||
if (strtoupper($value) === $value) {
|
||||
return self::T_UPPER;
|
||||
}
|
||||
|
||||
if (strtolower($value) === $value) {
|
||||
return self::T_LOWER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Use ``CharacterTypeLexer`` to extract an array of upper case characters:
|
||||
|
||||
.. code-block:: php
|
||||
<?php
|
||||
|
||||
class UpperCaseCharacterExtracter
|
||||
{
|
||||
private $lexer;
|
||||
|
||||
public function __construct(CharacterTypeLexer $lexer)
|
||||
{
|
||||
$this->lexer = $lexer;
|
||||
}
|
||||
|
||||
public function getUpperCaseCharacters($string)
|
||||
{
|
||||
$this->lexer->setInput($string);
|
||||
$this->lexer->moveNext();
|
||||
|
||||
$upperCaseChars = array();
|
||||
while (true) {
|
||||
if (!$this->lexer->lookahead) {
|
||||
break;
|
||||
}
|
||||
|
||||
$this->lexer->moveNext();
|
||||
|
||||
if ($this->lexer->token['type'] === CharacterTypeLexer::T_UPPER) {
|
||||
$upperCaseChars[] = $this->lexer->token['value'];
|
||||
}
|
||||
}
|
||||
|
||||
return $upperCaseChars;
|
||||
}
|
||||
}
|
||||
|
||||
$upperCaseCharacterExtractor = new UpperCaseCharacterExtracter(new CharacterTypeLexer());
|
||||
$upperCaseCharacters = $upperCaseCharacterExtractor->getUpperCaseCharacters('1aBcdEfgHiJ12');
|
||||
|
||||
print_r($upperCaseCharacters);
|
||||
|
||||
The variable ``$upperCaseCharacters`` contains all of the upper case
|
||||
characters:
|
||||
|
||||
.. code-block:: php
|
||||
Array
|
||||
(
|
||||
[0] => B
|
||||
[1] => E
|
||||
[2] => H
|
||||
[3] => J
|
||||
)
|
||||
|
||||
This is a simple example but it should demonstrate the low level API
|
||||
that can be used to build more complex parsers.
|
||||
@@ -132,7 +132,7 @@ abstract class AbstractLexer
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the original lexer's input until a given position.
|
||||
* Retrieve the original lexer's input until a given position.
|
||||
*
|
||||
* @param integer $position
|
||||
*
|
||||
@@ -258,6 +258,11 @@ abstract class AbstractLexer
|
||||
$flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;
|
||||
$matches = preg_split($regex, $input, -1, $flags);
|
||||
|
||||
if (false === $matches) {
|
||||
// Work around https://bugs.php.net/78122
|
||||
$matches = array(array($input, 0));
|
||||
}
|
||||
|
||||
foreach ($matches as $match) {
|
||||
// Must remain before 'value' assignment since it can change content
|
||||
$type = $this->getType($match[0]);
|
||||
|
||||
26
vendor/doctrine/lexer/phpunit.xml.dist
vendored
Normal file
26
vendor/doctrine/lexer/phpunit.xml.dist
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
convertNoticesToExceptions="true"
|
||||
>
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Doctrine lexer Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">lib/Doctrine</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
268
vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/AbstractLexerTest.php
vendored
Normal file
268
vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/AbstractLexerTest.php
vendored
Normal file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\Common\Lexer;
|
||||
|
||||
class AbstractLexerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var ConcreteLexer
|
||||
*/
|
||||
private $concreteLexer;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->concreteLexer = new ConcreteLexer();
|
||||
}
|
||||
|
||||
public function dataProvider()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'price=10',
|
||||
array(
|
||||
array(
|
||||
'value' => 'price',
|
||||
'type' => 'string',
|
||||
'position' => 0,
|
||||
),
|
||||
array(
|
||||
'value' => '=',
|
||||
'type' => 'operator',
|
||||
'position' => 5,
|
||||
),
|
||||
array(
|
||||
'value' => 10,
|
||||
'type' => 'int',
|
||||
'position' => 6,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function testResetPeek()
|
||||
{
|
||||
$expectedTokens = array(
|
||||
array(
|
||||
'value' => 'price',
|
||||
'type' => 'string',
|
||||
'position' => 0,
|
||||
),
|
||||
array(
|
||||
'value' => '=',
|
||||
'type' => 'operator',
|
||||
'position' => 5,
|
||||
),
|
||||
array(
|
||||
'value' => 10,
|
||||
'type' => 'int',
|
||||
'position' => 6,
|
||||
),
|
||||
);
|
||||
|
||||
$this->concreteLexer->setInput('price=10');
|
||||
|
||||
$this->assertEquals($expectedTokens[0], $this->concreteLexer->peek());
|
||||
$this->assertEquals($expectedTokens[1], $this->concreteLexer->peek());
|
||||
$this->concreteLexer->resetPeek();
|
||||
$this->assertEquals($expectedTokens[0], $this->concreteLexer->peek());
|
||||
}
|
||||
|
||||
public function testResetPosition()
|
||||
{
|
||||
$expectedTokens = array(
|
||||
array(
|
||||
'value' => 'price',
|
||||
'type' => 'string',
|
||||
'position' => 0,
|
||||
),
|
||||
array(
|
||||
'value' => '=',
|
||||
'type' => 'operator',
|
||||
'position' => 5,
|
||||
),
|
||||
array(
|
||||
'value' => 10,
|
||||
'type' => 'int',
|
||||
'position' => 6,
|
||||
),
|
||||
);
|
||||
|
||||
$this->concreteLexer->setInput('price=10');
|
||||
$this->assertNull($this->concreteLexer->lookahead);
|
||||
|
||||
$this->assertTrue($this->concreteLexer->moveNext());
|
||||
$this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead);
|
||||
|
||||
$this->assertTrue($this->concreteLexer->moveNext());
|
||||
$this->assertEquals($expectedTokens[1], $this->concreteLexer->lookahead);
|
||||
|
||||
$this->concreteLexer->resetPosition(0);
|
||||
|
||||
$this->assertTrue($this->concreteLexer->moveNext());
|
||||
$this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*
|
||||
* @param $input
|
||||
* @param $expectedTokens
|
||||
*/
|
||||
public function testMoveNext($input, $expectedTokens)
|
||||
{
|
||||
$this->concreteLexer->setInput($input);
|
||||
$this->assertNull($this->concreteLexer->lookahead);
|
||||
|
||||
for ($i = 0; $i < count($expectedTokens); $i++) {
|
||||
$this->assertTrue($this->concreteLexer->moveNext());
|
||||
$this->assertEquals($expectedTokens[$i], $this->concreteLexer->lookahead);
|
||||
}
|
||||
|
||||
$this->assertFalse($this->concreteLexer->moveNext());
|
||||
$this->assertNull($this->concreteLexer->lookahead);
|
||||
}
|
||||
|
||||
public function testSkipUntil()
|
||||
{
|
||||
$this->concreteLexer->setInput('price=10');
|
||||
|
||||
$this->assertTrue($this->concreteLexer->moveNext());
|
||||
$this->concreteLexer->skipUntil('operator');
|
||||
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'value' => '=',
|
||||
'type' => 'operator',
|
||||
'position' => 5,
|
||||
),
|
||||
$this->concreteLexer->lookahead
|
||||
);
|
||||
}
|
||||
|
||||
public function testUtf8Mismatch()
|
||||
{
|
||||
$this->concreteLexer->setInput("\xE9=10");
|
||||
|
||||
$this->assertTrue($this->concreteLexer->moveNext());
|
||||
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'value' => "\xE9=10",
|
||||
'type' => 'string',
|
||||
'position' => 0,
|
||||
),
|
||||
$this->concreteLexer->lookahead
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*
|
||||
* @param $input
|
||||
* @param $expectedTokens
|
||||
*/
|
||||
public function testPeek($input, $expectedTokens)
|
||||
{
|
||||
$this->concreteLexer->setInput($input);
|
||||
foreach ($expectedTokens as $expectedToken) {
|
||||
$this->assertEquals($expectedToken, $this->concreteLexer->peek());
|
||||
}
|
||||
|
||||
$this->assertNull($this->concreteLexer->peek());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*
|
||||
* @param $input
|
||||
* @param $expectedTokens
|
||||
*/
|
||||
public function testGlimpse($input, $expectedTokens)
|
||||
{
|
||||
$this->concreteLexer->setInput($input);
|
||||
|
||||
foreach ($expectedTokens as $expectedToken) {
|
||||
$this->assertEquals($expectedToken, $this->concreteLexer->glimpse());
|
||||
$this->concreteLexer->moveNext();
|
||||
}
|
||||
|
||||
$this->assertNull($this->concreteLexer->peek());
|
||||
}
|
||||
|
||||
public function inputUntilPositionDataProvider()
|
||||
{
|
||||
return array(
|
||||
array('price=10', 5, 'price'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider inputUntilPositionDataProvider
|
||||
*
|
||||
* @param $input
|
||||
* @param $position
|
||||
* @param $expectedInput
|
||||
*/
|
||||
public function testGetInputUntilPosition($input, $position, $expectedInput)
|
||||
{
|
||||
$this->concreteLexer->setInput($input);
|
||||
|
||||
$this->assertSame($expectedInput, $this->concreteLexer->getInputUntilPosition($position));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*
|
||||
* @param $input
|
||||
* @param $expectedTokens
|
||||
*/
|
||||
public function testIsNextToken($input, $expectedTokens)
|
||||
{
|
||||
$this->concreteLexer->setInput($input);
|
||||
|
||||
$this->concreteLexer->moveNext();
|
||||
for ($i = 0; $i < count($expectedTokens); $i++) {
|
||||
$this->assertTrue($this->concreteLexer->isNextToken($expectedTokens[$i]['type']));
|
||||
$this->concreteLexer->moveNext();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*
|
||||
* @param $input
|
||||
* @param $expectedTokens
|
||||
*/
|
||||
public function testIsNextTokenAny($input, $expectedTokens)
|
||||
{
|
||||
$allTokenTypes = array_map(function ($token) {
|
||||
return $token['type'];
|
||||
}, $expectedTokens);
|
||||
|
||||
$this->concreteLexer->setInput($input);
|
||||
|
||||
$this->concreteLexer->moveNext();
|
||||
for ($i = 0; $i < count($expectedTokens); $i++) {
|
||||
$this->assertTrue($this->concreteLexer->isNextTokenAny(array($expectedTokens[$i]['type'])));
|
||||
$this->assertTrue($this->concreteLexer->isNextTokenAny($allTokenTypes));
|
||||
$this->concreteLexer->moveNext();
|
||||
}
|
||||
}
|
||||
|
||||
public function testGetLiteral()
|
||||
{
|
||||
$this->assertSame('Doctrine\Tests\Common\Lexer\ConcreteLexer::INT', $this->concreteLexer->getLiteral('int'));
|
||||
$this->assertSame('fake_token', $this->concreteLexer->getLiteral('fake_token'));
|
||||
}
|
||||
|
||||
public function testIsA()
|
||||
{
|
||||
$this->assertTrue($this->concreteLexer->isA(11, 'int'));
|
||||
$this->assertTrue($this->concreteLexer->isA(1.1, 'int'));
|
||||
$this->assertTrue($this->concreteLexer->isA('=', 'operator'));
|
||||
$this->assertTrue($this->concreteLexer->isA('>', 'operator'));
|
||||
$this->assertTrue($this->concreteLexer->isA('<', 'operator'));
|
||||
$this->assertTrue($this->concreteLexer->isA('fake_text', 'string'));
|
||||
}
|
||||
}
|
||||
49
vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php
vendored
Normal file
49
vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\Common\Lexer;
|
||||
|
||||
use Doctrine\Common\Lexer\AbstractLexer;
|
||||
|
||||
class ConcreteLexer extends AbstractLexer
|
||||
{
|
||||
const INT = 'int';
|
||||
|
||||
protected function getCatchablePatterns()
|
||||
{
|
||||
return array(
|
||||
'=|<|>',
|
||||
'[a-z]+',
|
||||
'\d+',
|
||||
);
|
||||
}
|
||||
|
||||
protected function getNonCatchablePatterns()
|
||||
{
|
||||
return array(
|
||||
'\s+',
|
||||
'(.)',
|
||||
);
|
||||
}
|
||||
|
||||
protected function getType(&$value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$value = (int)$value;
|
||||
|
||||
return 'int';
|
||||
}
|
||||
if (in_array($value, array('=', '<', '>'))) {
|
||||
return 'operator';
|
||||
}
|
||||
if (is_string($value)) {
|
||||
return 'string';
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
protected function getModifiers()
|
||||
{
|
||||
return parent::getModifiers().'u';
|
||||
}
|
||||
}
|
||||
@@ -41,21 +41,7 @@ class DomainPart extends Parser
|
||||
{
|
||||
$this->lexer->moveNext();
|
||||
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT) {
|
||||
throw new DotAtStart();
|
||||
}
|
||||
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_EMPTY) {
|
||||
throw new NoDomainPart();
|
||||
}
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) {
|
||||
throw new DomainHyphened();
|
||||
}
|
||||
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
|
||||
$this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
|
||||
$this->parseDomainComments();
|
||||
}
|
||||
$this->performDomainStartChecks();
|
||||
|
||||
$domain = $this->doParseDomainPart();
|
||||
|
||||
@@ -77,6 +63,38 @@ class DomainPart extends Parser
|
||||
$this->domainPart = $domain;
|
||||
}
|
||||
|
||||
private function performDomainStartChecks()
|
||||
{
|
||||
$this->checkInvalidTokensAfterAT();
|
||||
$this->checkEmptyDomain();
|
||||
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
|
||||
$this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
|
||||
$this->parseDomainComments();
|
||||
}
|
||||
}
|
||||
|
||||
private function checkEmptyDomain()
|
||||
{
|
||||
$thereIsNoDomain = $this->lexer->token['type'] === EmailLexer::S_EMPTY ||
|
||||
($this->lexer->token['type'] === EmailLexer::S_SP &&
|
||||
!$this->lexer->isNextToken(EmailLexer::GENERIC));
|
||||
|
||||
if ($thereIsNoDomain) {
|
||||
throw new NoDomainPart();
|
||||
}
|
||||
}
|
||||
|
||||
private function checkInvalidTokensAfterAT()
|
||||
{
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT) {
|
||||
throw new DotAtStart();
|
||||
}
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) {
|
||||
throw new DomainHyphened();
|
||||
}
|
||||
}
|
||||
|
||||
public function getDomainPart()
|
||||
{
|
||||
return $this->domainPart;
|
||||
|
||||
8
vendor/filp/whoops/CHANGELOG.md
vendored
8
vendor/filp/whoops/CHANGELOG.md
vendored
@@ -1,3 +1,11 @@
|
||||
# 2.4.0
|
||||
|
||||
* Allow to prepend and append handlers.
|
||||
|
||||
# 2.3.2
|
||||
|
||||
* Various fixes from the community.
|
||||
|
||||
# 2.3.1
|
||||
|
||||
* Prevent exception in Whoops when caught exception frame is not related to real file
|
||||
|
||||
@@ -119,7 +119,11 @@ class Frame implements Serializable
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->fileContentsCache = file_get_contents($filePath);
|
||||
try {
|
||||
$this->fileContentsCache = file_get_contents($filePath);
|
||||
} catch (ErrorException $exception) {
|
||||
// Internal file paths of PHP extensions cannot be opened
|
||||
}
|
||||
}
|
||||
|
||||
return $this->fileContentsCache;
|
||||
|
||||
@@ -252,7 +252,7 @@ class Inspector
|
||||
}
|
||||
|
||||
if (!extension_loaded('xdebug') || !xdebug_is_enabled()) {
|
||||
return [];
|
||||
return $traces;
|
||||
}
|
||||
|
||||
// Use xdebug to get the full stack trace and remove the shutdown handler stack trace
|
||||
|
||||
@@ -46,6 +46,11 @@ class PlainTextHandler extends Handler
|
||||
*/
|
||||
private $traceFunctionArgsOutputLimit = 1024;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $addPreviousToOutput = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@@ -114,6 +119,21 @@ class PlainTextHandler extends Handler
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add previous exceptions to output.
|
||||
* @param bool|null $addPreviousToOutput
|
||||
* @return bool|$this
|
||||
*/
|
||||
public function addPreviousToOutput($addPreviousToOutput = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->addPreviousToOutput;
|
||||
}
|
||||
|
||||
$this->addPreviousToOutput = (bool) $addPreviousToOutput;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add error trace function arguments to output.
|
||||
* Set to True for all frame args, or integer for the n first frame args.
|
||||
@@ -151,14 +171,18 @@ class PlainTextHandler extends Handler
|
||||
public function generateResponse()
|
||||
{
|
||||
$exception = $this->getException();
|
||||
return sprintf(
|
||||
"%s: %s in file %s on line %d%s\n",
|
||||
get_class($exception),
|
||||
$exception->getMessage(),
|
||||
$exception->getFile(),
|
||||
$exception->getLine(),
|
||||
$this->getTraceOutput()
|
||||
);
|
||||
$message = $this->getExceptionOutput($exception);
|
||||
|
||||
if ($this->addPreviousToOutput) {
|
||||
$previous = $exception->getPrevious();
|
||||
while ($previous) {
|
||||
$message .= "\n\nCaused by\n" . $this->getExceptionOutput($previous);
|
||||
$previous = $previous->getPrevious();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $message . $this->getTraceOutput() . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,6 +308,22 @@ class PlainTextHandler extends Handler
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the exception as plain text.
|
||||
* @param \Throwable $exception
|
||||
* @return string
|
||||
*/
|
||||
private function getExceptionOutput($exception)
|
||||
{
|
||||
return sprintf(
|
||||
"%s: %s in file %s on line %d",
|
||||
get_class($exception),
|
||||
$exception->getMessage(),
|
||||
$exception->getFile(),
|
||||
$exception->getLine()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
|
||||
@@ -97,6 +97,7 @@ class PrettyPageHandler extends Handler
|
||||
"idea" => "idea://open?file=%file&line=%line",
|
||||
"vscode" => "vscode://file/%file:%line",
|
||||
"atom" => "atom://core/open/file?filename=%file&line=%line",
|
||||
"espresso" => "x-espresso://open?filepath=%file&lines=%line",
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -391,7 +392,7 @@ class PrettyPageHandler extends Handler
|
||||
* return "http://stackoverflow.com";
|
||||
* });
|
||||
* @param string $identifier
|
||||
* @param string $resolver
|
||||
* @param string|callable $resolver
|
||||
*/
|
||||
public function addEditor($identifier, $resolver)
|
||||
{
|
||||
@@ -704,7 +705,7 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
$values = $superGlobal;
|
||||
foreach ($blacklisted as $key) {
|
||||
if (isset($superGlobal[$key])) {
|
||||
if (isset($superGlobal[$key]) && is_string($superGlobal[$key])) {
|
||||
$values[$key] = str_repeat('*', strlen($superGlobal[$key]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class XmlResponseHandler extends Handler
|
||||
),
|
||||
];
|
||||
|
||||
echo $this->toXml($response);
|
||||
echo self::toXml($response);
|
||||
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,11 @@ body {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.Whoops.container {
|
||||
position: relative;
|
||||
z-index: 9999999999;
|
||||
}
|
||||
|
||||
.panel {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
@@ -414,12 +419,9 @@ pre:not(.prettyprinted) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#copy-button {
|
||||
.rightButton {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.clipboard {
|
||||
opacity: .8;
|
||||
background: none;
|
||||
|
||||
@@ -431,7 +433,7 @@ pre:not(.prettyprinted) {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.clipboard:hover {
|
||||
.rightButton:hover {
|
||||
box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
<div class="frames-description <?php echo $has_frames_tabs ? 'frames-description-application' : '' ?>">
|
||||
<?php if ($has_frames_tabs): ?>
|
||||
<?php if ($active_frames_tab == 'application'): ?>
|
||||
<span href="#" id="application-frames-tab" class="frames-tab frames-tab-active">
|
||||
<a href="#" id="application-frames-tab" class="frames-tab <?php echo $active_frames_tab == 'application' ? 'frames-tab-active' : '' ?>">
|
||||
Application frames (<?php echo $frames->countIsApplication() ?>)
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<a href="#" id="application-frames-tab" class="frames-tab">
|
||||
Application frames (<?php echo $frames->countIsApplication() ?>)
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<a href="#" id="all-frames-tab" class="frames-tab <?php echo $active_frames_tab == 'all' ? 'frames-tab-active' : '' ?>">
|
||||
All frames (<?php echo count($frames) ?>)
|
||||
</a>
|
||||
|
||||
@@ -86,8 +86,11 @@
|
||||
</ul>
|
||||
|
||||
<span id="plain-exception"><?php echo $tpl->escape($plain_exception) ?></span>
|
||||
<button id="copy-button" class="clipboard" data-clipboard-text="<?php echo $tpl->escape($plain_exception) ?>" title="Copy exception details to clipboard">
|
||||
<button id="copy-button" class="rightButton clipboard" data-clipboard-text="<?php echo $tpl->escape($plain_exception) ?>" title="Copy exception details to clipboard">
|
||||
COPY
|
||||
</button>
|
||||
<button id="hide-error" class="rightButton" title="Hide error message" onclick="document.getElementsByClassName('Whoops')[0].style.display = 'none';">
|
||||
HIDE
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
75
vendor/filp/whoops/src/Whoops/Run.php
vendored
75
vendor/filp/whoops/src/Whoops/Run.php
vendored
@@ -29,7 +29,7 @@ final class Run implements RunInterface
|
||||
/**
|
||||
* @var HandlerInterface[]
|
||||
*/
|
||||
private $handlerStack = [];
|
||||
private $handlerQueue = [];
|
||||
|
||||
private $silencedPatterns = [];
|
||||
|
||||
@@ -41,13 +41,52 @@ final class Run implements RunInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes a handler to the end of the stack
|
||||
* Prepends a handler to the start of the queue
|
||||
*
|
||||
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface
|
||||
* @param Callable|HandlerInterface $handler
|
||||
* @return Run
|
||||
* @deprecated use appendHandler and prependHandler instead
|
||||
*/
|
||||
public function pushHandler($handler)
|
||||
{
|
||||
return $this->prependHandler($handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a handler to the end of the queue
|
||||
*
|
||||
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface
|
||||
* @param Callable|HandlerInterface $handler
|
||||
* @return Run
|
||||
*/
|
||||
public function pushHandler($handler)
|
||||
public function appendHandler($handler)
|
||||
{
|
||||
array_push($this->handlerQueue, $this->resolveHandler($handler));
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepends a handler to the start of the queue
|
||||
*
|
||||
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface
|
||||
* @param Callable|HandlerInterface $handler
|
||||
* @return Run
|
||||
*/
|
||||
public function prependHandler($handler)
|
||||
{
|
||||
array_unshift($this->handlerQueue, $this->resolveHandler($handler));
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a CallbackHandler from callable and throw if handler is invalid
|
||||
*
|
||||
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface
|
||||
* @param Callable|HandlerInterface $handler
|
||||
* @return HandlerInterface
|
||||
*/
|
||||
private function resolveHandler($handler)
|
||||
{
|
||||
if (is_callable($handler)) {
|
||||
$handler = new CallbackHandler($handler);
|
||||
@@ -55,43 +94,52 @@ final class Run implements RunInterface
|
||||
|
||||
if (!$handler instanceof HandlerInterface) {
|
||||
throw new InvalidArgumentException(
|
||||
"Argument to " . __METHOD__ . " must be a callable, or instance of "
|
||||
"Argument to " . __METHOD__ . " must be a callable, or instance of "
|
||||
. "Whoops\\Handler\\HandlerInterface"
|
||||
);
|
||||
}
|
||||
|
||||
$this->handlerStack[] = $handler;
|
||||
return $this;
|
||||
return $handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the last handler in the stack and returns it.
|
||||
* Removes the last handler in the queue and returns it.
|
||||
* Returns null if there"s nothing else to pop.
|
||||
* @return null|HandlerInterface
|
||||
*/
|
||||
public function popHandler()
|
||||
{
|
||||
return array_pop($this->handlerStack);
|
||||
return array_pop($this->handlerQueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the first handler in the queue and returns it.
|
||||
* Returns null if there"s nothing else to shift.
|
||||
* @return null|HandlerInterface
|
||||
*/
|
||||
public function shiftHandler()
|
||||
{
|
||||
return array_shift($this->handlerQueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with all handlers, in the
|
||||
* order they were added to the stack.
|
||||
* order they were added to the queue.
|
||||
* @return array
|
||||
*/
|
||||
public function getHandlers()
|
||||
{
|
||||
return $this->handlerStack;
|
||||
return $this->handlerQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all handlers in the handlerStack, including
|
||||
* Clears all handlers in the handlerQueue, including
|
||||
* the default PrettyPage handler.
|
||||
* @return Run
|
||||
*/
|
||||
public function clearHandlers()
|
||||
{
|
||||
$this->handlerStack = [];
|
||||
$this->handlerQueue = [];
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -260,7 +308,7 @@ final class Run implements RunInterface
|
||||
$handlerResponse = null;
|
||||
$handlerContentType = null;
|
||||
|
||||
foreach (array_reverse($this->handlerStack) as $handler) {
|
||||
foreach ($this->handlerQueue as $handler) {
|
||||
$handler->setRun($this);
|
||||
$handler->setInspector($inspector);
|
||||
$handler->setException($exception);
|
||||
@@ -375,6 +423,7 @@ final class Run implements RunInterface
|
||||
if ($error && Misc::isLevelFatal($error['type'])) {
|
||||
// If there was a fatal error,
|
||||
// it was not handled in handleError yet.
|
||||
$this->allowQuit = false;
|
||||
$this->handleError(
|
||||
$error['type'],
|
||||
$error['message'],
|
||||
|
||||
@@ -26,9 +26,9 @@ class SystemFacade
|
||||
*/
|
||||
public function setErrorHandler(callable $handler, $types = 'use-php-defaults')
|
||||
{
|
||||
// Workaround for PHP 5.5
|
||||
// Since PHP 5.4 the constant E_ALL contains all errors (even E_STRICT)
|
||||
if ($types === 'use-php-defaults') {
|
||||
$types = E_ALL | E_STRICT;
|
||||
$types = E_ALL;
|
||||
}
|
||||
return set_error_handler($handler, $types);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class TemplateHelper
|
||||
{
|
||||
$parts = explode($delimiter, $s);
|
||||
foreach ($parts as &$part) {
|
||||
$part = '<div class="delimiter">' . $part . '</div>';
|
||||
$part = '<span class="delimiter">' . $part . '</span>';
|
||||
}
|
||||
|
||||
return implode($delimiter, $parts);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Christopher Eklund
|
||||
Copyright (c) 2017 https://github.com/pug-php
|
||||
Copyright (c) 2017 https://github.com/kylekatarnls
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
43
vendor/kylekatarnls/update-helper/composer.json
vendored
Normal file
43
vendor/kylekatarnls/update-helper/composer.json
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "kylekatarnls/update-helper",
|
||||
"description": "Update helper",
|
||||
"type": "composer-plugin",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kyle",
|
||||
"email": "kylekatarnls@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"composer-plugin-api": "^1.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "^2.0.x-dev",
|
||||
"phpunit/phpunit": ">=4.8.35 <6.0",
|
||||
"codeclimate/php-test-reporter": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"UpdateHelper\\": "src/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"post-install-cmd": [
|
||||
"UpdateHelper\\UpdateHelper::check"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"UpdateHelper\\UpdateHelper::check"
|
||||
],
|
||||
"post-package-install": [
|
||||
"UpdateHelper\\UpdateHelper::check"
|
||||
],
|
||||
"post-package-update": [
|
||||
"UpdateHelper\\UpdateHelper::check"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"class": "UpdateHelper\\ComposerPlugin"
|
||||
}
|
||||
}
|
||||
37
vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php
vendored
Normal file
37
vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace UpdateHelper;
|
||||
|
||||
use Composer\Composer;
|
||||
use Composer\EventDispatcher\Event;
|
||||
use Composer\EventDispatcher\EventSubscriberInterface;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Plugin\PluginInterface;
|
||||
|
||||
class ComposerPlugin implements PluginInterface, EventSubscriberInterface
|
||||
{
|
||||
protected $io;
|
||||
|
||||
public function activate(Composer $composer, IOInterface $io)
|
||||
{
|
||||
$this->io = $io;
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
'post-autoload-dump' => array(
|
||||
array('onAutoloadDump', 0),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function onAutoloadDump(Event $event)
|
||||
{
|
||||
if (!class_exists('UpdateHelper\\UpdateHelper')) {
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateHelper::check($event);
|
||||
}
|
||||
}
|
||||
349
vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php
vendored
Normal file
349
vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php
vendored
Normal file
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
|
||||
namespace UpdateHelper;
|
||||
|
||||
use Composer\Composer;
|
||||
use Composer\EventDispatcher\Event;
|
||||
use Composer\Installer\PackageEvent;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Json\JsonFile;
|
||||
use Composer\Script\Event as ScriptEvent;
|
||||
use Composer\Semver\Semver;
|
||||
|
||||
class UpdateHelper
|
||||
{
|
||||
/** @var Event */
|
||||
private $event;
|
||||
/** @var IOInterface */
|
||||
private $io;
|
||||
/** @var Composer */
|
||||
private $composer;
|
||||
/** @var array */
|
||||
private $dependencies = array();
|
||||
/** @var string */
|
||||
private $composerFilePath;
|
||||
/** @var JsonFile */
|
||||
private $file;
|
||||
|
||||
protected static function appendConfig(&$classes, $directory, $key = null)
|
||||
{
|
||||
$file = $directory.DIRECTORY_SEPARATOR.'composer.json';
|
||||
$json = new JsonFile($file);
|
||||
$key = $key ? $key : 'update-helper';
|
||||
|
||||
try {
|
||||
$dependencyConfig = $json->read();
|
||||
} catch (\RuntimeException $e) {
|
||||
$dependencyConfig = null;
|
||||
}
|
||||
|
||||
if (is_array($dependencyConfig) && isset($dependencyConfig['extra'], $dependencyConfig['extra'][$key])) {
|
||||
$classes[$file] = $dependencyConfig['extra'][$key];
|
||||
}
|
||||
}
|
||||
|
||||
protected static function getUpdateHelperConfig(Composer $composer, $key = null)
|
||||
{
|
||||
$vendorDir = $composer->getConfig()->get('vendor-dir');
|
||||
|
||||
$npm = array();
|
||||
|
||||
foreach (scandir($vendorDir) as $namespace) {
|
||||
if ($namespace === '.' || $namespace === '..' || !is_dir($directory = $vendorDir.DIRECTORY_SEPARATOR.$namespace)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (scandir($directory) as $dependency) {
|
||||
if ($dependency === '.' || $dependency === '..' || !is_dir($subDirectory = $directory.DIRECTORY_SEPARATOR.$dependency)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
static::appendConfig($npm, $subDirectory, $key);
|
||||
}
|
||||
}
|
||||
|
||||
static::appendConfig($npm, dirname($vendorDir), $key);
|
||||
|
||||
return $npm;
|
||||
}
|
||||
|
||||
public static function check(Event $event)
|
||||
{
|
||||
if ($event instanceof ScriptEvent || $event instanceof PackageEvent) {
|
||||
$io = $event->getIO();
|
||||
$composer = $event->getComposer();
|
||||
$autoload = __DIR__.'/../../../../autoload.php';
|
||||
|
||||
if (file_exists($autoload)) {
|
||||
include_once $autoload;
|
||||
}
|
||||
|
||||
$classes = static::getUpdateHelperConfig($composer);
|
||||
|
||||
foreach ($classes as $file => $class) {
|
||||
$error = null;
|
||||
|
||||
if (is_string($class) && class_exists($class)) {
|
||||
try {
|
||||
$helper = new $class();
|
||||
} catch (\Exception $e) {
|
||||
$error = $e->getMessage()."\nFile: ".$e->getFile()."\nLine:".$e->getLine()."\n\n".$e->getTraceAsString();
|
||||
} catch (\Throwable $e) {
|
||||
$error = $e->getMessage()."\nFile: ".$e->getFile()."\nLine:".$e->getLine()."\n\n".$e->getTraceAsString();
|
||||
}
|
||||
|
||||
if (!$error && $helper instanceof UpdateHelperInterface) {
|
||||
$helper->check(new static($event, $io, $composer));
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$error = JsonFile::encode($class).' is not an instance of UpdateHelperInterface.';
|
||||
}
|
||||
|
||||
$io->writeError('UpdateHelper error in '.$file.":\n".$error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function __construct(Event $event, IOInterface $io = null, Composer $composer = null)
|
||||
{
|
||||
$this->event = $event;
|
||||
$this->io = $io ?: (method_exists($event, 'getIO') ? $event->getIO() : null);
|
||||
$this->composer = $composer ?: (method_exists($event, 'getComposer') ? $event->getComposer() : null);
|
||||
|
||||
if ($this->composer &&
|
||||
($directory = $this->composer->getConfig()->get('archive-dir')) &&
|
||||
file_exists($file = $directory.'/composer.json')
|
||||
) {
|
||||
$this->composerFilePath = $file;
|
||||
$this->file = new JsonFile($this->composerFilePath);
|
||||
$this->dependencies = $this->file->read();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JsonFile
|
||||
*/
|
||||
public function getFile()
|
||||
{
|
||||
return $this->file;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getComposerFilePath()
|
||||
{
|
||||
return $this->composerFilePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Composer
|
||||
*/
|
||||
public function getComposer()
|
||||
{
|
||||
return $this->composer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Event
|
||||
*/
|
||||
public function getEvent()
|
||||
{
|
||||
return $this->event;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return IOInterface
|
||||
*/
|
||||
public function getIo()
|
||||
{
|
||||
return $this->io;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getDependencies()
|
||||
{
|
||||
return $this->dependencies;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getDevDependencies()
|
||||
{
|
||||
return isset($this->dependencies['require-dev']) ? $this->dependencies['require-dev'] : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getProdDependencies()
|
||||
{
|
||||
return isset($this->dependencies['require']) ? $this->dependencies['require'] : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getFlattenDependencies()
|
||||
{
|
||||
return array_merge($this->getDevDependencies(), $this->getProdDependencies());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dependency
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAsDevDependency($dependency)
|
||||
{
|
||||
return isset($this->dependencies['require-dev'][$dependency]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dependency
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAsProdDependency($dependency)
|
||||
{
|
||||
return isset($this->dependencies['require'][$dependency]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dependency
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAsDependency($dependency)
|
||||
{
|
||||
return $this->hasAsDevDependency($dependency) || $this->hasAsProdDependency($dependency);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dependency
|
||||
* @param string $version
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDependencyAtLeast($dependency, $version)
|
||||
{
|
||||
if ($this->hasAsProdDependency($dependency)) {
|
||||
return Semver::satisfies($version, $this->dependencies['require'][$dependency]);
|
||||
}
|
||||
|
||||
if ($this->hasAsDevDependency($dependency)) {
|
||||
return Semver::satisfies($version, $this->dependencies['require-dev'][$dependency]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dependency
|
||||
* @param string $version
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDependencyLesserThan($dependency, $version)
|
||||
{
|
||||
return !$this->isDependencyAtLeast($dependency, $version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dependency
|
||||
* @param string $version
|
||||
* @param array $environments
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDependencyVersion($dependency, $version, $environments = array('require', 'require-dev'))
|
||||
{
|
||||
return $this->setDependencyVersions(array($dependency => $version), $environments);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $dependencies
|
||||
* @param array $environments
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDependencyVersions($dependencies, $environments = array('require', 'require-dev'))
|
||||
{
|
||||
if (!$this->composerFilePath) {
|
||||
throw new \RuntimeException('No composer instance detected.');
|
||||
}
|
||||
|
||||
$touched = false;
|
||||
|
||||
foreach ($environments as $environment) {
|
||||
foreach ($dependencies as $dependency => $version) {
|
||||
if (isset($this->dependencies[$environment], $this->dependencies[$environment][$dependency])) {
|
||||
$this->dependencies[$environment][$dependency] = $version;
|
||||
$touched = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($touched) {
|
||||
if (!$this->composerFilePath) {
|
||||
throw new \RuntimeException('composer.json not found (custom vendor-dir are not yet supported).');
|
||||
}
|
||||
|
||||
$file = new JsonFile($this->composerFilePath);
|
||||
$file->write($this->dependencies);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
$output = shell_exec('composer update --no-scripts');
|
||||
|
||||
if (!empty($output)) {
|
||||
$this->write($output);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $text
|
||||
*/
|
||||
public function write($text)
|
||||
{
|
||||
if ($this->io) {
|
||||
$this->io->write($text);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_array($text)) {
|
||||
$text = implode("\n", $text);
|
||||
}
|
||||
|
||||
echo $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isInteractive()
|
||||
{
|
||||
return $this->io && $this->io->isInteractive();
|
||||
}
|
||||
}
|
||||
8
vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php
vendored
Normal file
8
vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace UpdateHelper;
|
||||
|
||||
interface UpdateHelperInterface
|
||||
{
|
||||
public function check(UpdateHelper $helper);
|
||||
}
|
||||
2
vendor/laravel/framework/README.md
vendored
2
vendor/laravel/framework/README.md
vendored
@@ -38,7 +38,7 @@ In order to ensure that the Laravel community is welcoming to all, please review
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
Please review [our security policy](https://github.com/laravel/framework/security/policy) on how to report security vulnerabilities.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
83
vendor/laravel/framework/SECURITY.md
vendored
83
vendor/laravel/framework/SECURITY.md
vendored
@@ -1,5 +1,7 @@
|
||||
# Security Policy
|
||||
|
||||
**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Version | Security Fixes Until
|
||||
@@ -17,3 +19,84 @@ Version | Security Fixes Until
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an email to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
|
||||
|
||||
### Public PGP Key
|
||||
|
||||
```
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: OpenPGP v2.0.8
|
||||
Comment: https://sela.io/pgp/
|
||||
|
||||
xsFNBFugFSQBEACxEKhIY9IoJzcouVTIYKJfWFGvwFgbRjQWBiH3QdHId5vCrbWo
|
||||
s2l+4Rv03gMG+yHLJ3rWElnNdRaNdQv59+lShrZF7Bvu7Zvc0mMNmFOM/mQ/K2Lt
|
||||
OK/8bh6iwNNbEuyOhNQlarEy/w8hF8Yf55hBeu/rajGtcyURJDloQ/vNzcx4RWGK
|
||||
G3CLr8ka7zPYIjIFUvHLt27mcYFF9F4/G7b4HKpn75ICKC4vPoQSaYNAHlHQBLFb
|
||||
Jg/WPl93SySHLugU5F58sICs+fBZadXYQG5dWmbaF5OWB1K2XgRs45BQaBzf/8oS
|
||||
qq0scN8wVhAdBeYlVFf0ImDOxGlZ2suLK1BKJboR6zCIkBAwufKss4NV1R9KSUMv
|
||||
YGn3mq13PGme0QoIkvQkua5VjTwWfQx7wFDxZ3VQSsjIlbVyRL/Ac/hq71eAmiIR
|
||||
t6ZMNMPFpuSwBfYimrXqqb4EOffrfsTzRenG1Cxm4jNZRzX/6P4an7F/euoqXeXZ
|
||||
h37TiC7df+eHKcBI4mL+qOW4ibBqg8WwWPJ+jvuhANyQpRVzf3NNEOwJYCNbQPM/
|
||||
PbqYvMruAH+gg7uyu9u0jX3o/yLSxJMV7kF4x/SCDuBKIxSSUI4cgbjIlnxWLXZC
|
||||
wl7KW4xAKkerO3wgIPnxNfxQoiYiEKA1c3PShWRA0wHIMt3rVRJxwGM4CwARAQAB
|
||||
zRJ0YXlsb3JAbGFyYXZlbC5jb23CwXAEEwEKABoFAlugFSQCGy8DCwkHAxUKCAIe
|
||||
AQIXgAIZAQAKCRDKAI7r/Ml7Zo0SD/9zwu9K87rbqXbvZ3TVu7TnN+z7mPvVBzl+
|
||||
SFEK360TYq8a4GosghZuGm4aNEyZ90CeUjPQwc5fHwa26tIwqgLRppsG21B/mZwu
|
||||
0m8c5RaBFRFX/mCTEjlpvBkOwMJZ8f05nNdaktq6W98DbMN03neUwnpWlNSLeoNI
|
||||
u4KYZmJopNFLEax5WGaaDpmqD1J+WDr/aPHx39MUAg2ZVuC3Gj/IjYZbD1nCh0xD
|
||||
a09uDODje8a9uG33cKRBcKKPRLZjWEt5SWReLx0vsTuqJSWhCybHRBl9BQTc/JJR
|
||||
gJu5V4X3f1IYMTNRm9GggxcXrlOAiDCjE2J8ZTUt0cSxedQFnNyGfKxe/l94oTFP
|
||||
wwFHbdKhsSDZ1OyxPNIY5OHlMfMvvJaNbOw0xPPAEutPwr1aqX9sbgPeeiJwAdyw
|
||||
mPw2x/wNQvKJITRv6atw56TtLxSevQIZGPHCYTSlsIoi9jqh9/6vfq2ruMDYItCq
|
||||
+8uzei6TyH6w+fUpp/uFmcwZdrDwgNVqW+Ptu+pD2WmthqESF8UEQVoOv7OPgA5E
|
||||
ofOMaeH2ND74r2UgcXjPxZuUp1RkhHE2jJeiuLtbvOgrWwv3KOaatyEbVl+zHA1e
|
||||
1RHdJRJRPK+S7YThxxduqfOBX7E03arbbhHdS1HKhPwMc2e0hNnQDoNxQcv0GQp4
|
||||
2Y6UyCRaus7ATQRboBUkAQgA0h5j3EO2HNvp8YuT1t/VF00uUwbQaz2LIoZogqgC
|
||||
14Eb77diuIPM9MnuG7bEOnNtPVMFXxI5UYBIlzhLMxf7pfbrsoR4lq7Ld+7KMzdm
|
||||
eREqJRgUNfjZhtRZ9Z+jiFPr8AGpYxwmJk4v387uQGh1GC9JCc3CCLJoI62I9t/1
|
||||
K2b25KiOzW/FVZ/vYFj1WbISRd5GqS8SEFh4ifU79LUlJ/nEsFv4JxAXN9RqjU0e
|
||||
H4S/m1Nb24UCtYAv1JKymcf5O0G7kOzvI0w06uKxk0hNwspjDcOebD8Vv9IdYtGl
|
||||
0bn7PpBlVO1Az3s8s6Xoyyw+9Us+VLNtVka3fcrdaV/n0wARAQABwsKEBBgBCgAP
|
||||
BQJboBUkBQkPCZwAAhsuASkJEMoAjuv8yXtmwF0gBBkBCgAGBQJboBUkAAoJEA1I
|
||||
8aTLtYHmjpIH/A1ZKwTGetHFokJxsd2omvbqv+VtpAjnUbvZEi5g3yZXn+dHJV+K
|
||||
UR/DNlfGxLWEcY6datJ3ziNzzD5u8zcPp2CqeTlCxOky8F74FjEL9tN/EqUbvvmR
|
||||
td2LXsSFjHnLJRK5lYfZ3rnjKA5AjqC9MttILBovY2rI7lyVt67kbS3hMHi8AZl8
|
||||
EgihnHRJxGZjEUxyTxcB13nhfjAvxQq58LOj5754Rpe9ePSKbT8DNMjHbGpLrESz
|
||||
cmyn0VzDMLfxg8AA9uQFMwdlKqve7yRZXzeqvy08AatUpJaL7DsS4LKOItwvBub6
|
||||
tHbCE3mqrUw5lSNyUahO3vOcMAHnF7fd4W++eA//WIQKnPX5t3CwCedKn8Qkb3Ow
|
||||
oj8xUNl2T6kEtQJnO85lKBFXaMOUykopu6uB9EEXEr0ShdunOKX/UdDbkv46F2AB
|
||||
7TtltDSLB6s/QeHExSb8Jo3qra86JkDUutWdJxV7DYFUttBga8I0GqdPu4yRRoc/
|
||||
0irVXsdDY9q7jz6l7fw8mSeJR96C0Puhk70t4M1Vg/tu/ONRarXQW7fJ8kl21PcD
|
||||
UKNWWa242gji/+GLRI8AIpGMsBiX7pHhqmMMth3u7+ne5BZGGJz0uX+CzWboOHyq
|
||||
kWgfY4a62t3hM0vwnUkl/D7VgSGy4LiKQrapd3LvU2uuEfFsMu3CDicZBRXPqoXj
|
||||
PBjkkPKhwUTNlwEQrGF3QsZhNe0M9ptM2fC34qtxZtMIMB2NLvE4S621rmQ05oQv
|
||||
sT0B9WgUL3GYRKdx700+ojHEuwZ79bcLgo1dezvkfPtu/++2CXtieFthDlWHy8x5
|
||||
XJJjI1pDfGO+BgX0rS3QrQEYlF/uPQynKwxe6cGI62eZ0ug0hNrPvKEcfMLVqBQv
|
||||
w4VH6iGp9yNKMUOgAECLCs4YCxK+Eka9Prq/Gh4wuqjWiX8m66z8YvKf27sFL3fR
|
||||
OwGaz3LsnRSxbk/8oSiZuOVLfn44XRcxsHebteZat23lwD93oq54rtKnlJgmZHJY
|
||||
4vMgk1jpS4laGnvhZj7OwE0EW6AVJAEIAKJSrUvXRyK3XQnLp3Kfj82uj0St8Dt2
|
||||
h8BMeVbrAbg38wCN8XQZzVR9+bRZRR+aCzpKSqwhEQVtH7gdKgfdNdGNhG2DFAVk
|
||||
SihMhQz190FKttUZgwY00enzD7uaaA5VwNAZzRIr8skwiASB7UoO+lIhrAYgcQCA
|
||||
LpwCSMrUNB3gY1IVa2xi9FljEbS2uMABfOsTfl7z4L4T4DRv/ovDf+ihyZOXsXiH
|
||||
RVoUTIpN8ZILCZiiKubE1sMj4fSQwCs06UyDy17HbOG5/dO9awR/LHW53O3nZCxE
|
||||
JbCqr5iHa2MdHMC12+luxWJKD9DbVB01LiiPZCTkuKUDswCyi7otpVEAEQEAAcLC
|
||||
hAQYAQoADwUCW6AVJAUJDwmcAAIbLgEpCRDKAI7r/Ml7ZsBdIAQZAQoABgUCW6AV
|
||||
JAAKCRDxrCjKN7eORjt2B/9EnKVJ9lwB1JwXcQp6bZgJ21r6ghyXBssv24N9UF+v
|
||||
5QDz/tuSkTsKK1UoBrBDEinF/xTP2z+xXIeyP4c3mthMHsYdMl7AaGpcCwVJiL62
|
||||
fZvd+AiYNX3C+Bepwnwoziyhx4uPaqoezSEMD8G2WQftt6Gqttmm0Di5RVysCECF
|
||||
EyhkHwvCcbpXb5Qq+4XFzCUyaIZuGpe+oeO7U8B1CzOC16hEUu0Uhbk09Xt6dSbS
|
||||
ZERoxFjrGU+6bk424MkZkKvNS8FdTN2s3kQuHoNmhbMY+fRzKX5JNrcQ4dQQufiB
|
||||
zFcc2Ba0JVU0nYAMftTeT5ALakhwSqr3AcdD2avJZp3EYfYP/3smPGTeg1cDJV3E
|
||||
WIlCtSlhbwviUjvWEWJUE+n9MjhoUNU0TJtHIliUYUajKMG/At5wJZTXJaKVUx32
|
||||
UCWr4ioKfSzlbp1ngBuFlvU7LgZRcKbBZWvKj/KRYpxpfvPyPElmegCjAk6oiZYV
|
||||
LOV+jFfnMkk9PnR91ZZfTNx/bK+BwjOnO+g7oE8V2g2bA90vHdeSUHR52SnaVN/b
|
||||
9ytt07R0f+YtyKojuPmlNsbyAaUYUtJ1o+XNCwdVxzarYEuUabhAfDiVTu9n8wTr
|
||||
YVvnriSFOjNvOY9wdLAa56n7/qM8bzuGpoBS5SilXgJvITvQfWPvg7I9C3QhwK1S
|
||||
F6B1uquQGbBSze2wlnMbKXmhyGLlv9XpOqpkkejQo3o58B+Sqj4B8DuYixSjoknr
|
||||
pRbj8gqgqBKlcpf1wD5X9qCrl9vq19asVOHaKhiFZGxZIVbBpBOdvAKaMj4p/uln
|
||||
yklN3YFIfgmGPYbL0elvXVn7XfvwSV1mCQV5LtMbLHsFf0VsA16UsG8A/tLWtwgt
|
||||
0antzftRHXb+DI4qr+qEYKFkv9F3oCOXyH4QBhPA42EzKqhMXByEkEK9bu6skioL
|
||||
mHhDQ7yHjTWcxstqQjkUQ0T/IF9ls+Sm5u7rVXEifpyI7MCb+76kSCDawesvInKt
|
||||
WBGOG/qJGDlNiqBYYt2xNqzHCJoC
|
||||
=zXOv
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
```
|
||||
|
||||
@@ -150,10 +150,11 @@ class Gate implements GateContract
|
||||
public function resource($name, $class, array $abilities = null)
|
||||
{
|
||||
$abilities = $abilities ?: [
|
||||
'view' => 'view',
|
||||
'create' => 'create',
|
||||
'update' => 'update',
|
||||
'delete' => 'delete',
|
||||
'viewAny' => 'viewAny',
|
||||
'view' => 'view',
|
||||
'create' => 'create',
|
||||
'update' => 'update',
|
||||
'delete' => 'delete',
|
||||
];
|
||||
|
||||
foreach ($abilities as $ability => $method) {
|
||||
|
||||
@@ -58,7 +58,7 @@ class AuthManager implements FactoryContract
|
||||
/**
|
||||
* Attempt to get the guard from the local cache.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
|
||||
*/
|
||||
public function guard($name = null)
|
||||
|
||||
@@ -13,7 +13,7 @@ class EnsureEmailIsVerified
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string $redirectToRoute
|
||||
* @param string|null $redirectToRoute
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle($request, Closure $next, $redirectToRoute = null)
|
||||
|
||||
@@ -132,7 +132,7 @@ class BroadcastManager implements FactoryContract
|
||||
/**
|
||||
* Get a driver instance.
|
||||
*
|
||||
* @param string $driver
|
||||
* @param string|null $driver
|
||||
* @return mixed
|
||||
*/
|
||||
public function connection($driver = null)
|
||||
|
||||
@@ -451,7 +451,7 @@ class Command extends SymfonyCommand
|
||||
* Write a string as standard output.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $style
|
||||
* @param string|null $style
|
||||
* @param int|string|null $verbosity
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ trait ConfirmableTrait
|
||||
$shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback;
|
||||
|
||||
if ($shouldConfirm) {
|
||||
if ($this->option('force')) {
|
||||
if ($this->hasOption('force') && $this->option('force')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class Event
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\EventMutex $mutex
|
||||
* @param string $command
|
||||
* @param \DateTimeZone|string $timezone
|
||||
* @param \DateTimeZone|string|null $timezone
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(EventMutex $mutex, $command, $timezone = null)
|
||||
|
||||
@@ -10,8 +10,8 @@ interface Factory
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param int $minutes
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @param bool|null $secure
|
||||
* @param bool $httpOnly
|
||||
* @param bool $raw
|
||||
@@ -25,8 +25,8 @@ interface Factory
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @param bool|null $secure
|
||||
* @param bool $httpOnly
|
||||
* @param bool $raw
|
||||
@@ -39,8 +39,8 @@ interface Factory
|
||||
* Expire the given cookie.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @return \Symfony\Component\HttpFoundation\Cookie
|
||||
*/
|
||||
public function forget($name, $path = null, $domain = null);
|
||||
|
||||
@@ -9,7 +9,7 @@ interface Encrypter
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param bool $serialize
|
||||
* @return mixed
|
||||
* @return string
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
@@ -18,7 +18,7 @@ interface Encrypter
|
||||
/**
|
||||
* Decrypt the given value.
|
||||
*
|
||||
* @param mixed $payload
|
||||
* @param string $payload
|
||||
* @param bool $unserialize
|
||||
* @return mixed
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Factory
|
||||
/**
|
||||
* Get a filesystem implementation.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Contracts\Filesystem\Filesystem
|
||||
*/
|
||||
public function disk($name = null);
|
||||
|
||||
@@ -8,7 +8,7 @@ interface MailQueue
|
||||
* Queue a new e-mail message for sending.
|
||||
*
|
||||
* @param string|array|\Illuminate\Contracts\Mail\Mailable $view
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @return mixed
|
||||
*/
|
||||
public function queue($view, $queue = null);
|
||||
@@ -18,7 +18,7 @@ interface MailQueue
|
||||
*
|
||||
* @param \DateTimeInterface|\DateInterval|int $delay
|
||||
* @param string|array|\Illuminate\Contracts\Mail\Mailable $view
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @return mixed
|
||||
*/
|
||||
public function later($delay, $view, $queue = null);
|
||||
|
||||
@@ -34,7 +34,7 @@ interface Mailer
|
||||
*
|
||||
* @param string|array|\Illuminate\Contracts\Mail\Mailable $view
|
||||
* @param array $data
|
||||
* @param \Closure|string $callback
|
||||
* @param \Closure|string|null $callback
|
||||
* @return void
|
||||
*/
|
||||
public function send($view, array $data = [], $callback = null);
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Factory
|
||||
/**
|
||||
* Resolve a queue connection instance.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Contracts\Queue\Queue
|
||||
*/
|
||||
public function connection($name = null);
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Queue
|
||||
/**
|
||||
* Get the size of the queue.
|
||||
*
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @return int
|
||||
*/
|
||||
public function size($queue = null);
|
||||
@@ -17,7 +17,7 @@ interface Queue
|
||||
*
|
||||
* @param string|object $job
|
||||
* @param mixed $data
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @return mixed
|
||||
*/
|
||||
public function push($job, $data = '', $queue = null);
|
||||
@@ -36,7 +36,7 @@ interface Queue
|
||||
* Push a raw payload onto the queue.
|
||||
*
|
||||
* @param string $payload
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @param array $options
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ interface Queue
|
||||
* @param \DateTimeInterface|\DateInterval|int $delay
|
||||
* @param string|object $job
|
||||
* @param mixed $data
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @return mixed
|
||||
*/
|
||||
public function later($delay, $job, $data = '', $queue = null);
|
||||
@@ -69,7 +69,7 @@ interface Queue
|
||||
*
|
||||
* @param array $jobs
|
||||
* @param mixed $data
|
||||
* @param string $queue
|
||||
* @param string|null $queue
|
||||
* @return mixed
|
||||
*/
|
||||
public function bulk($jobs, $data = '', $queue = null);
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Factory
|
||||
/**
|
||||
* Get a Redis connection by name.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Redis\Connections\Connection
|
||||
*/
|
||||
public function connection($name = null);
|
||||
|
||||
@@ -24,7 +24,7 @@ interface UrlGenerator
|
||||
*
|
||||
* @param string $path
|
||||
* @param mixed $extra
|
||||
* @param bool $secure
|
||||
* @param bool|null $secure
|
||||
* @return string
|
||||
*/
|
||||
public function to($path, $extra = [], $secure = null);
|
||||
@@ -42,7 +42,7 @@ interface UrlGenerator
|
||||
* Generate the URL to an application asset.
|
||||
*
|
||||
* @param string $path
|
||||
* @param bool $secure
|
||||
* @param bool|null $secure
|
||||
* @return string
|
||||
*/
|
||||
public function asset($path, $secure = null);
|
||||
|
||||
@@ -36,7 +36,7 @@ interface Session
|
||||
/**
|
||||
* Save the session data to storage.
|
||||
*
|
||||
* @return bool
|
||||
* @return void
|
||||
*/
|
||||
public function save();
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ interface MessageBag extends Arrayable
|
||||
/**
|
||||
* Get the first message from the bag for a given key.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $format
|
||||
* @param string|null $key
|
||||
* @param string|null $format
|
||||
* @return string
|
||||
*/
|
||||
public function first($key = null, $format = null);
|
||||
@@ -49,7 +49,7 @@ interface MessageBag extends Arrayable
|
||||
* Get all of the messages from the bag for a given key.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $format
|
||||
* @param string|null $format
|
||||
* @return array
|
||||
*/
|
||||
public function get($key, $format = null);
|
||||
@@ -57,7 +57,7 @@ interface MessageBag extends Arrayable
|
||||
/**
|
||||
* Get all of the messages for every key in the bag.
|
||||
*
|
||||
* @param string $format
|
||||
* @param string|null $format
|
||||
* @return array
|
||||
*/
|
||||
public function all($format = null);
|
||||
|
||||
@@ -8,7 +8,7 @@ interface Responsable
|
||||
* Create an HTTP response that represents the object.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function toResponse($request);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ interface Loader
|
||||
*
|
||||
* @param string $locale
|
||||
* @param string $group
|
||||
* @param string $namespace
|
||||
* @param string|null $namespace
|
||||
* @return array
|
||||
*/
|
||||
public function load($locale, $group, $namespace = null);
|
||||
|
||||
@@ -9,7 +9,7 @@ interface Translator
|
||||
*
|
||||
* @param string $key
|
||||
* @param array $replace
|
||||
* @param string $locale
|
||||
* @param string|null $locale
|
||||
* @return mixed
|
||||
*/
|
||||
public function trans($key, array $replace = [], $locale = null);
|
||||
@@ -20,7 +20,7 @@ interface Translator
|
||||
* @param string $key
|
||||
* @param int|array|\Countable $number
|
||||
* @param array $replace
|
||||
* @param string $locale
|
||||
* @param string|null $locale
|
||||
* @return string
|
||||
*/
|
||||
public function transChoice($key, $number, array $replace = [], $locale = null);
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Factory
|
||||
*
|
||||
* @param string $rule
|
||||
* @param \Closure|string $extension
|
||||
* @param string $message
|
||||
* @param string|null $message
|
||||
* @return void
|
||||
*/
|
||||
public function extend($rule, $extension, $message = null);
|
||||
@@ -30,7 +30,7 @@ interface Factory
|
||||
*
|
||||
* @param string $rule
|
||||
* @param \Closure|string $extension
|
||||
* @param string $message
|
||||
* @param string|null $message
|
||||
* @return void
|
||||
*/
|
||||
public function extendImplicit($rule, $extension, $message = null);
|
||||
|
||||
@@ -53,8 +53,8 @@ class CookieJar implements JarContract
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param int $minutes
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @param bool|null $secure
|
||||
* @param bool $httpOnly
|
||||
* @param bool $raw
|
||||
@@ -75,8 +75,8 @@ class CookieJar implements JarContract
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @param bool|null $secure
|
||||
* @param bool $httpOnly
|
||||
* @param bool $raw
|
||||
@@ -92,8 +92,8 @@ class CookieJar implements JarContract
|
||||
* Expire the given cookie.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @return \Symfony\Component\HttpFoundation\Cookie
|
||||
*/
|
||||
public function forget($name, $path = null, $domain = null)
|
||||
@@ -158,7 +158,7 @@ class CookieJar implements JarContract
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param bool|null $secure
|
||||
* @param string $sameSite
|
||||
* @param string|null $sameSite
|
||||
* @return array
|
||||
*/
|
||||
protected function getPathAndDomain($path, $domain, $secure = null, $sameSite = null)
|
||||
@@ -172,7 +172,7 @@ class CookieJar implements JarContract
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
* @param bool $secure
|
||||
* @param string $sameSite
|
||||
* @param string|null $sameSite
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
|
||||
|
||||
@@ -66,7 +66,7 @@ class Manager
|
||||
/**
|
||||
* Get a connection instance from the global manager.
|
||||
*
|
||||
* @param string $connection
|
||||
* @param string|null $connection
|
||||
* @return \Illuminate\Database\Connection
|
||||
*/
|
||||
public static function connection($connection = null)
|
||||
@@ -89,7 +89,7 @@ class Manager
|
||||
/**
|
||||
* Get a schema builder instance.
|
||||
*
|
||||
* @param string $connection
|
||||
* @param string|null $connection
|
||||
* @return \Illuminate\Database\Schema\Builder
|
||||
*/
|
||||
public static function schema($connection = null)
|
||||
@@ -100,7 +100,7 @@ class Manager
|
||||
/**
|
||||
* Get a registered connection instance.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Database\Connection
|
||||
*/
|
||||
public function getConnection($name = null)
|
||||
|
||||
@@ -82,7 +82,7 @@ trait BuildsQueries
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param callable $callback
|
||||
* @param callable $default
|
||||
* @param callable|null $default
|
||||
* @return mixed|$this
|
||||
*/
|
||||
public function when($value, $callback, $default = null)
|
||||
@@ -112,7 +112,7 @@ trait BuildsQueries
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param callable $callback
|
||||
* @param callable $default
|
||||
* @param callable|null $default
|
||||
* @return mixed|$this
|
||||
*/
|
||||
public function unless($value, $callback, $default = null)
|
||||
|
||||
@@ -700,15 +700,15 @@ class Connection implements ConnectionInterface
|
||||
/**
|
||||
* Handle a query exception.
|
||||
*
|
||||
* @param \Exception $e
|
||||
* @param \Illuminate\Database\QueryException $e
|
||||
* @param string $query
|
||||
* @param array $bindings
|
||||
* @param \Closure $callback
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Illuminate\Database\QueryException
|
||||
*/
|
||||
protected function handleQueryException($e, $query, $bindings, Closure $callback)
|
||||
protected function handleQueryException(QueryException $e, $query, $bindings, Closure $callback)
|
||||
{
|
||||
if ($this->transactions >= 1) {
|
||||
throw $e;
|
||||
|
||||
@@ -34,7 +34,7 @@ class ConnectionResolver implements ConnectionResolverInterface
|
||||
/**
|
||||
* Get a database connection instance.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
public function connection($name = null)
|
||||
|
||||
@@ -7,7 +7,7 @@ interface ConnectionResolverInterface
|
||||
/**
|
||||
* Get a database connection instance.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
public function connection($name = null);
|
||||
|
||||
@@ -36,7 +36,7 @@ class ConnectionFactory
|
||||
* Establish a PDO connection based on the configuration.
|
||||
*
|
||||
* @param array $config
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Database\Connection
|
||||
*/
|
||||
public function make(array $config, $name = null)
|
||||
|
||||
@@ -17,7 +17,8 @@ class MigrateMakeCommand extends BaseCommand
|
||||
{--create= : The table to be created}
|
||||
{--table= : The table to migrate}
|
||||
{--path= : The location where the migration file should be created}
|
||||
{--realpath : Indicate any provided migration file paths are pre-resolved absolute paths}';
|
||||
{--realpath : Indicate any provided migration file paths are pre-resolved absolute paths}
|
||||
{--fullpath : Output the full path of the migration}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -105,9 +106,13 @@ class MigrateMakeCommand extends BaseCommand
|
||||
*/
|
||||
protected function writeMigration($name, $table, $create)
|
||||
{
|
||||
$file = pathinfo($this->creator->create(
|
||||
$file = $this->creator->create(
|
||||
$name, $this->getMigrationPath(), $table, $create
|
||||
), PATHINFO_FILENAME);
|
||||
);
|
||||
|
||||
if (! $this->option('fullpath')) {
|
||||
$file = pathinfo($file, PATHINFO_FILENAME);
|
||||
}
|
||||
|
||||
$this->line("<info>Created Migration:</info> {$file}");
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class DatabaseManager implements ConnectionResolverInterface
|
||||
/**
|
||||
* Get a database connection instance.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Database\Connection
|
||||
*/
|
||||
public function connection($name = null)
|
||||
@@ -186,7 +186,7 @@ class DatabaseManager implements ConnectionResolverInterface
|
||||
* Prepare the read / write mode for database connection instance.
|
||||
*
|
||||
* @param \Illuminate\Database\Connection $connection
|
||||
* @param string $type
|
||||
* @param string|null $type
|
||||
* @return \Illuminate\Database\Connection
|
||||
*/
|
||||
protected function setPdoForType(Connection $connection, $type = null)
|
||||
@@ -203,7 +203,7 @@ class DatabaseManager implements ConnectionResolverInterface
|
||||
/**
|
||||
* Disconnect from the given database and remove from local cache.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return void
|
||||
*/
|
||||
public function purge($name = null)
|
||||
@@ -218,7 +218,7 @@ class DatabaseManager implements ConnectionResolverInterface
|
||||
/**
|
||||
* Disconnect from the given database.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect($name = null)
|
||||
@@ -231,7 +231,7 @@ class DatabaseManager implements ConnectionResolverInterface
|
||||
/**
|
||||
* Reconnect to the given database.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $name
|
||||
* @return \Illuminate\Database\Connection
|
||||
*/
|
||||
public function reconnect($name = null)
|
||||
|
||||
@@ -71,7 +71,7 @@ class Builder
|
||||
* @var array
|
||||
*/
|
||||
protected $passthru = [
|
||||
'insert', 'insertGetId', 'getBindings', 'toSql',
|
||||
'insert', 'insertGetId', 'getBindings', 'toSql', 'dump', 'dd',
|
||||
'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection',
|
||||
];
|
||||
|
||||
@@ -643,7 +643,7 @@ class Builder
|
||||
public function cursor()
|
||||
{
|
||||
foreach ($this->applyScopes()->query->cursor() as $record) {
|
||||
yield $this->model->newFromBuilder($record);
|
||||
yield $this->newModelInstance()->newFromBuilder($record);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ class Builder
|
||||
continue;
|
||||
}
|
||||
|
||||
$builder->callScope(function (Builder $builder) use ($scope) {
|
||||
$builder->callScope(function (self $builder) use ($scope) {
|
||||
// If the scope is a Closure we will just go ahead and call the scope with the
|
||||
// builder instance. The "callScope" method will properly group the clauses
|
||||
// that are added to this query so "where" clauses maintain proper logic.
|
||||
|
||||
@@ -17,7 +17,7 @@ class Collection extends BaseCollection implements QueueableCollection
|
||||
*
|
||||
* @param mixed $key
|
||||
* @param mixed $default
|
||||
* @return \Illuminate\Database\Eloquent\Model|static
|
||||
* @return \Illuminate\Database\Eloquent\Model|static|null
|
||||
*/
|
||||
public function find($key, $default = null)
|
||||
{
|
||||
|
||||
@@ -413,6 +413,12 @@ trait HasAttributes
|
||||
$relation = $this->$method();
|
||||
|
||||
if (! $relation instanceof Relation) {
|
||||
if (is_null($relation)) {
|
||||
throw new LogicException(sprintf(
|
||||
'%s::%s must return a relationship instance, but "null" was returned. Was the "return" keyword used?', static::class, $method
|
||||
));
|
||||
}
|
||||
|
||||
throw new LogicException(sprintf(
|
||||
'%s::%s must return a relationship instance.', static::class, $method
|
||||
));
|
||||
|
||||
@@ -294,6 +294,10 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
|
||||
{
|
||||
$class = $class ?: static::class;
|
||||
|
||||
if (! get_class_vars($class)['timestamps'] || ! $class::UPDATED_AT) {
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (static::$ignoreOnTouch as $ignoredClass) {
|
||||
if ($class === $ignoredClass || is_subclass_of($class, $ignoredClass)) {
|
||||
return true;
|
||||
|
||||
@@ -256,7 +256,7 @@ trait AsPivot
|
||||
/**
|
||||
* Get a new query to restore one or more models by their queueable IDs.
|
||||
*
|
||||
* @param array<int> $ids
|
||||
* @param int[]|string[]|string $ids
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function newQueryForRestoration($ids)
|
||||
@@ -279,7 +279,7 @@ trait AsPivot
|
||||
/**
|
||||
* Get a new query to restore multiple models by their queueable IDs.
|
||||
*
|
||||
* @param array|int $ids
|
||||
* @param int[]|string[] $ids
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
protected function newQueryForCollectionRestoration(array $ids)
|
||||
|
||||
@@ -37,6 +37,13 @@ class MorphTo extends BelongsTo
|
||||
*/
|
||||
protected $macroBuffer = [];
|
||||
|
||||
/**
|
||||
* A map of relations to load for each individual morph type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $morphableEagerLoads = [];
|
||||
|
||||
/**
|
||||
* Create a new morph to relationship instance.
|
||||
*
|
||||
@@ -111,7 +118,10 @@ class MorphTo extends BelongsTo
|
||||
|
||||
$query = $this->replayMacros($instance->newQuery())
|
||||
->mergeConstraintsFrom($this->getQuery())
|
||||
->with($this->getQuery()->getEagerLoads());
|
||||
->with(array_merge(
|
||||
$this->getQuery()->getEagerLoads(),
|
||||
(array) ($this->morphableEagerLoads[get_class($instance)] ?? [])
|
||||
));
|
||||
|
||||
return $query->whereIn(
|
||||
$instance->getTable().'.'.$ownerKey, $this->gatherKeysByType($type)
|
||||
@@ -253,6 +263,21 @@ class MorphTo extends BelongsTo
|
||||
return $this->dictionary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify which relations to load for a given morph type.
|
||||
*
|
||||
* @param array $with
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
||||
*/
|
||||
public function morphWith(array $with)
|
||||
{
|
||||
$this->morphableEagerLoads = array_merge(
|
||||
$this->morphableEagerLoads, $with
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replay stored macro calls on the actual related instance.
|
||||
*
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Illuminate\Database\Eloquent;
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withTrashed()
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder onlyTrashed()
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withoutTrashed()
|
||||
* @method bool restore()
|
||||
*/
|
||||
trait SoftDeletes
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user