[Web] Update libs
parent
e6d5516c7f
commit
8779a1a873
|
@ -144,16 +144,16 @@
|
|||
},
|
||||
{
|
||||
"name": "directorytree/ldaprecord",
|
||||
"version": "v2.4.4",
|
||||
"version": "v2.4.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DirectoryTree/LdapRecord.git",
|
||||
"reference": "2d1c4d71dd900b2f8245a6e32f67274795fac8a2"
|
||||
"reference": "824a49feae4da52a522b3ec60ecad508b8f4ed23"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/2d1c4d71dd900b2f8245a6e32f67274795fac8a2",
|
||||
"reference": "2d1c4d71dd900b2f8245a6e32f67274795fac8a2",
|
||||
"url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/824a49feae4da52a522b3ec60ecad508b8f4ed23",
|
||||
"reference": "824a49feae4da52a522b3ec60ecad508b8f4ed23",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -167,6 +167,7 @@
|
|||
"tightenco/collect": "^5.6|^6.0|^7.0|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
|
@ -212,20 +213,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-01T17:48:47+00:00"
|
||||
"time": "2021-05-11T13:29:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/contracts",
|
||||
"version": "v8.40.0",
|
||||
"version": "v8.42.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/contracts.git",
|
||||
"reference": "5152041a5c4ac4dbebb3c8ee72d05666c592ae08"
|
||||
"reference": "68036b4fb17ad40a599323bda3f2c0845c8100d8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/5152041a5c4ac4dbebb3c8ee72d05666c592ae08",
|
||||
"reference": "5152041a5c4ac4dbebb3c8ee72d05666c592ae08",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/68036b4fb17ad40a599323bda3f2c0845c8100d8",
|
||||
"reference": "68036b4fb17ad40a599323bda3f2c0845c8100d8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -260,7 +261,7 @@
|
|||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-04-23T13:31:10+00:00"
|
||||
"time": "2021-05-18T12:49:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
|
@ -445,16 +446,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.47.0",
|
||||
"version": "2.48.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "606262fd8888b75317ba9461825a24fc34001e1e"
|
||||
"reference": "d3c447f21072766cddec3522f9468a5849a76147"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/606262fd8888b75317ba9461825a24fc34001e1e",
|
||||
"reference": "606262fd8888b75317ba9461825a24fc34001e1e",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3c447f21072766cddec3522f9468a5849a76147",
|
||||
"reference": "d3c447f21072766cddec3522f9468a5849a76147",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -534,7 +535,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-04-13T21:54:02+00:00"
|
||||
"time": "2021-05-07T10:08:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
|
@ -1187,16 +1188,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v5.2.7",
|
||||
"version": "v5.2.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "e37ece5242564bceea54d709eafc948377ec9749"
|
||||
"reference": "61af68dba333e2d376a325a29c2a3f2a605b4876"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/e37ece5242564bceea54d709eafc948377ec9749",
|
||||
"reference": "e37ece5242564bceea54d709eafc948377ec9749",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/61af68dba333e2d376a325a29c2a3f2a605b4876",
|
||||
"reference": "61af68dba333e2d376a325a29c2a3f2a605b4876",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1260,7 +1261,7 @@
|
|||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v5.2.7"
|
||||
"source": "https://github.com/symfony/translation/tree/v5.2.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1276,7 +1277,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-04-01T08:15:21+00:00"
|
||||
"time": "2021-05-16T13:07:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
|
@ -1358,16 +1359,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v5.2.7",
|
||||
"version": "v5.2.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "27cb9f7cfa3853c736425c7233a8f68814b19636"
|
||||
"reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/27cb9f7cfa3853c736425c7233a8f68814b19636",
|
||||
"reference": "27cb9f7cfa3853c736425c7233a8f68814b19636",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/d693200a73fae179d27f8f1b16b4faf3e8569eba",
|
||||
"reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1426,7 +1427,7 @@
|
|||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v5.2.7"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v5.2.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1442,7 +1443,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-04-19T14:07:32+00:00"
|
||||
"time": "2021-05-07T13:42:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tightenco/collect",
|
||||
|
|
|
@ -20,6 +20,8 @@ use Composer\Semver\VersionParser;
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
class InstalledVersions
|
||||
{
|
||||
private static $installed = array (
|
||||
|
@ -64,12 +66,12 @@ private static $installed = array (
|
|||
),
|
||||
'directorytree/ldaprecord' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.4.4',
|
||||
'version' => '2.4.4.0',
|
||||
'pretty_version' => 'v2.4.6',
|
||||
'version' => '2.4.6.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '2d1c4d71dd900b2f8245a6e32f67274795fac8a2',
|
||||
'reference' => '824a49feae4da52a522b3ec60ecad508b8f4ed23',
|
||||
),
|
||||
'exorus/php-mime-mail-parser' =>
|
||||
array (
|
||||
|
@ -80,12 +82,12 @@ private static $installed = array (
|
|||
),
|
||||
'illuminate/contracts' =>
|
||||
array (
|
||||
'pretty_version' => 'v8.40.0',
|
||||
'version' => '8.40.0.0',
|
||||
'pretty_version' => 'v8.42.1',
|
||||
'version' => '8.42.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5152041a5c4ac4dbebb3c8ee72d05666c592ae08',
|
||||
'reference' => '68036b4fb17ad40a599323bda3f2c0845c8100d8',
|
||||
),
|
||||
'matthiasmullie/minify' =>
|
||||
array (
|
||||
|
@ -123,12 +125,12 @@ private static $installed = array (
|
|||
),
|
||||
'nesbot/carbon' =>
|
||||
array (
|
||||
'pretty_version' => '2.47.0',
|
||||
'version' => '2.47.0.0',
|
||||
'pretty_version' => '2.48.0',
|
||||
'version' => '2.48.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '606262fd8888b75317ba9461825a24fc34001e1e',
|
||||
'reference' => 'd3c447f21072766cddec3522f9468a5849a76147',
|
||||
),
|
||||
'paragonie/random_compat' =>
|
||||
array (
|
||||
|
@ -222,12 +224,12 @@ private static $installed = array (
|
|||
),
|
||||
'symfony/translation' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.2.7',
|
||||
'version' => '5.2.7.0',
|
||||
'pretty_version' => 'v5.2.9',
|
||||
'version' => '5.2.9.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'e37ece5242564bceea54d709eafc948377ec9749',
|
||||
'reference' => '61af68dba333e2d376a325a29c2a3f2a605b4876',
|
||||
),
|
||||
'symfony/translation-contracts' =>
|
||||
array (
|
||||
|
@ -247,12 +249,12 @@ private static $installed = array (
|
|||
),
|
||||
'symfony/var-dumper' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.2.7',
|
||||
'version' => '5.2.7.0',
|
||||
'pretty_version' => 'v5.2.8',
|
||||
'version' => '5.2.8.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '27cb9f7cfa3853c736425c7233a8f68814b19636',
|
||||
'reference' => 'd693200a73fae179d27f8f1b16b4faf3e8569eba',
|
||||
),
|
||||
'tightenco/collect' =>
|
||||
array (
|
||||
|
@ -290,7 +292,6 @@ foreach (self::getInstalled() as $installed) {
|
|||
$packages[] = array_keys($installed['versions']);
|
||||
}
|
||||
|
||||
|
||||
if (1 === \count($packages)) {
|
||||
return $packages[0];
|
||||
}
|
||||
|
@ -486,6 +487,7 @@ self::$installedByVendor = array();
|
|||
|
||||
|
||||
|
||||
|
||||
private static function getInstalled()
|
||||
{
|
||||
if (null === self::$canGetVendors) {
|
||||
|
|
|
@ -140,17 +140,17 @@
|
|||
},
|
||||
{
|
||||
"name": "directorytree/ldaprecord",
|
||||
"version": "v2.4.4",
|
||||
"version_normalized": "2.4.4.0",
|
||||
"version": "v2.4.6",
|
||||
"version_normalized": "2.4.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DirectoryTree/LdapRecord.git",
|
||||
"reference": "2d1c4d71dd900b2f8245a6e32f67274795fac8a2"
|
||||
"reference": "824a49feae4da52a522b3ec60ecad508b8f4ed23"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/2d1c4d71dd900b2f8245a6e32f67274795fac8a2",
|
||||
"reference": "2d1c4d71dd900b2f8245a6e32f67274795fac8a2",
|
||||
"url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/824a49feae4da52a522b3ec60ecad508b8f4ed23",
|
||||
"reference": "824a49feae4da52a522b3ec60ecad508b8f4ed23",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -164,10 +164,11 @@
|
|||
"tightenco/collect": "^5.6|^6.0|^7.0|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
"time": "2021-05-01T17:48:47+00:00",
|
||||
"time": "2021-05-11T13:29:46+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -215,17 +216,17 @@
|
|||
},
|
||||
{
|
||||
"name": "illuminate/contracts",
|
||||
"version": "v8.40.0",
|
||||
"version_normalized": "8.40.0.0",
|
||||
"version": "v8.42.1",
|
||||
"version_normalized": "8.42.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/contracts.git",
|
||||
"reference": "5152041a5c4ac4dbebb3c8ee72d05666c592ae08"
|
||||
"reference": "68036b4fb17ad40a599323bda3f2c0845c8100d8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/5152041a5c4ac4dbebb3c8ee72d05666c592ae08",
|
||||
"reference": "5152041a5c4ac4dbebb3c8ee72d05666c592ae08",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/68036b4fb17ad40a599323bda3f2c0845c8100d8",
|
||||
"reference": "68036b4fb17ad40a599323bda3f2c0845c8100d8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -233,7 +234,7 @@
|
|||
"psr/container": "^1.0",
|
||||
"psr/simple-cache": "^1.0"
|
||||
},
|
||||
"time": "2021-04-23T13:31:10+00:00",
|
||||
"time": "2021-05-18T12:49:19+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -452,17 +453,17 @@
|
|||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.47.0",
|
||||
"version_normalized": "2.47.0.0",
|
||||
"version": "2.48.0",
|
||||
"version_normalized": "2.48.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "606262fd8888b75317ba9461825a24fc34001e1e"
|
||||
"reference": "d3c447f21072766cddec3522f9468a5849a76147"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/606262fd8888b75317ba9461825a24fc34001e1e",
|
||||
"reference": "606262fd8888b75317ba9461825a24fc34001e1e",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3c447f21072766cddec3522f9468a5849a76147",
|
||||
"reference": "d3c447f21072766cddec3522f9468a5849a76147",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -481,7 +482,7 @@
|
|||
"phpunit/phpunit": "^7.5.20 || ^8.5.14",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
},
|
||||
"time": "2021-04-13T21:54:02+00:00",
|
||||
"time": "2021-05-07T10:08:30+00:00",
|
||||
"bin": [
|
||||
"bin/carbon"
|
||||
],
|
||||
|
@ -1218,17 +1219,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v5.2.7",
|
||||
"version_normalized": "5.2.7.0",
|
||||
"version": "v5.2.9",
|
||||
"version_normalized": "5.2.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "e37ece5242564bceea54d709eafc948377ec9749"
|
||||
"reference": "61af68dba333e2d376a325a29c2a3f2a605b4876"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/e37ece5242564bceea54d709eafc948377ec9749",
|
||||
"reference": "e37ece5242564bceea54d709eafc948377ec9749",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/61af68dba333e2d376a325a29c2a3f2a605b4876",
|
||||
"reference": "61af68dba333e2d376a325a29c2a3f2a605b4876",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1263,7 +1264,7 @@
|
|||
"symfony/config": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"time": "2021-04-01T08:15:21+00:00",
|
||||
"time": "2021-05-16T13:07:46+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -1294,7 +1295,7 @@
|
|||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v5.2.7"
|
||||
"source": "https://github.com/symfony/translation/tree/v5.2.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1395,17 +1396,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v5.2.7",
|
||||
"version_normalized": "5.2.7.0",
|
||||
"version": "v5.2.8",
|
||||
"version_normalized": "5.2.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "27cb9f7cfa3853c736425c7233a8f68814b19636"
|
||||
"reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/27cb9f7cfa3853c736425c7233a8f68814b19636",
|
||||
"reference": "27cb9f7cfa3853c736425c7233a8f68814b19636",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/d693200a73fae179d27f8f1b16b4faf3e8569eba",
|
||||
"reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1428,7 +1429,7 @@
|
|||
"ext-intl": "To show region name in time zone dump",
|
||||
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
|
||||
},
|
||||
"time": "2021-04-19T14:07:32+00:00",
|
||||
"time": "2021-05-07T13:42:21+00:00",
|
||||
"bin": [
|
||||
"Resources/bin/var-dump-server"
|
||||
],
|
||||
|
@ -1466,7 +1467,7 @@
|
|||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v5.2.7"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v5.2.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
),
|
||||
'directorytree/ldaprecord' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.4.4',
|
||||
'version' => '2.4.4.0',
|
||||
'pretty_version' => 'v2.4.6',
|
||||
'version' => '2.4.6.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '2d1c4d71dd900b2f8245a6e32f67274795fac8a2',
|
||||
'reference' => '824a49feae4da52a522b3ec60ecad508b8f4ed23',
|
||||
),
|
||||
'exorus/php-mime-mail-parser' =>
|
||||
array (
|
||||
|
@ -56,12 +56,12 @@
|
|||
),
|
||||
'illuminate/contracts' =>
|
||||
array (
|
||||
'pretty_version' => 'v8.40.0',
|
||||
'version' => '8.40.0.0',
|
||||
'pretty_version' => 'v8.42.1',
|
||||
'version' => '8.42.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5152041a5c4ac4dbebb3c8ee72d05666c592ae08',
|
||||
'reference' => '68036b4fb17ad40a599323bda3f2c0845c8100d8',
|
||||
),
|
||||
'matthiasmullie/minify' =>
|
||||
array (
|
||||
|
@ -99,12 +99,12 @@
|
|||
),
|
||||
'nesbot/carbon' =>
|
||||
array (
|
||||
'pretty_version' => '2.47.0',
|
||||
'version' => '2.47.0.0',
|
||||
'pretty_version' => '2.48.0',
|
||||
'version' => '2.48.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '606262fd8888b75317ba9461825a24fc34001e1e',
|
||||
'reference' => 'd3c447f21072766cddec3522f9468a5849a76147',
|
||||
),
|
||||
'paragonie/random_compat' =>
|
||||
array (
|
||||
|
@ -198,12 +198,12 @@
|
|||
),
|
||||
'symfony/translation' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.2.7',
|
||||
'version' => '5.2.7.0',
|
||||
'pretty_version' => 'v5.2.9',
|
||||
'version' => '5.2.9.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'e37ece5242564bceea54d709eafc948377ec9749',
|
||||
'reference' => '61af68dba333e2d376a325a29c2a3f2a605b4876',
|
||||
),
|
||||
'symfony/translation-contracts' =>
|
||||
array (
|
||||
|
@ -223,12 +223,12 @@
|
|||
),
|
||||
'symfony/var-dumper' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.2.7',
|
||||
'version' => '5.2.7.0',
|
||||
'pretty_version' => 'v5.2.8',
|
||||
'version' => '5.2.8.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '27cb9f7cfa3853c736425c7233a8f68814b19636',
|
||||
'reference' => 'd693200a73fae179d27f8f1b16b4faf3e8569eba',
|
||||
),
|
||||
'tightenco/collect' =>
|
||||
array (
|
||||
|
|
|
@ -10,17 +10,24 @@ jobs:
|
|||
php-cs-fixer:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Fix style
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v1
|
||||
with:
|
||||
args: --config=.php_cs --allow-risky=yes
|
||||
php-version: '7.4'
|
||||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
|
||||
|
||||
- name: Commit changes
|
||||
- name: Install Dependencies
|
||||
run: composer install --prefer-dist
|
||||
|
||||
- name: Fix Style
|
||||
run: ./vendor/bin/php-cs-fixer fix --diff --allow-risky=yes
|
||||
|
||||
- name: Commit Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: Fix styling changes
|
|
@ -2,3 +2,4 @@ vendor
|
|||
composer.lock
|
||||
.php_cs.cache
|
||||
.phpunit.result.cache
|
||||
.php-cs-fixer.cache
|
|
@ -1,35 +1,36 @@
|
|||
<?php
|
||||
|
||||
$finder = Symfony\Component\Finder\Finder::create()
|
||||
$finder = (new Symfony\Component\Finder\Finder)
|
||||
->in([
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/tests',
|
||||
__DIR__.'/src',
|
||||
__DIR__.'/tests',
|
||||
])
|
||||
->name('*.php')
|
||||
->ignoreVCS(true)
|
||||
->ignoreDotFiles(true);
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
return (new PhpCsFixer\Config)
|
||||
->setRules([
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'default' => 'single_space',
|
||||
'operators' => ['=>' => null]
|
||||
'operators' => ['=>' => null],
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_after_opening_tag' => true,
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => ['return']
|
||||
'statements' => ['return'],
|
||||
],
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'class_attributes_separation' => [
|
||||
'elements' => ['method']
|
||||
'elements' => ['method' => 'one'],
|
||||
],
|
||||
'class_definition' => true,
|
||||
'concat_space' => [
|
||||
'spacing' => 'none'
|
||||
'spacing' => 'none',
|
||||
],
|
||||
'constant_case' => true,
|
||||
'declare_equal_normalize' => true,
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
|
@ -37,6 +38,7 @@ return PhpCsFixer\Config::create()
|
|||
'fully_qualified_strict_types' => true,
|
||||
'function_declaration' => true,
|
||||
'function_typehint_space' => true,
|
||||
'general_phpdoc_tag_rename' => true,
|
||||
'heredoc_to_nowdoc' => true,
|
||||
'include' => true,
|
||||
'increment_style' => ['style' => 'post'],
|
||||
|
@ -44,7 +46,6 @@ return PhpCsFixer\Config::create()
|
|||
'linebreak_after_opening_tag' => true,
|
||||
'line_ending' => true,
|
||||
'lowercase_cast' => true,
|
||||
'lowercase_constants' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'lowercase_static_reference' => true,
|
||||
'magic_method_casing' => true,
|
||||
|
@ -58,7 +59,7 @@ return PhpCsFixer\Config::create()
|
|||
'throw',
|
||||
'use',
|
||||
'use_trait',
|
||||
]
|
||||
],
|
||||
],
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
|
@ -68,11 +69,11 @@ return PhpCsFixer\Config::create()
|
|||
'no_leading_import_slash' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_mixed_echo_print' => [
|
||||
'use' => 'echo'
|
||||
'use' => 'echo',
|
||||
],
|
||||
'no_multiline_whitespace_around_double_arrow' => true,
|
||||
'multiline_whitespace_before_semicolons' => [
|
||||
'strategy' => 'no_multi_line'
|
||||
'strategy' => 'no_multi_line',
|
||||
],
|
||||
'no_short_bool_cast' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
|
@ -92,10 +93,10 @@ return PhpCsFixer\Config::create()
|
|||
'normalize_index_brace' => true,
|
||||
'not_operator_with_successor_space' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
|
||||
'ordered_imports' => ['sort_algorithm' => 'alpha'],
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_inline_tag' => true,
|
||||
'phpdoc_inline_tag_normalizer' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_no_useless_inheritdoc' => true,
|
||||
|
@ -103,13 +104,14 @@ return PhpCsFixer\Config::create()
|
|||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_summary' => true,
|
||||
'phpdoc_to_comment' => true,
|
||||
'phpdoc_tag_type' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_types' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'php_unit_method_casing' => [
|
||||
'case' => 'snake_case',
|
||||
],
|
||||
'psr4' => true,
|
||||
'psr_autoloading' => true,
|
||||
'self_accessor' => true,
|
||||
'short_scalar_cast' => true,
|
||||
'simplified_null_return' => false,
|
||||
|
@ -119,7 +121,7 @@ return PhpCsFixer\Config::create()
|
|||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_line_comment_style' => [
|
||||
'comment_types' => ['hash']
|
||||
'comment_types' => ['hash'],
|
||||
],
|
||||
'single_quote' => true,
|
||||
'space_after_semicolon' => true,
|
||||
|
@ -127,11 +129,13 @@ return PhpCsFixer\Config::create()
|
|||
'switch_case_semicolon_to_colon' => true,
|
||||
'switch_case_space' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'trailing_comma_in_multiline_array' => true,
|
||||
'trailing_comma_in_multiline' => [
|
||||
'elements' => ['arrays'],
|
||||
],
|
||||
'trim_array_spaces' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'visibility_required' => [
|
||||
'elements' => ['method', 'property']
|
||||
'elements' => ['method', 'property'],
|
||||
],
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
])->setFinder($finder);
|
||||
])->setFinder($finder);
|
|
@ -40,7 +40,8 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.0",
|
||||
"mockery/mockery": "^1.0"
|
||||
"mockery/mockery": "^1.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.0"
|
||||
},
|
||||
"archive": {
|
||||
"exclude": ["/tests"]
|
||||
|
|
|
@ -7,7 +7,7 @@ use LdapRecord\Configuration\ConfigurationException;
|
|||
class ArrayValidator extends Validator
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ use LdapRecord\Configuration\ConfigurationException;
|
|||
class BooleanValidator extends Validator
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ use LdapRecord\Configuration\ConfigurationException;
|
|||
class IntegerValidator extends Validator
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ use LdapRecord\Configuration\ConfigurationException;
|
|||
class StringOrNullValidator extends Validator
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
|
|
@ -4,7 +4,6 @@ namespace LdapRecord;
|
|||
|
||||
use Carbon\Carbon;
|
||||
use Closure;
|
||||
use Exception;
|
||||
use LdapRecord\Auth\Guard;
|
||||
use LdapRecord\Configuration\DomainConfiguration;
|
||||
use LdapRecord\Events\DispatcherInterface;
|
||||
|
@ -138,8 +137,6 @@ class Connection
|
|||
{
|
||||
$this->ldap = $ldap;
|
||||
|
||||
$this->initialize();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -404,6 +401,10 @@ class Connection
|
|||
*/
|
||||
public function auth()
|
||||
{
|
||||
if (! $this->ldap->isConnected()) {
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
$guard = call_user_func($this->authGuardResolver);
|
||||
|
||||
$guard->setDispatcher(
|
||||
|
|
|
@ -41,7 +41,7 @@ class Dispatcher implements DispatcherInterface
|
|||
protected $wildcardsCache = [];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function listen($events, $listener)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ class Dispatcher implements DispatcherInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function hasListeners($eventName)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ class Dispatcher implements DispatcherInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function until($event, $payload = [])
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ class Dispatcher implements DispatcherInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function fire($event, $payload = [], $halt = false)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ class Dispatcher implements DispatcherInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function dispatch($event, $payload = [], $halt = false)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ class Dispatcher implements DispatcherInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getListeners($eventName)
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ class Dispatcher implements DispatcherInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function forget($event)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace LdapRecord;
|
|||
class Ldap extends LdapBase
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getEntries($searchResults)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getLastError()
|
||||
{
|
||||
|
@ -109,17 +109,17 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getDetailedError()
|
||||
{
|
||||
// If the returned error number is zero, the last LDAP operation
|
||||
// succeeded. In such case we won't return a detailed error.
|
||||
if ($number = $this->errNo()) {
|
||||
$this->getOption(LDAP_OPT_DIAGNOSTIC_MESSAGE, $message);
|
||||
|
||||
return new DetailedError($number, $this->err2Str($number), $message);
|
||||
if (! $number = $this->errNo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->getOption(LDAP_OPT_DIAGNOSTIC_MESSAGE, $message);
|
||||
|
||||
return new DetailedError($number, $this->err2Str($number), $message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -140,7 +140,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function setOption($option, $value)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getOption($option, &$value = null)
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function startTLS()
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function connect($hosts = [], $port = 389)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
|
@ -210,12 +210,19 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = [])
|
||||
{
|
||||
return $this->executeFailableOperation(function () use (
|
||||
$dn, $filter, $fields, $onlyAttributes, $size, $time, $deref, $serverControls
|
||||
$dn,
|
||||
$filter,
|
||||
$fields,
|
||||
$onlyAttributes,
|
||||
$size,
|
||||
$time,
|
||||
$deref,
|
||||
$serverControls
|
||||
) {
|
||||
return $this->supportsServerControlsInMethods() && ! empty($serverControls)
|
||||
? ldap_search($this->connection, $dn, $filter, $fields, $onlyAttributes, $size, $time, $deref, $serverControls)
|
||||
|
@ -224,12 +231,19 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = [])
|
||||
{
|
||||
return $this->executeFailableOperation(function () use (
|
||||
$dn, $filter, $fields, $onlyAttributes, $size, $time, $deref, $serverControls
|
||||
$dn,
|
||||
$filter,
|
||||
$fields,
|
||||
$onlyAttributes,
|
||||
$size,
|
||||
$time,
|
||||
$deref,
|
||||
$serverControls
|
||||
) {
|
||||
return $this->supportsServerControlsInMethods() && ! empty($serverControls)
|
||||
? ldap_list($this->connection, $dn, $filter, $fields, $onlyAttributes, $size, $time, $deref, $serverControls)
|
||||
|
@ -238,12 +252,19 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = [])
|
||||
{
|
||||
return $this->executeFailableOperation(function () use (
|
||||
$dn, $filter, $fields, $onlyAttributes, $size, $time, $deref, $serverControls
|
||||
$dn,
|
||||
$filter,
|
||||
$fields,
|
||||
$onlyAttributes,
|
||||
$size,
|
||||
$time,
|
||||
$deref,
|
||||
$serverControls
|
||||
) {
|
||||
return $this->supportsServerControlsInMethods() && ! empty($serverControls)
|
||||
? ldap_read($this->connection, $dn, $filter, $fields, $onlyAttributes, $size, $time, $deref, $serverControls)
|
||||
|
@ -252,12 +273,17 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parseResult($result, &$errorCode, &$dn, &$errorMessage, &$referrals, &$serverControls = [])
|
||||
{
|
||||
return $this->executeFailableOperation(function () use (
|
||||
$result, &$errorCode, &$dn, &$errorMessage, &$referrals, &$serverControls
|
||||
$result,
|
||||
&$errorCode,
|
||||
&$dn,
|
||||
&$errorMessage,
|
||||
&$referrals,
|
||||
&$serverControls
|
||||
) {
|
||||
return $this->supportsServerControlsInMethods() && ! empty($serverControls)
|
||||
? ldap_parse_result($this->connection, $result, $errorCode, $dn, $errorMessage, $referrals, $serverControls)
|
||||
|
@ -266,7 +292,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function bind($username, $password)
|
||||
{
|
||||
|
@ -276,7 +302,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function add($dn, array $entry)
|
||||
{
|
||||
|
@ -286,7 +312,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function delete($dn)
|
||||
{
|
||||
|
@ -296,19 +322,22 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rename($dn, $newRdn, $newParent, $deleteOldRdn = false)
|
||||
{
|
||||
return $this->executeFailableOperation(function () use (
|
||||
$dn, $newRdn, $newParent, $deleteOldRdn
|
||||
$dn,
|
||||
$newRdn,
|
||||
$newParent,
|
||||
$deleteOldRdn
|
||||
) {
|
||||
return ldap_rename($this->connection, $dn, $newRdn, $newParent, $deleteOldRdn);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modify($dn, array $entry)
|
||||
{
|
||||
|
@ -318,7 +347,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modifyBatch($dn, array $values)
|
||||
{
|
||||
|
@ -328,7 +357,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modAdd($dn, array $entry)
|
||||
{
|
||||
|
@ -338,7 +367,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modReplace($dn, array $entry)
|
||||
{
|
||||
|
@ -348,7 +377,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modDelete($dn, array $entry)
|
||||
{
|
||||
|
@ -358,7 +387,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function controlPagedResult($pageSize = 1000, $isCritical = false, $cookie = '')
|
||||
{
|
||||
|
@ -368,7 +397,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function controlPagedResultResponse($result, &$cookie, &$estimated = null)
|
||||
{
|
||||
|
@ -378,7 +407,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function freeResult($result)
|
||||
{
|
||||
|
@ -386,7 +415,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function errNo()
|
||||
{
|
||||
|
@ -396,7 +425,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function err2Str($number)
|
||||
{
|
||||
|
@ -440,7 +469,7 @@ class Ldap extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getDiagnosticMessage()
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ abstract class LdapBase implements LdapInterface
|
|||
protected $useTLS = false;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isUsingSSL()
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isUsingTLS()
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isBound()
|
||||
{
|
||||
|
@ -70,7 +70,15 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isConnected()
|
||||
{
|
||||
return ! is_null($this->connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function canChangePasswords()
|
||||
{
|
||||
|
@ -78,7 +86,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function ssl($enabled = true)
|
||||
{
|
||||
|
@ -88,7 +96,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function tls($enabled = true)
|
||||
{
|
||||
|
@ -98,7 +106,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function setOptions(array $options = [])
|
||||
{
|
||||
|
@ -108,7 +116,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getHost()
|
||||
{
|
||||
|
@ -116,7 +124,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
|
@ -124,7 +132,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getProtocol()
|
||||
{
|
||||
|
@ -132,7 +140,7 @@ abstract class LdapBase implements LdapInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getExtendedError()
|
||||
{
|
||||
|
|
|
@ -103,6 +103,13 @@ interface LdapInterface
|
|||
*/
|
||||
public function isBound();
|
||||
|
||||
/**
|
||||
* Determine if the connection has been created.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isConnected();
|
||||
|
||||
/**
|
||||
* Determine the connection is able to modify passwords.
|
||||
*
|
||||
|
|
|
@ -32,7 +32,7 @@ class Entry extends BaseEntry implements ActiveDirectory
|
|||
protected $sidKey = 'objectsid';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getObjectSidKey()
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ class Entry extends BaseEntry implements ActiveDirectory
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getObjectSid()
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ class Entry extends BaseEntry implements ActiveDirectory
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getConvertedSid()
|
||||
{
|
||||
|
|
|
@ -5,12 +5,12 @@ namespace LdapRecord\Models\ActiveDirectory;
|
|||
class ExchangeDatabase extends Entry
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static $objectClasses = ['msExchMDB'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
|
|
|
@ -5,12 +5,12 @@ namespace LdapRecord\Models\ActiveDirectory;
|
|||
class ExchangeServer extends Entry
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static $objectClasses = ['msExchExchangeServer'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ class User extends Entry implements Authenticatable
|
|||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
|
|
|
@ -144,7 +144,8 @@ class AccountControl
|
|||
// of possible flags. This will allow us to see if
|
||||
// our AccountControl object contains any of them.
|
||||
$flagsUsed = array_intersect(
|
||||
$this->extractFlags($flag), $this->values
|
||||
$this->extractFlags($flag),
|
||||
$this->values
|
||||
);
|
||||
|
||||
return in_array($flag, $flagsUsed);
|
||||
|
|
|
@ -160,7 +160,8 @@ class Timestamp
|
|||
protected function convertLdapTimeToDateTime($value)
|
||||
{
|
||||
return DateTime::createFromFormat(
|
||||
strpos($value, 'Z') !== false ? 'YmdHis\Z' : 'YmdHisT', $value
|
||||
strpos($value, 'Z') !== false ? 'YmdHis\Z' : 'YmdHisT',
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -188,7 +189,8 @@ class Timestamp
|
|||
protected function convertWindowsTimeToDateTime($value)
|
||||
{
|
||||
return DateTime::createFromFormat(
|
||||
strpos($value, '0Z') !== false ? 'YmdHis.0\Z' : 'YmdHis.0T', $value
|
||||
strpos($value, '0Z') !== false ? 'YmdHis.0\Z' : 'YmdHis.0T',
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -215,16 +215,18 @@ trait HasPassword
|
|||
*/
|
||||
public function determinePasswordHashMethod()
|
||||
{
|
||||
if (! ($password = $this->password)) {
|
||||
if (! $password = $this->password) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! ($method = Password::getHashMethod($password))) {
|
||||
if (! $method = Password::getHashMethod($password)) {
|
||||
return;
|
||||
}
|
||||
|
||||
[,$algo] = array_pad(
|
||||
Password::getHashMethodAndAlgo($password) ?? [], $length = 2, $value = null
|
||||
Password::getHashMethodAndAlgo($password) ?? [],
|
||||
$length = 2,
|
||||
$value = null
|
||||
);
|
||||
|
||||
switch ($algo) {
|
||||
|
|
|
@ -29,7 +29,7 @@ class Entry extends BaseEntry implements FreeIPA
|
|||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ class Entry extends BaseEntry implements OpenLDAP
|
|||
protected $guidKey = 'entryuuid';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
|
|
|
@ -159,7 +159,9 @@ class HasMany extends OneToMany
|
|||
public function attach($model)
|
||||
{
|
||||
return $this->attemptFailableOperation(
|
||||
$this->buildAttachCallback($model), $this->bypass['attach'], $model
|
||||
$this->buildAttachCallback($model),
|
||||
$this->bypass['attach'],
|
||||
$model
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -213,7 +215,9 @@ class HasMany extends OneToMany
|
|||
public function detach($model)
|
||||
{
|
||||
return $this->attemptFailableOperation(
|
||||
$this->buildDetachCallback($model), $this->bypass['detach'], $model
|
||||
$this->buildDetachCallback($model),
|
||||
$this->bypass['detach'],
|
||||
$model
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -275,7 +279,8 @@ class HasMany extends OneToMany
|
|||
}
|
||||
|
||||
throw ModelNotFoundException::forQuery(
|
||||
$this->query->getUnescapedQuery(), $this->query->getDn()
|
||||
$this->query->getUnescapedQuery(),
|
||||
$this->query->getDn()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ use LdapRecord\Query\Model\Builder;
|
|||
|
||||
/**
|
||||
* @method bool exists($models = null) Determine if the relation contains all of the given models, or any models
|
||||
* @method bool contains($models) Determine if any of the given models are contained in the relation
|
||||
* @method bool contains($models) Determine if any of the given models are contained in the relation
|
||||
*/
|
||||
abstract class Relation
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
protected $storage = [];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get($key, $default = null)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function set($key, $value, $ttl = null)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function delete($key)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getMultiple($keys, $default = null)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function setMultiple($values, $ttl = null)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function deleteMultiple($keys)
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ class ArrayCacheStore implements CacheInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
|
|
|
@ -382,7 +382,9 @@ class Builder
|
|||
protected function substituteBaseInDn($dn)
|
||||
{
|
||||
return str_replace(
|
||||
'{base}', $this->baseDn, $dn instanceof Model ? $dn->getDn() : $dn
|
||||
'{base}',
|
||||
$this->baseDn,
|
||||
$dn instanceof Model ? $dn->getDn() : $dn
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use Tightenco\Collect\Support\Collection as BaseCollection;
|
|||
class Collection extends BaseCollection
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function valueRetriever($value)
|
||||
{
|
||||
|
|
|
@ -287,7 +287,7 @@ class Builder extends BaseBuilder
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getQuery()
|
||||
{
|
||||
|
@ -424,7 +424,7 @@ class Builder extends BaseBuilder
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function prepareWhereValue($field, $value, $raw = false)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ class DeprecatedPaginator extends AbstractPaginator
|
|||
protected $cookie = '';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function fetchCookie()
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ class DeprecatedPaginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function prepareServerControls()
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ class DeprecatedPaginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function applyServerControls(LdapInterface $ldap)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ class DeprecatedPaginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function updateServerControls(LdapInterface $ldap, $resource)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ class DeprecatedPaginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function resetServerControls(LdapInterface $ldap)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ use LdapRecord\LdapInterface;
|
|||
class Paginator extends AbstractPaginator
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function fetchCookie()
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ class Paginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function prepareServerControls()
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ class Paginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function applyServerControls(LdapInterface $ldap)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ class Paginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function updateServerControls(LdapInterface $ldap, $resource)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ class Paginator extends AbstractPaginator
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function resetServerControls(LdapInterface $ldap)
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@ class ConnectionFake extends Connection
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isConnected()
|
||||
{
|
||||
|
|
|
@ -193,7 +193,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getDiagnosticMessage()
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getEntries($searchResults)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isUsingSSL()
|
||||
{
|
||||
|
@ -233,7 +233,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isUsingTLS()
|
||||
{
|
||||
|
@ -243,7 +243,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function isBound()
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function setOption($option, $value)
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getOption($option, &$value = null)
|
||||
{
|
||||
|
@ -271,7 +271,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function startTLS()
|
||||
{
|
||||
|
@ -279,7 +279,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function connect($hosts = [], $port = 389)
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
|
@ -307,7 +307,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function bind($username, $password)
|
||||
{
|
||||
|
@ -315,7 +315,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = [])
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = [])
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = [])
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parseResult($result, &$errorCode, &$dn, &$errorMessage, &$referrals, &$serverControls = [])
|
||||
{
|
||||
|
@ -347,7 +347,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function add($dn, array $entry)
|
||||
{
|
||||
|
@ -355,7 +355,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function delete($dn)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rename($dn, $newRdn, $newParent, $deleteOldRdn = false)
|
||||
{
|
||||
|
@ -371,7 +371,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modify($dn, array $entry)
|
||||
{
|
||||
|
@ -379,7 +379,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modifyBatch($dn, array $values)
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modAdd($dn, array $entry)
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modReplace($dn, array $entry)
|
||||
{
|
||||
|
@ -403,7 +403,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modDelete($dn, array $entry)
|
||||
{
|
||||
|
@ -411,7 +411,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function controlPagedResult($pageSize = 1000, $isCritical = false, $cookie = '')
|
||||
{
|
||||
|
@ -419,7 +419,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function controlPagedResultResponse($result, &$cookie)
|
||||
{
|
||||
|
@ -427,7 +427,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function freeResult($result)
|
||||
{
|
||||
|
@ -435,7 +435,7 @@ class LdapFake extends LdapBase
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function err2Str($number)
|
||||
{
|
||||
|
@ -506,11 +506,14 @@ class LdapFake extends LdapBase
|
|||
$argNumber = $key + 1;
|
||||
|
||||
PHPUnit::assertArrayHasKey(
|
||||
$key, $methodArgs, "LDAP method [$method] argument #{$argNumber} does not exist."
|
||||
$key,
|
||||
$methodArgs,
|
||||
"LDAP method [$method] argument #{$argNumber} does not exist."
|
||||
);
|
||||
|
||||
$constraint->evaluate(
|
||||
$methodArgs[$key], "LDAP method [$method] expectation failed."
|
||||
$methodArgs[$key],
|
||||
"LDAP method [$method] expectation failed."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Database\Eloquent;
|
||||
|
||||
interface SupportsPartialRelations
|
||||
{
|
||||
/**
|
||||
* Indicate that the relation is a single result of a larger one-to-many relationship.
|
||||
*
|
||||
* @param \Closure|string|null $column
|
||||
* @param string|null $relation
|
||||
* @param string $relation
|
||||
* @return $this
|
||||
*/
|
||||
public function ofMany($column = 'id', $aggregate = 'MAX', $relation = null);
|
||||
|
||||
/**
|
||||
* Determine whether the relationship is a one-of-many relationship.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isOneOfMany();
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Pagination;
|
||||
|
||||
interface CursorPaginator
|
||||
{
|
||||
/**
|
||||
* Get the URL for a given cursor.
|
||||
*
|
||||
* @param \Illuminate\Pagination\Cursor|null $cursor
|
||||
* @return string
|
||||
*/
|
||||
public function url($cursor);
|
||||
|
||||
/**
|
||||
* Add a set of query string values to the paginator.
|
||||
*
|
||||
* @param array|string|null $key
|
||||
* @param string|null $value
|
||||
* @return $this
|
||||
*/
|
||||
public function appends($key, $value = null);
|
||||
|
||||
/**
|
||||
* Get / set the URL fragment to be appended to URLs.
|
||||
*
|
||||
* @param string|null $fragment
|
||||
* @return $this|string|null
|
||||
*/
|
||||
public function fragment($fragment = null);
|
||||
|
||||
/**
|
||||
* Get the URL for the previous page, or null.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function previousPageUrl();
|
||||
|
||||
/**
|
||||
* The URL for the next page, or null.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function nextPageUrl();
|
||||
|
||||
/**
|
||||
* Get all of the items being paginated.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function items();
|
||||
|
||||
/**
|
||||
* Get the "cursor" of the previous set of items.
|
||||
*
|
||||
* @return \Illuminate\Pagination\Cursor|null
|
||||
*/
|
||||
public function previousCursor();
|
||||
|
||||
/**
|
||||
* Get the "cursor" of the next set of items.
|
||||
*
|
||||
* @return \Illuminate\Pagination\Cursor|null
|
||||
*/
|
||||
public function nextCursor();
|
||||
|
||||
/**
|
||||
* Determine how many items are being shown per page.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function perPage();
|
||||
|
||||
/**
|
||||
* Get the current cursor being paginated.
|
||||
*
|
||||
* @return \Illuminate\Pagination\Cursor|null
|
||||
*/
|
||||
public function cursor();
|
||||
|
||||
/**
|
||||
* Determine if there are enough items to split into multiple pages.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPages();
|
||||
|
||||
/**
|
||||
* Get the base path for paginator generated URLs.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function path();
|
||||
|
||||
/**
|
||||
* Determine if the list of items is empty or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty();
|
||||
|
||||
/**
|
||||
* Determine if the list of items is not empty.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isNotEmpty();
|
||||
|
||||
/**
|
||||
* Render the paginator using a given view.
|
||||
*
|
||||
* @param string|null $view
|
||||
* @param array $data
|
||||
* @return string
|
||||
*/
|
||||
public function render($view = null, $data = []);
|
||||
}
|
|
@ -509,5 +509,64 @@ use DateTimeZone;
|
|||
*/
|
||||
class CarbonImmutable extends DateTimeImmutable implements CarbonInterface
|
||||
{
|
||||
use Date;
|
||||
use Date {
|
||||
__clone as dateTraitClone;
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
$this->dateTraitClone();
|
||||
$this->endOfTime = false;
|
||||
$this->startOfTime = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a very old date representing start of time.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function startOfTime(): self
|
||||
{
|
||||
$date = static::parse('0001-01-01')->years(self::getStartOfTimeYear());
|
||||
$date->startOfTime = true;
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a very far date representing end of time.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function endOfTime(): self
|
||||
{
|
||||
$date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear());
|
||||
$date->endOfTime = true;
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private static function getEndOfTimeYear(): int
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
|
||||
return 145261681241552;
|
||||
}
|
||||
|
||||
return PHP_INT_MAX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private static function getStartOfTimeYear(): int
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
|
||||
return -135908816449551;
|
||||
}
|
||||
|
||||
return max(PHP_INT_MIN, -9223372036854773760);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -668,8 +668,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
|||
* Please see the testing aids section (specifically static::setTestNow())
|
||||
* for more on the possibility of this constructor returning a test instance.
|
||||
*
|
||||
* @param string|null $time
|
||||
* @param DateTimeZone|string|null $tz
|
||||
* @param DateTimeInterface|string|null $time
|
||||
* @param DateTimeZone|string|null $tz
|
||||
*
|
||||
* @throws InvalidFormatException
|
||||
*/
|
||||
|
@ -2629,6 +2629,13 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
|||
*/
|
||||
public function isEndOfDay($checkMicroseconds = false);
|
||||
|
||||
/**
|
||||
* Returns true if the date was created using CarbonImmutable::endOfTime()
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEndOfTime(): bool;
|
||||
|
||||
/**
|
||||
* Determines if the instance is in the future, ie. greater (after) than now.
|
||||
*
|
||||
|
@ -2839,6 +2846,13 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
|||
*/
|
||||
public function isStartOfDay($checkMicroseconds = false);
|
||||
|
||||
/**
|
||||
* Returns true if the date was created using CarbonImmutable::startOfTime()
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isStartOfTime(): bool;
|
||||
|
||||
/**
|
||||
* Returns true if the strict mode is globally in use, false else.
|
||||
* (It can be overridden in specific instances.)
|
||||
|
|
|
@ -37,7 +37,7 @@ use RuntimeException;
|
|||
/**
|
||||
* Substitution of DatePeriod with some modifications and many more features.
|
||||
*
|
||||
* @property-read int $recurrences number of recurrences (if end not set).
|
||||
* @property-read int|float $recurrences number of recurrences (if end not set).
|
||||
* @property-read bool $include_start_date rather the start date is included in the iteration.
|
||||
* @property-read bool $include_end_date rather the end date is included in the iteration (if recurrences not set).
|
||||
* @property-read CarbonInterface $start Period start date.
|
||||
|
@ -212,6 +212,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
*/
|
||||
public const NEXT_MAX_ATTEMPTS = 1000;
|
||||
|
||||
/**
|
||||
* Number of maximum attempts before giving up on finding end date.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public const END_MAX_ATTEMPTS = 10000;
|
||||
|
||||
/**
|
||||
* The registered macros.
|
||||
*
|
||||
|
@ -981,7 +988,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
/**
|
||||
* Get number of recurrences.
|
||||
*
|
||||
* @return int|null
|
||||
* @return int|float|null
|
||||
*/
|
||||
public function getRecurrences()
|
||||
{
|
||||
|
@ -1205,9 +1212,9 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
/**
|
||||
* Add a recurrences filter (set maximum number of recurrences).
|
||||
*
|
||||
* @param int|null $recurrences
|
||||
* @param int|float|null $recurrences
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -1221,7 +1228,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
return $this->removeFilter(static::RECURRENCES_FILTER);
|
||||
}
|
||||
|
||||
$this->recurrences = (int) $recurrences;
|
||||
$this->recurrences = $recurrences === INF ? INF : (int) $recurrences;
|
||||
|
||||
if (!$this->hasFilter(static::RECURRENCES_FILTER)) {
|
||||
return $this->addFilter(static::RECURRENCES_FILTER);
|
||||
|
@ -1708,9 +1715,11 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
return $end;
|
||||
}
|
||||
|
||||
$dates = iterator_to_array($this);
|
||||
if ($this->dateInterval->isEmpty()) {
|
||||
return $this->getStartDate($rounding);
|
||||
}
|
||||
|
||||
$date = end($dates);
|
||||
$date = $this->getEndFromRecurrences() ?? $this->iterateUntilEnd();
|
||||
|
||||
if ($date && $rounding) {
|
||||
$date = $date->copy()->round($this->getDateInterval(), $rounding);
|
||||
|
@ -1719,6 +1728,56 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CarbonInterface|null
|
||||
*/
|
||||
private function getEndFromRecurrences()
|
||||
{
|
||||
if ($this->recurrences === null) {
|
||||
throw new UnreachableException(
|
||||
"Could not calculate period end without either explicit end or recurrences.\n".
|
||||
"If you're looking for a forever-period, use ->setRecurrences(INF)."
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->recurrences === INF) {
|
||||
$start = $this->getStartDate();
|
||||
|
||||
return $start < $start->copy()->add($this->getDateInterval())
|
||||
? CarbonImmutable::endOfTime()
|
||||
: CarbonImmutable::startOfTime();
|
||||
}
|
||||
|
||||
if ($this->filters === [[static::RECURRENCES_FILTER, null]]) {
|
||||
return $this->getStartDate()->copy()->add(
|
||||
$this->getDateInterval()->times(
|
||||
$this->recurrences - ($this->isStartExcluded() ? 0 : 1)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CarbonInterface|null
|
||||
*/
|
||||
private function iterateUntilEnd()
|
||||
{
|
||||
$attempts = 0;
|
||||
$date = null;
|
||||
|
||||
foreach ($this as $date) {
|
||||
if (++$attempts > static::END_MAX_ATTEMPTS) {
|
||||
throw new UnreachableException(
|
||||
'Could not calculate period end after iterating '.static::END_MAX_ATTEMPTS.' times.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current period overlaps the given one (if 1 parameter passed)
|
||||
* or the period between 2 dates (if 2 parameters passed).
|
||||
|
@ -1736,7 +1795,15 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
|||
$range = static::create($range);
|
||||
}
|
||||
|
||||
return $this->calculateEnd() > $range->getStartDate() && $range->calculateEnd() > $this->getStartDate();
|
||||
$thisDates = [$this->getStartDate(), $this->calculateEnd()];
|
||||
sort($thisDates);
|
||||
[$start, $end] = $thisDates;
|
||||
|
||||
$rangeDates = [$range->getStartDate(), $range->calculateEnd()];
|
||||
sort($rangeDates);
|
||||
[$rangeStart, $rangeEnd] = $rangeDates;
|
||||
|
||||
return $end > $rangeStart && $rangeEnd > $start;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,22 +31,23 @@
|
|||
* - João Magalhães
|
||||
* - Ingmar
|
||||
* - Illimar Tambek
|
||||
* - Mihkel
|
||||
*/
|
||||
return [
|
||||
'year' => ':count aasta|:count aastat',
|
||||
'y' => ':count aasta|:count aastat',
|
||||
'y' => ':count a',
|
||||
'month' => ':count kuu|:count kuud',
|
||||
'm' => ':count kuu|:count kuud',
|
||||
'm' => ':count k',
|
||||
'week' => ':count nädal|:count nädalat',
|
||||
'w' => ':count nädal|:count nädalat',
|
||||
'w' => ':count näd',
|
||||
'day' => ':count päev|:count päeva',
|
||||
'd' => ':count päev|:count päeva',
|
||||
'd' => ':count p',
|
||||
'hour' => ':count tund|:count tundi',
|
||||
'h' => ':count tund|:count tundi',
|
||||
'h' => ':count t',
|
||||
'minute' => ':count minut|:count minutit',
|
||||
'min' => ':count minut|:count minutit',
|
||||
'min' => ':count min',
|
||||
'second' => ':count sekund|:count sekundit',
|
||||
's' => ':count sekund|:count sekundit',
|
||||
's' => ':count s',
|
||||
'ago' => ':time tagasi',
|
||||
'from_now' => ':time pärast',
|
||||
'after' => ':time pärast',
|
||||
|
|
|
@ -31,6 +31,12 @@ use InvalidArgumentException;
|
|||
*/
|
||||
trait Comparison
|
||||
{
|
||||
/** @var bool */
|
||||
protected $endOfTime = false;
|
||||
|
||||
/** @var bool */
|
||||
protected $startOfTime = false;
|
||||
|
||||
/**
|
||||
* Determines if the instance is equal to another
|
||||
*
|
||||
|
@ -1040,4 +1046,24 @@ trait Comparison
|
|||
|
||||
return (bool) @preg_match('/^'.$regex.'$/', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the date was created using CarbonImmutable::startOfTime()
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isStartOfTime(): bool
|
||||
{
|
||||
return $this->startOfTime ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the date was created using CarbonImmutable::endOfTime()
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEndOfTime(): bool
|
||||
{
|
||||
return $this->endOfTime ?? false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ trait Options
|
|||
'I' => '(0|1)',
|
||||
'O' => '([+-](1[012]|0[0-9])[0134][05])',
|
||||
'P' => '([+-](1[012]|0[0-9]):[0134][05])',
|
||||
'p' => '(Z|[+-](1[012]|0[0-9]):[0134][05])',
|
||||
'T' => '([a-zA-Z]{1,5})',
|
||||
'Z' => '(-?[1-5]?[0-9]{1,4})',
|
||||
'U' => '([0-9]*)',
|
||||
|
|
|
@ -313,7 +313,7 @@ class Translator extends Translation\Translator
|
|||
*/
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$locale = preg_replace_callback('/[-_]([a-z]{2,})/', function ($matches) {
|
||||
$locale = preg_replace_callback('/[-_]([a-z]{2,}|[0-9]{2,})/', function ($matches) {
|
||||
// _2-letters or YUE is a region, _3+-letters is a variant
|
||||
$upper = strtoupper($matches[1]);
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ class XliffFileLoader implements LoaderInterface
|
|||
private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain)
|
||||
{
|
||||
$xml = simplexml_import_dom($dom);
|
||||
$encoding = strtoupper($dom->encoding);
|
||||
$encoding = $dom->encoding ? strtoupper($dom->encoding) : null;
|
||||
|
||||
$xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0');
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ EOF
|
|||
*/
|
||||
protected function assertValidLocale(string $locale)
|
||||
{
|
||||
if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
|
||||
if (null !== $locale && 1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
|
||||
throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,7 +166,6 @@ class VarCloner extends AbstractCloner
|
|||
break;
|
||||
|
||||
case \is_object($v):
|
||||
case $v instanceof \__PHP_Incomplete_Class:
|
||||
if (empty($objRefs[$h = spl_object_id($v)])) {
|
||||
$stub = new Stub();
|
||||
$stub->type = Stub::TYPE_OBJECT;
|
||||
|
|
Loading…
Reference in New Issue