Merge branch 'staging'

* staging:
  [WEB] Changed Version to footer margin top to 20px
  [Helper] Backup and restore: Use bullseye-slim
  [Web] Delete related spam aliases when deleting alias domain
  Revert "Before update on 2022-03-02_17_04_05"
  [Web] Footer fix (#4500)
  [Web] Update composer libs   - Removing symfony/deprecation-contracts (v2.4.0)   - Upgrading ddeboer/imap (1.12.1 => 1.13.1)   - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1)   - Upgrading illuminate/contracts (v8.53.1 => v9.3.0)   - Upgrading nesbot/carbon (2.51.1 => 2.57.0)   - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0)   - Upgrading psr/container (1.1.1 => 2.0.2)   - Upgrading psr/log (1.1.4 => 3.0.0)   - Upgrading psr/simple-cache (1.0.1 => 2.0.0)   - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1)   - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0)   - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0)   - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0)   - Upgrading symfony/translation (v5.3.4 => v6.0.5)   - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0)   - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5)   - Upgrading tightenco/collect (v8.34.0 => v8.83.2)   - Upgrading twig/twig (v3.3.2 => v3.3.8)
  Before update on 2022-03-02_17_04_05
  Fix issue forms
  [GH-Actions][stale] Update to v5.0.0
This commit is contained in:
DerLinkman 2022-03-17 22:06:10 +01:00
commit 880a68d563
945 changed files with 7657 additions and 14233 deletions

View File

@ -1,61 +0,0 @@
-- Thanks to https://raw.githubusercontent.com/fatalbanana
local lua_maps = require 'lua_maps'
local rspamd_regexp = require 'rspamd_regexp'
local rspamd_util = require 'rspamd_util'
local ivm_sendgrid_ids = lua_maps.map_add_from_ucl(
'https://www.invaluement.com/spdata/sendgrid-id-dnsbl.txt',
'set',
'Invaluement Service Provider DNSBL: Sendgrid IDs'
)
local ivm_sendgrid_envfromdomains = lua_maps.map_add_from_ucl(
'https://www.invaluement.com/spdata/sendgrid-envelopefromdomain-dnsbl.txt',
'set',
'Invaluement Service Provider DNSBL: Sendgrid envelope domains'
)
local cb_id = rspamd_config:register_symbol({
name = 'IVM_SENDGRID',
callback = function(task)
-- Is it Sendgrid?
local sg_hdr = task:get_header('X-SG-EID')
if not sg_hdr then return end
-- Get original envelope from
local env_from = task:get_from{'smtp', 'orig'}
if not env_from then return end
-- Check normalised domain in domains list
if ivm_sendgrid_envfromdomains and ivm_sendgrid_envfromdomains:get_key(rspamd_util.get_tld(env_from[1].domain)) then
task:insert_result('IVM_SENDGRID_DOMAIN', 1.0)
end
-- Check ID in ID list
local lp_re = rspamd_regexp.create_cached([[^bounces\+(\d+)-]])
local res = lp_re:search(env_from[1].user, true, true)
if not res then return end
if ivm_sendgrid_ids and ivm_sendgrid_ids:get_key(res[1][2]) then
task:insert_result('IVM_SENDGRID_ID', 1.0)
end
end,
description = 'Invaluement Service Provider DNSBL: Sendgrid',
type = 'callback',
})
rspamd_config:register_symbol({
name = 'IVM_SENDGRID_DOMAIN',
parent = cb_id,
group = 'ivmspdnsbl',
score = 8.0,
type = 'virtual',
})
rspamd_config:register_symbol({
name = 'IVM_SENDGRID_ID',
parent = cb_id,
group = 'ivmspdnsbl',
score = 8.0,
type = 'virtual',
})

View File

@ -204,11 +204,10 @@ legend {
color: #959595; color: #959595;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100% !important;
padding: 0 !important;
} }
.footer .version { .footer .version {
margin-left: auto; margin-left: auto;
margin-top: 20px;
} }
.slave-info { .slave-info {
padding: 15px 0px 15px 15px; padding: 15px 0px 15px 15px;

View File

@ -4054,6 +4054,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
$stmt->execute(array( $stmt->execute(array(
':alias_domain' => $alias_domain, ':alias_domain' => $alias_domain,
)); ));
$stmt = $pdo->prepare("DELETE FROM `spamalias` WHERE `address` LIKE :domain");
$stmt->execute(array(
':domain' => '%@'.$alias_domain,
));
$stmt = $pdo->prepare("DELETE FROM `bcc_maps` WHERE `local_dest` = :alias_domain"); $stmt = $pdo->prepare("DELETE FROM `bcc_maps` WHERE `local_dest` = :alias_domain");
$stmt->execute(array( $stmt->execute(array(
':alias_domain' => $alias_domain, ':alias_domain' => $alias_domain,

View File

@ -62,35 +62,40 @@
"oauth", "oauth",
"oauth2" "oauth2"
], ],
"support": {
"issues": "https://github.com/bshaffer/oauth2-server-php/issues",
"source": "https://github.com/bshaffer/oauth2-server-php/tree/master"
},
"time": "2018-12-04T00:29:32+00:00" "time": "2018-12-04T00:29:32+00:00"
}, },
{ {
"name": "ddeboer/imap", "name": "ddeboer/imap",
"version": "1.12.1", "version": "1.13.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ddeboer/imap.git", "url": "https://github.com/ddeboer/imap.git",
"reference": "dbed05ca67b93509345a820b2859de10c48948fb" "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ddeboer/imap/zipball/dbed05ca67b93509345a820b2859de10c48948fb", "url": "https://api.github.com/repos/ddeboer/imap/zipball/8b772d04b1deadb5df13782fb78c4b648f77496e",
"reference": "dbed05ca67b93509345a820b2859de10c48948fb", "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-iconv": "*", "ext-iconv": "*",
"ext-imap": "*", "ext-imap": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"php": "^7.4 || ^8.0" "php": "^8.0.1"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.18.6", "friendsofphp/php-cs-fixer": "^v3.4.0",
"laminas/laminas-mail": "^2.14.0", "laminas/laminas-mail": "^2.15.1",
"phpstan/phpstan": "^0.12.84", "malukenho/mcbumpface": "^1.1.5",
"phpstan/phpstan-phpunit": "^0.12.18", "phpstan/phpstan": "^1.3.3",
"phpstan/phpstan-strict-rules": "^0.12.9", "phpstan/phpstan-phpunit": "^1.0.0",
"phpunit/phpunit": "^9.5.4" "phpstan/phpstan-strict-rules": "^1.1.0",
"phpunit/phpunit": "^9.5.11"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -124,7 +129,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/ddeboer/imap/issues", "issues": "https://github.com/ddeboer/imap/issues",
"source": "https://github.com/ddeboer/imap/tree/1.12.1" "source": "https://github.com/ddeboer/imap/tree/1.13.1"
}, },
"funding": [ "funding": [
{ {
@ -136,35 +141,35 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-04-27T08:38:46+00:00" "time": "2022-01-10T10:53:05+00:00"
}, },
{ {
"name": "directorytree/ldaprecord", "name": "directorytree/ldaprecord",
"version": "v2.6.3", "version": "v2.10.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/DirectoryTree/LdapRecord.git", "url": "https://github.com/DirectoryTree/LdapRecord.git",
"reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a" "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/5c93ec6d1ef458290825a8b0a148946dce7c1e7a", "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/bf512d9af7a7b0e2ed7a666ab29cefdd027bee88",
"reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a", "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"ext-ldap": "*", "ext-ldap": "*",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0",
"nesbot/carbon": "^1.0|^2.0", "nesbot/carbon": "^1.0|^2.0",
"php": ">=7.3", "php": ">=7.3",
"psr/log": "^1.0", "psr/log": "*",
"psr/simple-cache": "^1.0", "psr/simple-cache": "^1.0|^2.0",
"tightenco/collect": "^5.6|^6.0|^7.0|^8.0" "tightenco/collect": "^5.6|^6.0|^7.0|^8.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"phpunit/phpunit": "^8.0", "phpunit/phpunit": "^9.0",
"spatie/ray": "^1.24" "spatie/ray": "^1.24"
}, },
"type": "library", "type": "library",
@ -209,31 +214,31 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-08-05T21:52:43+00:00" "time": "2022-02-25T16:00:51+00:00"
}, },
{ {
"name": "illuminate/contracts", "name": "illuminate/contracts",
"version": "v8.53.1", "version": "v9.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/contracts.git", "url": "https://github.com/illuminate/contracts.git",
"reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb" "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/504a34286a1b4c5421c43087d6bd4e176138f6fb", "url": "https://api.github.com/repos/illuminate/contracts/zipball/bf4b3c254c49d28157645d01e4883b5951b1e1d0",
"reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb", "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.3|^8.0", "php": "^8.0.2",
"psr/container": "^1.0", "psr/container": "^1.1.1|^2.0.1",
"psr/simple-cache": "^1.0" "psr/simple-cache": "^1.0|^2.0|^3.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "8.x-dev" "dev-master": "9.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -257,7 +262,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2021-08-03T14:03:47+00:00" "time": "2022-02-22T14:45:39+00:00"
}, },
{ {
"name": "matthiasmullie/minify", "name": "matthiasmullie/minify",
@ -384,6 +389,10 @@
"paths", "paths",
"relative" "relative"
], ],
"support": {
"issues": "https://github.com/matthiasmullie/path-converter/issues",
"source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3"
},
"time": "2019-02-05T23:41:09+00:00" "time": "2019-02-05T23:41:09+00:00"
}, },
{ {
@ -438,16 +447,16 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.51.1", "version": "2.57.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922" "reference": "4a54375c21eea4811dbd1149fe6b246517554e78"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78",
"reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", "reference": "4a54375c21eea4811dbd1149fe6b246517554e78",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -455,15 +464,16 @@
"php": "^7.1.8 || ^8.0", "php": "^7.1.8 || ^8.0",
"symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.16", "symfony/polyfill-php80": "^1.16",
"symfony/translation": "^3.4 || ^4.0 || ^5.0" "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0"
}, },
"require-dev": { "require-dev": {
"doctrine/dbal": "^2.0 || ^3.0",
"doctrine/orm": "^2.7", "doctrine/orm": "^2.7",
"friendsofphp/php-cs-fixer": "^2.14 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0", "kylekatarnls/multi-tester": "^2.0",
"phpmd/phpmd": "^2.9", "phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0", "phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.54", "phpstan/phpstan": "^0.12.54 || ^1.0",
"phpunit/phpunit": "^7.5.20 || ^8.5.14", "phpunit/phpunit": "^7.5.20 || ^8.5.14",
"squizlabs/php_codesniffer": "^3.4" "squizlabs/php_codesniffer": "^3.4"
}, },
@ -515,6 +525,7 @@
"time" "time"
], ],
"support": { "support": {
"docs": "https://carbon.nesbot.com/docs",
"issues": "https://github.com/briannesbitt/Carbon/issues", "issues": "https://github.com/briannesbitt/Carbon/issues",
"source": "https://github.com/briannesbitt/Carbon" "source": "https://github.com/briannesbitt/Carbon"
}, },
@ -528,7 +539,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-28T13:16:28+00:00" "time": "2022-02-13T18:13:33+00:00"
}, },
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
@ -673,16 +684,16 @@
}, },
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v6.5.0", "version": "v6.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git", "url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -694,10 +705,12 @@
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2", "doctrine/annotations": "^1.2",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"phpcompatibility/php-compatibility": "^9.3.5", "phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.5.6", "squizlabs/php_codesniffer": "^3.6.2",
"yoast/phpunit-polyfills": "^0.2.0" "yoast/phpunit-polyfills": "^1.0.0"
}, },
"suggest": { "suggest": {
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
@ -737,7 +750,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP", "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": { "support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues", "issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
}, },
"funding": [ "funding": [
{ {
@ -745,26 +758,31 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-06-16T14:33:43+00:00" "time": "2022-02-28T15:31:21+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
"version": "1.1.1", "version": "2.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/container.git", "url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.0" "php": ">=7.4.0"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Psr\\Container\\": "src/" "Psr\\Container\\": "src/"
@ -791,36 +809,36 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-fig/container/issues", "issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1" "source": "https://github.com/php-fig/container/tree/2.0.2"
}, },
"time": "2021-03-05T17:36:06+00:00" "time": "2021-11-05T16:47:00+00:00"
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.1.4", "version": "3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11" "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11", "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=8.0.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.1.x-dev" "dev-master": "3.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Psr\\Log\\": "Psr/Log/" "Psr\\Log\\": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -841,31 +859,31 @@
"psr-3" "psr-3"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/log/tree/1.1.4" "source": "https://github.com/php-fig/log/tree/3.0.0"
}, },
"time": "2021-05-03T11:20:27+00:00" "time": "2021-07-14T16:46:02+00:00"
}, },
{ {
"name": "psr/simple-cache", "name": "psr/simple-cache",
"version": "1.0.1", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/simple-cache.git", "url": "https://github.com/php-fig/simple-cache.git",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=8.0.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -880,7 +898,7 @@
"authors": [ "authors": [
{ {
"name": "PHP-FIG", "name": "PHP-FIG",
"homepage": "http://www.php-fig.org/" "homepage": "https://www.php-fig.org/"
} }
], ],
"description": "Common interfaces for simple caching", "description": "Common interfaces for simple caching",
@ -892,22 +910,22 @@
"simple-cache" "simple-cache"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/simple-cache/tree/master" "source": "https://github.com/php-fig/simple-cache/tree/2.0.0"
}, },
"time": "2017-10-23T01:57:42+00:00" "time": "2021-10-29T13:22:09+00:00"
}, },
{ {
"name": "robthree/twofactorauth", "name": "robthree/twofactorauth",
"version": "1.8.0", "version": "1.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/RobThree/TwoFactorAuth.git", "url": "https://github.com/RobThree/TwoFactorAuth.git",
"reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c" "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/30a38627ae1e7c9399dae67e265063cd6ec5276c", "url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/5afcb45282f1c75562a48d479ecd1732c9bdb11b",
"reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c", "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -964,7 +982,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-03-09T18:24:05+00:00" "time": "2021-10-20T12:19:55+00:00"
}, },
{ {
"name": "soundasleep/html2text", "name": "soundasleep/html2text",
@ -1014,92 +1032,33 @@
"php", "php",
"text" "text"
], ],
"support": {
"email": "support@jevon.org",
"issues": "https://github.com/soundasleep/html2text/issues",
"source": "https://github.com/soundasleep/html2text/tree/master"
},
"time": "2017-04-19T22:01:50+00:00" "time": "2017-04-19T22:01:50+00:00"
}, },
{
"name": "symfony/deprecation-contracts",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-03-23T23:28:01+00:00"
},
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.23.0", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" "reference": "30885182c981ab175d4d034db0f6f469898070ab"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"provide": {
"ext-ctype": "*"
},
"suggest": { "suggest": {
"ext-ctype": "For best performance" "ext-ctype": "For best performance"
}, },
@ -1114,12 +1073,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -1144,7 +1103,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@ -1160,25 +1119,28 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-02-19T12:13:01+00:00" "time": "2021-10-20T20:35:02+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.23.1", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"provide": {
"ext-mbstring": "*"
},
"suggest": { "suggest": {
"ext-mbstring": "For best performance" "ext-mbstring": "For best performance"
}, },
@ -1193,12 +1155,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -1224,7 +1186,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@ -1240,20 +1202,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-05-27T12:26:48+00:00" "time": "2021-11-30T18:21:41+00:00"
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
"version": "v1.23.1", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1270,12 +1232,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
], ],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [ "classmap": [
"Resources/stubs" "Resources/stubs"
] ]
@ -1307,7 +1269,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@ -1323,50 +1285,50 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-28T13:41:28+00:00" "time": "2021-09-13T13:58:33+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v5.3.4", "version": "v6.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1" "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/d89ad7292932c2699cbe4af98d72c5c6bbc504c1", "url": "https://api.github.com/repos/symfony/translation/zipball/e69501c71107cc3146b32aaa45f4edd0c3427875",
"reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1", "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^2.3|^3.0"
"symfony/translation-contracts": "^2.3"
}, },
"conflict": { "conflict": {
"symfony/config": "<4.4", "symfony/config": "<5.4",
"symfony/dependency-injection": "<5.0", "symfony/console": "<5.4",
"symfony/http-kernel": "<5.0", "symfony/dependency-injection": "<5.4",
"symfony/twig-bundle": "<5.0", "symfony/http-kernel": "<5.4",
"symfony/yaml": "<4.4" "symfony/twig-bundle": "<5.4",
"symfony/yaml": "<5.4"
}, },
"provide": { "provide": {
"symfony/translation-implementation": "2.3" "symfony/translation-implementation": "2.3|3.0"
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^4.4|^5.0", "symfony/config": "^5.4|^6.0",
"symfony/console": "^4.4|^5.0", "symfony/console": "^5.4|^6.0",
"symfony/dependency-injection": "^5.0", "symfony/dependency-injection": "^5.4|^6.0",
"symfony/finder": "^4.4|^5.0", "symfony/finder": "^5.4|^6.0",
"symfony/http-kernel": "^5.0", "symfony/http-client-contracts": "^1.1|^2.0|^3.0",
"symfony/intl": "^4.4|^5.0", "symfony/http-kernel": "^5.4|^6.0",
"symfony/intl": "^5.4|^6.0",
"symfony/polyfill-intl-icu": "^1.21", "symfony/polyfill-intl-icu": "^1.21",
"symfony/service-contracts": "^1.1.2|^2", "symfony/service-contracts": "^1.1.2|^2|^3",
"symfony/yaml": "^4.4|^5.0" "symfony/yaml": "^5.4|^6.0"
}, },
"suggest": { "suggest": {
"psr/log-implementation": "To use logging capability in translator", "psr/log-implementation": "To use logging capability in translator",
@ -1402,7 +1364,7 @@
"description": "Provides tools to internationalize your application", "description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/translation/tree/v5.3.4" "source": "https://github.com/symfony/translation/tree/v6.0.5"
}, },
"funding": [ "funding": [
{ {
@ -1418,24 +1380,24 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-25T09:39:16+00:00" "time": "2022-02-09T15:52:48+00:00"
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
"version": "v2.4.0", "version": "v3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation-contracts.git", "url": "https://github.com/symfony/translation-contracts.git",
"reference": "95c812666f3e91db75385749fe219c5e494c7f95" "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77",
"reference": "95c812666f3e91db75385749fe219c5e494c7f95", "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5" "php": ">=8.0.2"
}, },
"suggest": { "suggest": {
"symfony/translation-implementation": "" "symfony/translation-implementation": ""
@ -1443,7 +1405,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "2.4-dev" "dev-main": "3.0-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@ -1480,7 +1442,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0"
}, },
"funding": [ "funding": [
{ {
@ -1496,35 +1458,35 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-03-23T23:28:01+00:00" "time": "2021-09-07T12:43:40+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v5.3.6", "version": "v6.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0" "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60d6a756d5f485df5e6e40b337334848f79f61ce",
"reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0"
"symfony/polyfill-php80": "^1.16"
}, },
"conflict": { "conflict": {
"phpunit/phpunit": "<5.4.3", "phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4" "symfony/console": "<5.4"
}, },
"require-dev": { "require-dev": {
"ext-iconv": "*", "ext-iconv": "*",
"symfony/console": "^4.4|^5.0", "symfony/console": "^5.4|^6.0",
"symfony/process": "^4.4|^5.0", "symfony/process": "^5.4|^6.0",
"symfony/uid": "^5.4|^6.0",
"twig/twig": "^2.13|^3.0.4" "twig/twig": "^2.13|^3.0.4"
}, },
"suggest": { "suggest": {
@ -1568,7 +1530,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.3.6" "source": "https://github.com/symfony/var-dumper/tree/v6.0.5"
}, },
"funding": [ "funding": [
{ {
@ -1584,25 +1546,25 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-27T01:56:02+00:00" "time": "2022-02-21T17:15:17+00:00"
}, },
{ {
"name": "tightenco/collect", "name": "tightenco/collect",
"version": "v8.34.0", "version": "v8.83.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/tighten/collect.git", "url": "https://github.com/tighten/collect.git",
"reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2" "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/tighten/collect/zipball/b069783ab0c547bb894ebcf8e7f6024bb401f9d2", "url": "https://api.github.com/repos/tighten/collect/zipball/d9c66d586ec2d216d8a31283d73f8df1400cc722",
"reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2", "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2|^8.0", "php": "^7.3|^8.0",
"symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
@ -1636,22 +1598,22 @@
], ],
"support": { "support": {
"issues": "https://github.com/tighten/collect/issues", "issues": "https://github.com/tighten/collect/issues",
"source": "https://github.com/tighten/collect/tree/v8.34.0" "source": "https://github.com/tighten/collect/tree/v8.83.2"
}, },
"time": "2021-03-29T21:29:00+00:00" "time": "2022-02-16T16:15:54+00:00"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.3.2", "version": "v3.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "21578f00e83d4a82ecfa3d50752b609f13de6790" "reference": "972d8604a92b7054828b539f2febb0211dd5945c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/21578f00e83d4a82ecfa3d50752b609f13de6790", "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
"reference": "21578f00e83d4a82ecfa3d50752b609f13de6790", "reference": "972d8604a92b7054828b539f2febb0211dd5945c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1661,7 +1623,7 @@
}, },
"require-dev": { "require-dev": {
"psr/container": "^1.0", "psr/container": "^1.0",
"symfony/phpunit-bridge": "^4.4.9|^5.0.9" "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -1702,7 +1664,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.3.2" "source": "https://github.com/twigphp/Twig/tree/v3.3.8"
}, },
"funding": [ "funding": [
{ {
@ -1714,7 +1676,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-05-16T12:14:13+00:00" "time": "2022-02-04T06:59:48+00:00"
}, },
{ {
"name": "yubico/u2flib-server", "name": "yubico/u2flib-server",
@ -1751,6 +1713,10 @@
], ],
"description": "Library for U2F implementation", "description": "Library for U2F implementation",
"homepage": "https://developers.yubico.com/php-u2flib-server", "homepage": "https://developers.yubico.com/php-u2flib-server",
"support": {
"issues": "https://github.com/Yubico/php-u2flib-server/issues",
"source": "https://github.com/Yubico/php-u2flib-server/tree/1.0.2"
},
"time": "2018-09-07T08:16:44+00:00" "time": "2018-09-07T08:16:44+00:00"
} }
], ],
@ -1762,5 +1728,5 @@
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.1.0" "plugin-api-version": "2.2.0"
} }

View File

@ -1 +0,0 @@
../nesbot/carbon/bin/carbon

97
data/web/inc/lib/vendor/bin/carbon vendored Executable file
View File

@ -0,0 +1,97 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../nesbot/carbon/bin/carbon)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 21);
$opened_path = realpath($opened_path) ?: $opened_path;
$this->handle = fopen($opened_path, $mode);
$this->position = 0;
// remove all traces of this stream wrapper once it has been used
stream_wrapper_unregister('composer-bin-proxy');
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return fstat($this->handle);
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) {
include("composer-bin-proxy://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
exit(0);
}
}
include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';

View File

@ -1 +0,0 @@
../matthiasmullie/minify/bin/minifycss

97
data/web/inc/lib/vendor/bin/minifycss vendored Executable file
View File

@ -0,0 +1,97 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../matthiasmullie/minify/bin/minifycss)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 21);
$opened_path = realpath($opened_path) ?: $opened_path;
$this->handle = fopen($opened_path, $mode);
$this->position = 0;
// remove all traces of this stream wrapper once it has been used
stream_wrapper_unregister('composer-bin-proxy');
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return fstat($this->handle);
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) {
include("composer-bin-proxy://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss');
exit(0);
}
}
include __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss';

View File

@ -1 +0,0 @@
../matthiasmullie/minify/bin/minifyjs

97
data/web/inc/lib/vendor/bin/minifyjs vendored Executable file
View File

@ -0,0 +1,97 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../matthiasmullie/minify/bin/minifyjs)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 21);
$opened_path = realpath($opened_path) ?: $opened_path;
$this->handle = fopen($opened_path, $mode);
$this->position = 0;
// remove all traces of this stream wrapper once it has been used
stream_wrapper_unregister('composer-bin-proxy');
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return fstat($this->handle);
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) {
include("composer-bin-proxy://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs');
exit(0);
}
}
include __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs';

View File

@ -1 +0,0 @@
../symfony/var-dumper/Resources/bin/var-dump-server

97
data/web/inc/lib/vendor/bin/var-dump-server vendored Executable file
View File

@ -0,0 +1,97 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../symfony/var-dumper/Resources/bin/var-dump-server)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 21);
$opened_path = realpath($opened_path) ?: $opened_path;
$this->handle = fopen($opened_path, $mode);
$this->position = 0;
// remove all traces of this stream wrapper once it has been used
stream_wrapper_unregister('composer-bin-proxy');
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return fstat($this->handle);
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) {
include("composer-bin-proxy://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server');
exit(0);
}
}
include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server';

View File

@ -42,30 +42,75 @@ namespace Composer\Autoload;
*/ */
class ClassLoader class ClassLoader
{ {
/** @var ?string */
private $vendorDir; private $vendorDir;
// PSR-4 // PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false; private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array(); private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array(); private $missingClasses = array();
/** @var ?string */
private $apcuPrefix; private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array(); private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null) public function __construct($vendorDir = null)
{ {
$this->vendorDir = $vendorDir; $this->vendorDir = $vendorDir;
} }
/**
* @return string[]
*/
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { if (!empty($this->prefixesPsr0)) {
@ -75,28 +120,47 @@ class ClassLoader
return array(); return array();
} }
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
return $this->prefixDirsPsr4; return $this->prefixDirsPsr4;
} }
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs() public function getFallbackDirs()
{ {
return $this->fallbackDirsPsr0; return $this->fallbackDirsPsr0;
} }
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
return $this->fallbackDirsPsr4; return $this->fallbackDirsPsr4;
} }
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap() public function getClassMap()
{ {
return $this->classMap; return $this->classMap;
} }
/** /**
* @param array $classMap Class to filename map * @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/ */
public function addClassMap(array $classMap) public function addClassMap(array $classMap)
{ {
@ -111,9 +175,11 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either * Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories * @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
*
* @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
@ -156,11 +222,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either * Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories * @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
@ -204,8 +272,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, * Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories * @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/ */
public function set($prefix, $paths) public function set($prefix, $paths)
{ {
@ -220,10 +290,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, * Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories * @param string[]|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function setPsr4($prefix, $paths) public function setPsr4($prefix, $paths)
{ {
@ -243,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files. * Turns on searching the include path for class files.
* *
* @param bool $useIncludePath * @param bool $useIncludePath
*
* @return void
*/ */
public function setUseIncludePath($useIncludePath) public function setUseIncludePath($useIncludePath)
{ {
@ -265,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map. * that have not been registered with the class map.
* *
* @param bool $classMapAuthoritative * @param bool $classMapAuthoritative
*
* @return void
*/ */
public function setClassMapAuthoritative($classMapAuthoritative) public function setClassMapAuthoritative($classMapAuthoritative)
{ {
@ -285,6 +361,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled. * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
* *
* @param string|null $apcuPrefix * @param string|null $apcuPrefix
*
* @return void
*/ */
public function setApcuPrefix($apcuPrefix) public function setApcuPrefix($apcuPrefix)
{ {
@ -305,6 +383,8 @@ class ClassLoader
* Registers this instance as an autoloader. * Registers this instance as an autoloader.
* *
* @param bool $prepend Whether to prepend the autoloader or not * @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/ */
public function register($prepend = false) public function register($prepend = false)
{ {
@ -324,6 +404,8 @@ class ClassLoader
/** /**
* Unregisters this instance as an autoloader. * Unregisters this instance as an autoloader.
*
* @return void
*/ */
public function unregister() public function unregister()
{ {
@ -403,6 +485,11 @@ class ClassLoader
return self::$registeredLoaders; return self::$registeredLoaders;
} }
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext) private function findFileWithExtension($class, $ext)
{ {
// PSR-4 lookup // PSR-4 lookup
@ -474,6 +561,10 @@ class ClassLoader
* Scope isolated include. * Scope isolated include.
* *
* Prevents access to $this/self from included files. * Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/ */
function includeFile($file) function includeFile($file)
{ {

View File

@ -20,12 +20,25 @@ use Composer\Semver\VersionParser;
* *
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
* *
* To require it's presence, you can require `composer-runtime-api ^2.0` * To require its presence, you can require `composer-runtime-api ^2.0`
*/ */
class InstalledVersions class InstalledVersions
{ {
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
*/
private static $installed; private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors; private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static $installedByVendor = array(); private static $installedByVendor = array();
/** /**
@ -228,7 +241,7 @@ class InstalledVersions
/** /**
* @return array * @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/ */
public static function getRootPackage() public static function getRootPackage()
{ {
@ -242,7 +255,7 @@ class InstalledVersions
* *
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[] * @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/ */
public static function getRawData() public static function getRawData()
{ {
@ -265,7 +278,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations * Returns the raw data of all installed.php which are currently loaded for custom implementations
* *
* @return array[] * @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}> * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/ */
public static function getAllRawData() public static function getAllRawData()
{ {
@ -288,7 +301,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set * @param array[] $data A vendor/composer/installed.php data set
* @return void * @return void
* *
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/ */
public static function reload($data) public static function reload($data)
{ {
@ -298,7 +311,7 @@ class InstalledVersions
/** /**
* @return array[] * @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}> * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/ */
private static function getInstalled() private static function getInstalled()
{ {

View File

@ -7,10 +7,9 @@ $baseDir = dirname($vendorDir);
return array( return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'fe62ba7e10580d903cc46d808b5961a4' => $vendorDir . '/tightenco/collect/src/Collect/Support/helpers.php', 'fe62ba7e10580d903cc46d808b5961a4' => $vendorDir . '/tightenco/collect/src/Collect/Support/helpers.php',
'caf31cc6ec7cf2241cb6f12c226c3846' => $vendorDir . '/tightenco/collect/src/Collect/Support/alias.php', 'caf31cc6ec7cf2241cb6f12c226c3846' => $vendorDir . '/tightenco/collect/src/Collect/Support/alias.php',

View File

@ -16,7 +16,7 @@ return array(
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
'RobThree\\Auth\\' => array($vendorDir . '/robthree/twofactorauth/lib'), 'RobThree\\Auth\\' => array($vendorDir . '/robthree/twofactorauth/lib'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'PhpMimeMailParser\\' => array($vendorDir . '/php-mime-mail-parser/php-mime-mail-parser/src'), 'PhpMimeMailParser\\' => array($vendorDir . '/php-mime-mail-parser/php-mime-mail-parser/src'),
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),

View File

@ -65,11 +65,16 @@ class ComposerAutoloaderInit873464e4bd965a3168f133248b1b218b
} }
} }
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire873464e4bd965a3168f133248b1b218b($fileIdentifier, $file) function composerRequire873464e4bd965a3168f133248b1b218b($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
} }
} }

View File

@ -8,10 +8,9 @@ class ComposerStaticInit873464e4bd965a3168f133248b1b218b
{ {
public static $files = array ( public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'fe62ba7e10580d903cc46d808b5961a4' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/helpers.php', 'fe62ba7e10580d903cc46d808b5961a4' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/helpers.php',
'caf31cc6ec7cf2241cb6f12c226c3846' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/alias.php', 'caf31cc6ec7cf2241cb6f12c226c3846' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/alias.php',
@ -115,7 +114,7 @@ class ComposerStaticInit873464e4bd965a3168f133248b1b218b
), ),
'Psr\\Log\\' => 'Psr\\Log\\' =>
array ( array (
0 => __DIR__ . '/..' . '/psr/log/Psr/Log', 0 => __DIR__ . '/..' . '/psr/log/src',
), ),
'Psr\\Container\\' => 'Psr\\Container\\' =>
array ( array (

View File

@ -63,34 +63,35 @@
}, },
{ {
"name": "ddeboer/imap", "name": "ddeboer/imap",
"version": "1.12.1", "version": "1.13.1",
"version_normalized": "1.12.1.0", "version_normalized": "1.13.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ddeboer/imap.git", "url": "https://github.com/ddeboer/imap.git",
"reference": "dbed05ca67b93509345a820b2859de10c48948fb" "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ddeboer/imap/zipball/dbed05ca67b93509345a820b2859de10c48948fb", "url": "https://api.github.com/repos/ddeboer/imap/zipball/8b772d04b1deadb5df13782fb78c4b648f77496e",
"reference": "dbed05ca67b93509345a820b2859de10c48948fb", "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-iconv": "*", "ext-iconv": "*",
"ext-imap": "*", "ext-imap": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"php": "^7.4 || ^8.0" "php": "^8.0.1"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.18.6", "friendsofphp/php-cs-fixer": "^v3.4.0",
"laminas/laminas-mail": "^2.14.0", "laminas/laminas-mail": "^2.15.1",
"phpstan/phpstan": "^0.12.84", "malukenho/mcbumpface": "^1.1.5",
"phpstan/phpstan-phpunit": "^0.12.18", "phpstan/phpstan": "^1.3.3",
"phpstan/phpstan-strict-rules": "^0.12.9", "phpstan/phpstan-phpunit": "^1.0.0",
"phpunit/phpunit": "^9.5.4" "phpstan/phpstan-strict-rules": "^1.1.0",
"phpunit/phpunit": "^9.5.11"
}, },
"time": "2021-04-27T08:38:46+00:00", "time": "2022-01-10T10:53:05+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -124,7 +125,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/ddeboer/imap/issues", "issues": "https://github.com/ddeboer/imap/issues",
"source": "https://github.com/ddeboer/imap/tree/1.12.1" "source": "https://github.com/ddeboer/imap/tree/1.13.1"
}, },
"funding": [ "funding": [
{ {
@ -140,35 +141,35 @@
}, },
{ {
"name": "directorytree/ldaprecord", "name": "directorytree/ldaprecord",
"version": "v2.6.3", "version": "v2.10.1",
"version_normalized": "2.6.3.0", "version_normalized": "2.10.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/DirectoryTree/LdapRecord.git", "url": "https://github.com/DirectoryTree/LdapRecord.git",
"reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a" "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/5c93ec6d1ef458290825a8b0a148946dce7c1e7a", "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/bf512d9af7a7b0e2ed7a666ab29cefdd027bee88",
"reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a", "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"ext-ldap": "*", "ext-ldap": "*",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0",
"nesbot/carbon": "^1.0|^2.0", "nesbot/carbon": "^1.0|^2.0",
"php": ">=7.3", "php": ">=7.3",
"psr/log": "^1.0", "psr/log": "*",
"psr/simple-cache": "^1.0", "psr/simple-cache": "^1.0|^2.0",
"tightenco/collect": "^5.6|^6.0|^7.0|^8.0" "tightenco/collect": "^5.6|^6.0|^7.0|^8.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"phpunit/phpunit": "^8.0", "phpunit/phpunit": "^9.0",
"spatie/ray": "^1.24" "spatie/ray": "^1.24"
}, },
"time": "2021-08-05T21:52:43+00:00", "time": "2022-02-25T16:00:51+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -216,29 +217,29 @@
}, },
{ {
"name": "illuminate/contracts", "name": "illuminate/contracts",
"version": "v8.53.1", "version": "v9.3.0",
"version_normalized": "8.53.1.0", "version_normalized": "9.3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/contracts.git", "url": "https://github.com/illuminate/contracts.git",
"reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb" "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/504a34286a1b4c5421c43087d6bd4e176138f6fb", "url": "https://api.github.com/repos/illuminate/contracts/zipball/bf4b3c254c49d28157645d01e4883b5951b1e1d0",
"reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb", "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.3|^8.0", "php": "^8.0.2",
"psr/container": "^1.0", "psr/container": "^1.1.1|^2.0.1",
"psr/simple-cache": "^1.0" "psr/simple-cache": "^1.0|^2.0|^3.0"
}, },
"time": "2021-08-03T14:03:47+00:00", "time": "2022-02-22T14:45:39+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "8.x-dev" "dev-master": "9.x-dev"
} }
}, },
"installation-source": "dist", "installation-source": "dist",
@ -453,17 +454,17 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.51.1", "version": "2.57.0",
"version_normalized": "2.51.1.0", "version_normalized": "2.57.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922" "reference": "4a54375c21eea4811dbd1149fe6b246517554e78"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78",
"reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", "reference": "4a54375c21eea4811dbd1149fe6b246517554e78",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -471,19 +472,20 @@
"php": "^7.1.8 || ^8.0", "php": "^7.1.8 || ^8.0",
"symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.16", "symfony/polyfill-php80": "^1.16",
"symfony/translation": "^3.4 || ^4.0 || ^5.0" "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0"
}, },
"require-dev": { "require-dev": {
"doctrine/dbal": "^2.0 || ^3.0",
"doctrine/orm": "^2.7", "doctrine/orm": "^2.7",
"friendsofphp/php-cs-fixer": "^2.14 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0", "kylekatarnls/multi-tester": "^2.0",
"phpmd/phpmd": "^2.9", "phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0", "phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.54", "phpstan/phpstan": "^0.12.54 || ^1.0",
"phpunit/phpunit": "^7.5.20 || ^8.5.14", "phpunit/phpunit": "^7.5.20 || ^8.5.14",
"squizlabs/php_codesniffer": "^3.4" "squizlabs/php_codesniffer": "^3.4"
}, },
"time": "2021-07-28T13:16:28+00:00", "time": "2022-02-13T18:13:33+00:00",
"bin": [ "bin": [
"bin/carbon" "bin/carbon"
], ],
@ -533,6 +535,7 @@
"time" "time"
], ],
"support": { "support": {
"docs": "https://carbon.nesbot.com/docs",
"issues": "https://github.com/briannesbitt/Carbon/issues", "issues": "https://github.com/briannesbitt/Carbon/issues",
"source": "https://github.com/briannesbitt/Carbon" "source": "https://github.com/briannesbitt/Carbon"
}, },
@ -697,17 +700,17 @@
}, },
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v6.5.0", "version": "v6.6.0",
"version_normalized": "6.5.0.0", "version_normalized": "6.6.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git", "url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -719,10 +722,12 @@
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2", "doctrine/annotations": "^1.2",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"phpcompatibility/php-compatibility": "^9.3.5", "phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.5.6", "squizlabs/php_codesniffer": "^3.6.2",
"yoast/phpunit-polyfills": "^0.2.0" "yoast/phpunit-polyfills": "^1.0.0"
}, },
"suggest": { "suggest": {
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
@ -732,7 +737,7 @@
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
}, },
"time": "2021-06-16T14:33:43+00:00", "time": "2022-02-28T15:31:21+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -764,7 +769,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP", "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": { "support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues", "issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
}, },
"funding": [ "funding": [
{ {
@ -776,24 +781,29 @@
}, },
{ {
"name": "psr/container", "name": "psr/container",
"version": "1.1.1", "version": "2.0.2",
"version_normalized": "1.1.1.0", "version_normalized": "2.0.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/container.git", "url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.0" "php": ">=7.4.0"
}, },
"time": "2021-03-05T17:36:06+00:00", "time": "2021-11-05T16:47:00+00:00",
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -821,39 +831,39 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-fig/container/issues", "issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1" "source": "https://github.com/php-fig/container/tree/2.0.2"
}, },
"install-path": "../psr/container" "install-path": "../psr/container"
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.1.4", "version": "3.0.0",
"version_normalized": "1.1.4.0", "version_normalized": "3.0.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11" "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11", "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=8.0.0"
}, },
"time": "2021-05-03T11:20:27+00:00", "time": "2021-07-14T16:46:02+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.1.x-dev" "dev-master": "3.x-dev"
} }
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Psr\\Log\\": "Psr/Log/" "Psr\\Log\\": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -874,33 +884,33 @@
"psr-3" "psr-3"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/log/tree/1.1.4" "source": "https://github.com/php-fig/log/tree/3.0.0"
}, },
"install-path": "../psr/log" "install-path": "../psr/log"
}, },
{ {
"name": "psr/simple-cache", "name": "psr/simple-cache",
"version": "1.0.1", "version": "2.0.0",
"version_normalized": "1.0.1.0", "version_normalized": "2.0.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/simple-cache.git", "url": "https://github.com/php-fig/simple-cache.git",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=8.0.0"
}, },
"time": "2017-10-23T01:57:42+00:00", "time": "2021-10-29T13:22:09+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"installation-source": "dist", "installation-source": "dist",
@ -916,7 +926,7 @@
"authors": [ "authors": [
{ {
"name": "PHP-FIG", "name": "PHP-FIG",
"homepage": "http://www.php-fig.org/" "homepage": "https://www.php-fig.org/"
} }
], ],
"description": "Common interfaces for simple caching", "description": "Common interfaces for simple caching",
@ -928,23 +938,23 @@
"simple-cache" "simple-cache"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/simple-cache/tree/master" "source": "https://github.com/php-fig/simple-cache/tree/2.0.0"
}, },
"install-path": "../psr/simple-cache" "install-path": "../psr/simple-cache"
}, },
{ {
"name": "robthree/twofactorauth", "name": "robthree/twofactorauth",
"version": "1.8.0", "version": "1.8.1",
"version_normalized": "1.8.0.0", "version_normalized": "1.8.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/RobThree/TwoFactorAuth.git", "url": "https://github.com/RobThree/TwoFactorAuth.git",
"reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c" "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/30a38627ae1e7c9399dae67e265063cd6ec5276c", "url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/5afcb45282f1c75562a48d479ecd1732c9bdb11b",
"reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c", "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -958,7 +968,7 @@
"bacon/bacon-qr-code": "Needed for BaconQrCodeProvider provider", "bacon/bacon-qr-code": "Needed for BaconQrCodeProvider provider",
"endroid/qr-code": "Needed for EndroidQrCodeProvider" "endroid/qr-code": "Needed for EndroidQrCodeProvider"
}, },
"time": "2021-03-09T18:24:05+00:00", "time": "2021-10-20T12:19:55+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -1058,98 +1068,31 @@
], ],
"install-path": "../soundasleep/html2text" "install-path": "../soundasleep/html2text"
}, },
{
"name": "symfony/deprecation-contracts",
"version": "v2.4.0",
"version_normalized": "2.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"time": "2021-03-23T23:28:01+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"installation-source": "dist",
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"install-path": "../symfony/deprecation-contracts"
},
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.23.0", "version": "v1.24.0",
"version_normalized": "1.23.0.0", "version_normalized": "1.24.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" "reference": "30885182c981ab175d4d034db0f6f469898070ab"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"provide": {
"ext-ctype": "*"
},
"suggest": { "suggest": {
"ext-ctype": "For best performance" "ext-ctype": "For best performance"
}, },
"time": "2021-02-19T12:13:01+00:00", "time": "2021-10-20T20:35:02+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1162,12 +1105,12 @@
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -1192,7 +1135,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@ -1212,26 +1155,29 @@
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.23.1", "version": "v1.24.0",
"version_normalized": "1.23.1.0", "version_normalized": "1.24.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"provide": {
"ext-mbstring": "*"
},
"suggest": { "suggest": {
"ext-mbstring": "For best performance" "ext-mbstring": "For best performance"
}, },
"time": "2021-05-27T12:26:48+00:00", "time": "2021-11-30T18:21:41+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1244,12 +1190,12 @@
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -1275,7 +1221,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@ -1295,23 +1241,23 @@
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
"version": "v1.23.1", "version": "v1.24.0",
"version_normalized": "1.23.1.0", "version_normalized": "1.24.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"time": "2021-07-28T13:41:28+00:00", "time": "2021-09-13T13:58:33+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1324,12 +1270,12 @@
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
], ],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [ "classmap": [
"Resources/stubs" "Resources/stubs"
] ]
@ -1361,7 +1307,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@ -1381,54 +1327,54 @@
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v5.3.4", "version": "v6.0.5",
"version_normalized": "5.3.4.0", "version_normalized": "6.0.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1" "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/d89ad7292932c2699cbe4af98d72c5c6bbc504c1", "url": "https://api.github.com/repos/symfony/translation/zipball/e69501c71107cc3146b32aaa45f4edd0c3427875",
"reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1", "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^2.3|^3.0"
"symfony/translation-contracts": "^2.3"
}, },
"conflict": { "conflict": {
"symfony/config": "<4.4", "symfony/config": "<5.4",
"symfony/dependency-injection": "<5.0", "symfony/console": "<5.4",
"symfony/http-kernel": "<5.0", "symfony/dependency-injection": "<5.4",
"symfony/twig-bundle": "<5.0", "symfony/http-kernel": "<5.4",
"symfony/yaml": "<4.4" "symfony/twig-bundle": "<5.4",
"symfony/yaml": "<5.4"
}, },
"provide": { "provide": {
"symfony/translation-implementation": "2.3" "symfony/translation-implementation": "2.3|3.0"
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^4.4|^5.0", "symfony/config": "^5.4|^6.0",
"symfony/console": "^4.4|^5.0", "symfony/console": "^5.4|^6.0",
"symfony/dependency-injection": "^5.0", "symfony/dependency-injection": "^5.4|^6.0",
"symfony/finder": "^4.4|^5.0", "symfony/finder": "^5.4|^6.0",
"symfony/http-kernel": "^5.0", "symfony/http-client-contracts": "^1.1|^2.0|^3.0",
"symfony/intl": "^4.4|^5.0", "symfony/http-kernel": "^5.4|^6.0",
"symfony/intl": "^5.4|^6.0",
"symfony/polyfill-intl-icu": "^1.21", "symfony/polyfill-intl-icu": "^1.21",
"symfony/service-contracts": "^1.1.2|^2", "symfony/service-contracts": "^1.1.2|^2|^3",
"symfony/yaml": "^4.4|^5.0" "symfony/yaml": "^5.4|^6.0"
}, },
"suggest": { "suggest": {
"psr/log-implementation": "To use logging capability in translator", "psr/log-implementation": "To use logging capability in translator",
"symfony/config": "", "symfony/config": "",
"symfony/yaml": "" "symfony/yaml": ""
}, },
"time": "2021-07-25T09:39:16+00:00", "time": "2022-02-09T15:52:48+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -1459,7 +1405,7 @@
"description": "Provides tools to internationalize your application", "description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/translation/tree/v5.3.4" "source": "https://github.com/symfony/translation/tree/v6.0.5"
}, },
"funding": [ "funding": [
{ {
@ -1479,30 +1425,30 @@
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
"version": "v2.4.0", "version": "v3.0.0",
"version_normalized": "2.4.0.0", "version_normalized": "3.0.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation-contracts.git", "url": "https://github.com/symfony/translation-contracts.git",
"reference": "95c812666f3e91db75385749fe219c5e494c7f95" "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77",
"reference": "95c812666f3e91db75385749fe219c5e494c7f95", "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5" "php": ">=8.0.2"
}, },
"suggest": { "suggest": {
"symfony/translation-implementation": "" "symfony/translation-implementation": ""
}, },
"time": "2021-03-23T23:28:01+00:00", "time": "2021-09-07T12:43:40+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "2.4-dev" "dev-main": "3.0-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@ -1540,7 +1486,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0"
}, },
"funding": [ "funding": [
{ {
@ -1560,32 +1506,32 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v5.3.6", "version": "v6.0.5",
"version_normalized": "5.3.6.0", "version_normalized": "6.0.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0" "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60d6a756d5f485df5e6e40b337334848f79f61ce",
"reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0"
"symfony/polyfill-php80": "^1.16"
}, },
"conflict": { "conflict": {
"phpunit/phpunit": "<5.4.3", "phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4" "symfony/console": "<5.4"
}, },
"require-dev": { "require-dev": {
"ext-iconv": "*", "ext-iconv": "*",
"symfony/console": "^4.4|^5.0", "symfony/console": "^5.4|^6.0",
"symfony/process": "^4.4|^5.0", "symfony/process": "^5.4|^6.0",
"symfony/uid": "^5.4|^6.0",
"twig/twig": "^2.13|^3.0.4" "twig/twig": "^2.13|^3.0.4"
}, },
"suggest": { "suggest": {
@ -1593,7 +1539,7 @@
"ext-intl": "To show region name in time zone dump", "ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
}, },
"time": "2021-07-27T01:56:02+00:00", "time": "2022-02-21T17:15:17+00:00",
"bin": [ "bin": [
"Resources/bin/var-dump-server" "Resources/bin/var-dump-server"
], ],
@ -1631,7 +1577,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.3.6" "source": "https://github.com/symfony/var-dumper/tree/v6.0.5"
}, },
"funding": [ "funding": [
{ {
@ -1651,29 +1597,29 @@
}, },
{ {
"name": "tightenco/collect", "name": "tightenco/collect",
"version": "v8.34.0", "version": "v8.83.2",
"version_normalized": "8.34.0.0", "version_normalized": "8.83.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/tighten/collect.git", "url": "https://github.com/tighten/collect.git",
"reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2" "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/tighten/collect/zipball/b069783ab0c547bb894ebcf8e7f6024bb401f9d2", "url": "https://api.github.com/repos/tighten/collect/zipball/d9c66d586ec2d216d8a31283d73f8df1400cc722",
"reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2", "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2|^8.0", "php": "^7.3|^8.0",
"symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nesbot/carbon": "^2.23.0", "nesbot/carbon": "^2.23.0",
"phpunit/phpunit": "^8.3" "phpunit/phpunit": "^8.3"
}, },
"time": "2021-03-29T21:29:00+00:00", "time": "2022-02-16T16:15:54+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -1702,23 +1648,23 @@
], ],
"support": { "support": {
"issues": "https://github.com/tighten/collect/issues", "issues": "https://github.com/tighten/collect/issues",
"source": "https://github.com/tighten/collect/tree/v8.34.0" "source": "https://github.com/tighten/collect/tree/v8.83.2"
}, },
"install-path": "../tightenco/collect" "install-path": "../tightenco/collect"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.3.2", "version": "v3.3.8",
"version_normalized": "3.3.2.0", "version_normalized": "3.3.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "21578f00e83d4a82ecfa3d50752b609f13de6790" "reference": "972d8604a92b7054828b539f2febb0211dd5945c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/21578f00e83d4a82ecfa3d50752b609f13de6790", "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
"reference": "21578f00e83d4a82ecfa3d50752b609f13de6790", "reference": "972d8604a92b7054828b539f2febb0211dd5945c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1728,9 +1674,9 @@
}, },
"require-dev": { "require-dev": {
"psr/container": "^1.0", "psr/container": "^1.0",
"symfony/phpunit-bridge": "^4.4.9|^5.0.9" "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
}, },
"time": "2021-05-16T12:14:13+00:00", "time": "2022-02-04T06:59:48+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1771,7 +1717,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.3.2" "source": "https://github.com/twigphp/Twig/tree/v3.3.8"
}, },
"funding": [ "funding": [
{ {

View File

@ -1,22 +1,22 @@
<?php return array( <?php return array(
'root' => array( 'root' => array(
'pretty_version' => 'dev-master', 'pretty_version' => '1.0.0+no-version-set',
'version' => 'dev-master', 'version' => '1.0.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '1c2923a4ddd7f89b3cf38c9594db289b7dd756d3', 'reference' => NULL,
'name' => '__root__', 'name' => '__root__',
'dev' => true, 'dev' => true,
), ),
'versions' => array( 'versions' => array(
'__root__' => array( '__root__' => array(
'pretty_version' => 'dev-master', 'pretty_version' => '1.0.0+no-version-set',
'version' => 'dev-master', 'version' => '1.0.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '1c2923a4ddd7f89b3cf38c9594db289b7dd756d3', 'reference' => NULL,
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'bshaffer/oauth2-server-php' => array( 'bshaffer/oauth2-server-php' => array(
@ -29,21 +29,21 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'ddeboer/imap' => array( 'ddeboer/imap' => array(
'pretty_version' => '1.12.1', 'pretty_version' => '1.13.1',
'version' => '1.12.1.0', 'version' => '1.13.1.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../ddeboer/imap', 'install_path' => __DIR__ . '/../ddeboer/imap',
'aliases' => array(), 'aliases' => array(),
'reference' => 'dbed05ca67b93509345a820b2859de10c48948fb', 'reference' => '8b772d04b1deadb5df13782fb78c4b648f77496e',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'directorytree/ldaprecord' => array( 'directorytree/ldaprecord' => array(
'pretty_version' => 'v2.6.3', 'pretty_version' => 'v2.10.1',
'version' => '2.6.3.0', 'version' => '2.10.1.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../directorytree/ldaprecord', 'install_path' => __DIR__ . '/../directorytree/ldaprecord',
'aliases' => array(), 'aliases' => array(),
'reference' => '5c93ec6d1ef458290825a8b0a148946dce7c1e7a', 'reference' => 'bf512d9af7a7b0e2ed7a666ab29cefdd027bee88',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'exorus/php-mime-mail-parser' => array( 'exorus/php-mime-mail-parser' => array(
@ -53,12 +53,12 @@
), ),
), ),
'illuminate/contracts' => array( 'illuminate/contracts' => array(
'pretty_version' => 'v8.53.1', 'pretty_version' => 'v9.3.0',
'version' => '8.53.1.0', 'version' => '9.3.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../illuminate/contracts', 'install_path' => __DIR__ . '/../illuminate/contracts',
'aliases' => array(), 'aliases' => array(),
'reference' => '504a34286a1b4c5421c43087d6bd4e176138f6fb', 'reference' => 'bf4b3c254c49d28157645d01e4883b5951b1e1d0',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'matthiasmullie/minify' => array( 'matthiasmullie/minify' => array(
@ -95,12 +95,12 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'nesbot/carbon' => array( 'nesbot/carbon' => array(
'pretty_version' => '2.51.1', 'pretty_version' => '2.57.0',
'version' => '2.51.1.0', 'version' => '2.57.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../nesbot/carbon', 'install_path' => __DIR__ . '/../nesbot/carbon',
'aliases' => array(), 'aliases' => array(),
'reference' => '8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922', 'reference' => '4a54375c21eea4811dbd1149fe6b246517554e78',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'paragonie/random_compat' => array( 'paragonie/random_compat' => array(
@ -122,48 +122,48 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phpmailer/phpmailer' => array( 'phpmailer/phpmailer' => array(
'pretty_version' => 'v6.5.0', 'pretty_version' => 'v6.6.0',
'version' => '6.5.0.0', 'version' => '6.6.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'install_path' => __DIR__ . '/../phpmailer/phpmailer',
'aliases' => array(), 'aliases' => array(),
'reference' => 'a5b5c43e50b7fba655f793ad27303cd74c57363c', 'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/container' => array( 'psr/container' => array(
'pretty_version' => '1.1.1', 'pretty_version' => '2.0.2',
'version' => '1.1.1.0', 'version' => '2.0.2.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/container', 'install_path' => __DIR__ . '/../psr/container',
'aliases' => array(), 'aliases' => array(),
'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/log' => array( 'psr/log' => array(
'pretty_version' => '1.1.4', 'pretty_version' => '3.0.0',
'version' => '1.1.4.0', 'version' => '3.0.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/log', 'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(), 'aliases' => array(),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/simple-cache' => array( 'psr/simple-cache' => array(
'pretty_version' => '1.0.1', 'pretty_version' => '2.0.0',
'version' => '1.0.1.0', 'version' => '2.0.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/simple-cache', 'install_path' => __DIR__ . '/../psr/simple-cache',
'aliases' => array(), 'aliases' => array(),
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'reference' => '8707bf3cea6f710bf6ef05491234e3ab06f6432a',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'robthree/twofactorauth' => array( 'robthree/twofactorauth' => array(
'pretty_version' => '1.8.0', 'pretty_version' => '1.8.1',
'version' => '1.8.0.0', 'version' => '1.8.1.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../robthree/twofactorauth', 'install_path' => __DIR__ . '/../robthree/twofactorauth',
'aliases' => array(), 'aliases' => array(),
'reference' => '30a38627ae1e7c9399dae67e265063cd6ec5276c', 'reference' => '5afcb45282f1c75562a48d479ecd1732c9bdb11b',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'soundasleep/html2text' => array( 'soundasleep/html2text' => array(
@ -175,91 +175,82 @@
'reference' => 'cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad', 'reference' => 'cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
'reference' => '5f38c8804a9e97d23e0c8d63341088cd8a22d627',
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array( 'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.23.0', 'pretty_version' => 'v1.24.0',
'version' => '1.23.0.0', 'version' => '1.24.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(), 'aliases' => array(),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => array( 'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.23.1', 'pretty_version' => 'v1.24.0',
'version' => '1.23.1.0', 'version' => '1.24.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(), 'aliases' => array(),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-php80' => array( 'symfony/polyfill-php80' => array(
'pretty_version' => 'v1.23.1', 'pretty_version' => 'v1.24.0',
'version' => '1.23.1.0', 'version' => '1.24.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(), 'aliases' => array(),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/translation' => array( 'symfony/translation' => array(
'pretty_version' => 'v5.3.4', 'pretty_version' => 'v6.0.5',
'version' => '5.3.4.0', 'version' => '6.0.5.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation', 'install_path' => __DIR__ . '/../symfony/translation',
'aliases' => array(), 'aliases' => array(),
'reference' => 'd89ad7292932c2699cbe4af98d72c5c6bbc504c1', 'reference' => 'e69501c71107cc3146b32aaa45f4edd0c3427875',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/translation-contracts' => array( 'symfony/translation-contracts' => array(
'pretty_version' => 'v2.4.0', 'pretty_version' => 'v3.0.0',
'version' => '2.4.0.0', 'version' => '3.0.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation-contracts', 'install_path' => __DIR__ . '/../symfony/translation-contracts',
'aliases' => array(), 'aliases' => array(),
'reference' => '95c812666f3e91db75385749fe219c5e494c7f95', 'reference' => '1b6ea5a7442af5a12dba3dbd6d71034b5b234e77',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/translation-implementation' => array( 'symfony/translation-implementation' => array(
'dev_requirement' => false, 'dev_requirement' => false,
'provided' => array( 'provided' => array(
0 => '2.3', 0 => '2.3|3.0',
), ),
), ),
'symfony/var-dumper' => array( 'symfony/var-dumper' => array(
'pretty_version' => 'v5.3.6', 'pretty_version' => 'v6.0.5',
'version' => '5.3.6.0', 'version' => '6.0.5.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-dumper', 'install_path' => __DIR__ . '/../symfony/var-dumper',
'aliases' => array(), 'aliases' => array(),
'reference' => '3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0', 'reference' => '60d6a756d5f485df5e6e40b337334848f79f61ce',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'tightenco/collect' => array( 'tightenco/collect' => array(
'pretty_version' => 'v8.34.0', 'pretty_version' => 'v8.83.2',
'version' => '8.34.0.0', 'version' => '8.83.2.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../tightenco/collect', 'install_path' => __DIR__ . '/../tightenco/collect',
'aliases' => array(), 'aliases' => array(),
'reference' => 'b069783ab0c547bb894ebcf8e7f6024bb401f9d2', 'reference' => 'd9c66d586ec2d216d8a31283d73f8df1400cc722',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'twig/twig' => array( 'twig/twig' => array(
'pretty_version' => 'v3.3.2', 'pretty_version' => 'v3.3.8',
'version' => '3.3.2.0', 'version' => '3.3.8.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../twig/twig', 'install_path' => __DIR__ . '/../twig/twig',
'aliases' => array(), 'aliases' => array(),
'reference' => '21578f00e83d4a82ecfa3d50752b609f13de6790', 'reference' => '972d8604a92b7054828b539f2febb0211dd5945c',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'yubico/u2flib-server' => array( 'yubico/u2flib-server' => array(

View File

@ -4,8 +4,8 @@
$issues = array(); $issues = array();
if (!(PHP_VERSION_ID >= 70400)) { if (!(PHP_VERSION_ID >= 80002)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.2". You are running ' . PHP_VERSION . '.';
} }
if ($issues) { if ($issues) {

View File

@ -0,0 +1,73 @@
<?php
declare(strict_types=1);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP70Migration:risky' => true, // @TODO with next major version
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['default' => 'align_single_space'],
'blank_line_before_statement' => true,
'class_definition' => ['single_item_single_line' => true],
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'echo_tag_syntax' => ['format' => 'long'],
'error_suppression' => false,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'fully_qualified_strict_types' => true,
'heredoc_to_nowdoc' => true,
'list_syntax' => ['syntax' => 'long'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'native_constant_invocation' => true,
'native_function_invocation' => ['include' => ['@internal']],
'no_alternative_syntax' => true,
'no_break_comment' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'no_superfluous_elseif' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'php_unit_method_casing' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
'php_unit_test_annotation' => true,
'php_unit_test_case_static_method_calls' => true,
'php_unit_test_class_requires_covers' => false,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_order_by_value' => true,
'phpdoc_types_order' => true,
'random_api_migration' => true,
'semicolon_after_instruction' => true,
'simplified_null_return' => true,
'single_line_comment_style' => true,
'single_line_throw' => false,
'space_after_semicolon' => true,
'static_lambda' => true,
'strict_comparison' => true,
'string_line_ending' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
)
;

View File

@ -1,12 +1,12 @@
{ {
"name": "ddeboer/imap", "name": "ddeboer/imap",
"description": "Object-oriented IMAP for PHP", "description": "Object-oriented IMAP for PHP",
"license": "MIT",
"keywords": [ "keywords": [
"email", "email",
"mail", "mail",
"imap" "imap"
], ],
"license": "MIT",
"authors": [ "authors": [
{ {
"name": "David de Boer", "name": "David de Boer",
@ -22,18 +22,19 @@
} }
], ],
"require": { "require": {
"php": "^7.4 || ^8.0", "php": "^8.0.1",
"ext-iconv": "*", "ext-iconv": "*",
"ext-imap": "*", "ext-imap": "*",
"ext-mbstring": "*" "ext-mbstring": "*"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.18.6", "friendsofphp/php-cs-fixer": "^v3.4.0",
"laminas/laminas-mail": "^2.14.0", "laminas/laminas-mail": "^2.15.1",
"phpstan/phpstan": "^0.12.84", "malukenho/mcbumpface": "^1.1.5",
"phpstan/phpstan-phpunit": "^0.12.18", "phpstan/phpstan": "^1.3.3",
"phpstan/phpstan-strict-rules": "^0.12.9", "phpstan/phpstan-phpunit": "^1.0.0",
"phpunit/phpunit": "^9.5.4" "phpstan/phpstan-strict-rules": "^1.1.0",
"phpunit/phpunit": "^9.5.11"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -44,5 +45,10 @@
"psr-4": { "psr-4": {
"Ddeboer\\Imap\\Tests\\": "tests/" "Ddeboer\\Imap\\Tests\\": "tests/"
} }
},
"config": {
"allow-plugins": {
"malukenho/mcbumpface": true
}
} }
} }

View File

@ -117,6 +117,7 @@ final class Connection implements ConnectionInterface
return new Mailbox($this->resource, $name, $this->mailboxNames[$name]); return new Mailbox($this->resource, $name, $this->mailboxNames[$name]);
} }
#[\ReturnTypeWillChange]
public function count() public function count()
{ {
$return = \imap_num_msg($this->resource->getStream()); $return = \imap_num_msg($this->resource->getStream());

View File

@ -6,6 +6,7 @@ namespace Ddeboer\Imap;
use Ddeboer\Imap\Exception\InvalidResourceException; use Ddeboer\Imap\Exception\InvalidResourceException;
use Ddeboer\Imap\Exception\ReopenMailboxException; use Ddeboer\Imap\Exception\ReopenMailboxException;
use IMAP\Connection;
/** /**
* An imap resource stream. * An imap resource stream.
@ -22,7 +23,7 @@ final class ImapResource implements ImapResourceInterface
/** /**
* Constructor. * Constructor.
* *
* @param resource $resource * @param Connection|resource $resource
*/ */
public function __construct($resource, MailboxInterface $mailbox = null) public function __construct($resource, MailboxInterface $mailbox = null)
{ {
@ -32,7 +33,10 @@ final class ImapResource implements ImapResourceInterface
public function getStream() public function getStream()
{ {
if (false === \is_resource($this->resource) || 'imap' !== \get_resource_type($this->resource)) { if (
!$this->resource instanceof Connection
&& (false === \is_resource($this->resource) || 'imap' !== \get_resource_type($this->resource))
) {
throw new InvalidResourceException('Supplied resource is not a valid imap resource'); throw new InvalidResourceException('Supplied resource is not a valid imap resource');
} }
@ -55,8 +59,14 @@ final class ImapResource implements ImapResourceInterface
return; return;
} }
\set_error_handler(static function (): bool {
return true;
});
\imap_reopen($this->resource, $this->mailbox->getFullEncodedName()); \imap_reopen($this->resource, $this->mailbox->getFullEncodedName());
\restore_error_handler();
if (self::isMailboxOpen($this->mailbox, $this->resource)) { if (self::isMailboxOpen($this->mailbox, $this->resource)) {
return; return;
} }

View File

@ -64,6 +64,7 @@ final class Mailbox implements MailboxInterface
return $this->info->delimiter; return $this->info->delimiter;
} }
#[\ReturnTypeWillChange]
public function count() public function count()
{ {
$return = \imap_num_msg($this->resource->getStream()); $return = \imap_num_msg($this->resource->getStream());

View File

@ -268,6 +268,7 @@ abstract class AbstractPart implements PartInterface
* *
* @return mixed * @return mixed
*/ */
#[\ReturnTypeWillChange]
final public function current() final public function current()
{ {
$this->lazyParseStructure(); $this->lazyParseStructure();
@ -275,11 +276,13 @@ abstract class AbstractPart implements PartInterface
return $this->parts[$this->key]; return $this->parts[$this->key];
} }
#[\ReturnTypeWillChange]
final public function getChildren() final public function getChildren()
{ {
return $this->current(); return $this->current();
} }
#[\ReturnTypeWillChange]
final public function hasChildren() final public function hasChildren()
{ {
$this->lazyParseStructure(); $this->lazyParseStructure();
@ -290,21 +293,25 @@ abstract class AbstractPart implements PartInterface
/** /**
* @return int * @return int
*/ */
#[\ReturnTypeWillChange]
final public function key() final public function key()
{ {
return $this->key; return $this->key;
} }
#[\ReturnTypeWillChange]
final public function next() final public function next()
{ {
++$this->key; ++$this->key;
} }
#[\ReturnTypeWillChange]
final public function rewind() final public function rewind()
{ {
$this->key = 0; $this->key = 0;
} }
#[\ReturnTypeWillChange]
final public function valid() final public function valid()
{ {
$this->lazyParseStructure(); $this->lazyParseStructure();

View File

@ -19,6 +19,7 @@ final class EmailAddress
$this->mailbox = $mailbox; $this->mailbox = $mailbox;
$this->hostname = $hostname; $this->hostname = $hostname;
$this->name = $name; $this->name = $name;
$this->address = null;
if (null !== $hostname) { if (null !== $hostname) {
$this->address = $mailbox . '@' . $hostname; $this->address = $mailbox . '@' . $hostname;

View File

@ -9,7 +9,7 @@ use Ddeboer\Imap\Message\PartInterface;
/** /**
* @extends \Iterator<MessageInterface> * @extends \Iterator<MessageInterface>
*/ */
interface MessageIteratorInterface extends \Iterator interface MessageIteratorInterface extends \Iterator, \Countable
{ {
/** /**
* Get current message. * Get current message.

View File

@ -13,7 +13,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest]
php: [8.0, 7.4, 7.3] php: [8.1, 8.0, 7.4, 7.3]
name: ${{ matrix.os }} - P${{ matrix.php }} name: ${{ matrix.os }} - P${{ matrix.php }}
@ -39,3 +39,40 @@ jobs:
- name: Execute tests - name: Execute tests
run: vendor/bin/phpunit run: vendor/bin/phpunit
run-analysis:
runs-on: ${{ matrix.os }}
name: Static code analysis (PHP ${{ matrix.php }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.0]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ldap, json
coverage: none
tools: psalm
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer update --prefer-dist --no-interaction
- name: Run Psalm
run: psalm

View File

@ -1,5 +1,6 @@
vendor vendor
composer.lock composer.lock
psalm.phar
.php_cs.cache .php_cs.cache
.phpunit.result.cache .phpunit.result.cache
.php-cs-fixer.cache .php-cs-fixer.cache

View File

@ -1,4 +1,8 @@
preset: laravel preset: laravel
enabled: enabled:
- phpdoc_align - phpdoc_align
- phpdoc_separation
- unalign_double_arrow - unalign_double_arrow
disabled:
- laravel_phpdoc_alignment
- laravel_phpdoc_separation

View File

@ -32,19 +32,21 @@
"php": ">=7.3", "php": ">=7.3",
"ext-ldap": "*", "ext-ldap": "*",
"ext-json": "*", "ext-json": "*",
"psr/log": "^1.0", "psr/log": "*",
"psr/simple-cache": "^1.0", "psr/simple-cache": "^1.0|^2.0",
"nesbot/carbon": "^1.0|^2.0", "nesbot/carbon": "^1.0|^2.0",
"tightenco/collect": "^5.6|^6.0|^7.0|^8.0", "tightenco/collect": "^5.6|^6.0|^7.0|^8.0",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0" "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^8.0", "phpunit/phpunit": "^9.0",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"spatie/ray": "^1.24" "spatie/ray": "^1.24"
}, },
"archive": { "archive": {
"exclude": ["/tests"] "exclude": [
"/tests"
]
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@ -92,3 +92,13 @@ We've all been there -- accidentally deleting a user or group in Active Director
<p align="center">If you discover a security vulnerability within LdapRecord, please send an e-mail to Steve Bauman via <a href="mailto:steven_bauman@outlook.com">steven_bauman@outlook.com</a>.</p> <p align="center">If you discover a security vulnerability within LdapRecord, please send an e-mail to Steve Bauman via <a href="mailto:steven_bauman@outlook.com">steven_bauman@outlook.com</a>.</p>
<p align="center">All security vulnerabilities will be promptly addressed.</p> <p align="center">All security vulnerabilities will be promptly addressed.</p>
---
<h3 align="center">Credits</h3>
<p align="center">This package is directly inspired from <a href="https://laravel.com/docs/eloquent">Laravel's Eloquent</a>, and most features are direct ports to an LDAP equivalent.</p>
<p align="center">I am forever grateful for the work <a href="https://github.com/taylorotwell">Taylor Otwell</a> has produced.</p>
<p align="center">If you can, support his work by purchasing a <a href="https://github.com/sponsors/taylorotwell">sponsorship</a>, or one of his many Laravel based services.</p>

View File

@ -54,10 +54,10 @@ class Guard
* @param string $password * @param string $password
* @param bool $stayBound * @param bool $stayBound
* *
* @return bool
*
* @throws UsernameRequiredException * @throws UsernameRequiredException
* @throws PasswordRequiredException * @throws PasswordRequiredException
*
* @return bool
*/ */
public function attempt($username, $password, $stayBound = false) public function attempt($username, $password, $stayBound = false)
{ {

View File

@ -124,9 +124,9 @@ class DomainConfiguration
* *
* @param string $key * @param string $key
* *
* @throws ConfigurationException When the option specified does not exist.
*
* @return mixed * @return mixed
*
* @throws ConfigurationException When the option specified does not exist.
*/ */
public function get($key) public function get($key)
{ {
@ -155,9 +155,9 @@ class DomainConfiguration
* @param string $key * @param string $key
* @param mixed $value * @param mixed $value
* *
* @throws ConfigurationException When an option value given is an invalid type.
*
* @return bool * @return bool
*
* @throws ConfigurationException When an option value given is an invalid type.
*/ */
protected function validate($key, $value) protected function validate($key, $value)
{ {

View File

@ -49,9 +49,9 @@ abstract class Validator
/** /**
* Validate the configuration value. * Validate the configuration value.
* *
* @throws ConfigurationException
*
* @return bool * @return bool
*
* @throws ConfigurationException
*/ */
public function validate() public function validate()
{ {
@ -65,9 +65,9 @@ abstract class Validator
/** /**
* Throw a configuration exception. * Throw a configuration exception.
* *
* @throws ConfigurationException
*
* @return void * @return void
*
* @throws ConfigurationException
*/ */
protected function fail() protected function fail()
{ {

View File

@ -111,9 +111,9 @@ class Connection
* *
* @param array $config * @param array $config
* *
* @throws Configuration\ConfigurationException
*
* @return $this * @return $this
*
* @throws Configuration\ConfigurationException
*/ */
public function setConfiguration($config = []) public function setConfiguration($config = [])
{ {
@ -241,10 +241,10 @@ class Connection
* @param string|null $username * @param string|null $username
* @param string|null $password * @param string|null $password
* *
* @return Connection
*
* @throws Auth\BindException * @throws Auth\BindException
* @throws LdapRecordException * @throws LdapRecordException
*
* @return Connection
*/ */
public function connect($username = null, $password = null) public function connect($username = null, $password = null)
{ {
@ -274,10 +274,10 @@ class Connection
/** /**
* Reconnect to the LDAP server. * Reconnect to the LDAP server.
* *
* @return void
*
* @throws Auth\BindException * @throws Auth\BindException
* @throws ConnectionException * @throws ConnectionException
*
* @return void
*/ */
public function reconnect() public function reconnect()
{ {
@ -385,9 +385,9 @@ class Connection
* *
* @param Closure $operation * @param Closure $operation
* *
* @throws LdapRecordException
*
* @return mixed * @return mixed
*
* @throws LdapRecordException
*/ */
protected function runOperationCallback(Closure $operation) protected function runOperationCallback(Closure $operation)
{ {
@ -442,9 +442,9 @@ class Connection
* @param LdapRecordException $e * @param LdapRecordException $e
* @param Closure $operation * @param Closure $operation
* *
* @throws LdapRecordException
*
* @return mixed * @return mixed
*
* @throws LdapRecordException
*/ */
protected function tryAgainIfCausedByLostConnection(LdapRecordException $e, Closure $operation) protected function tryAgainIfCausedByLostConnection(LdapRecordException $e, Closure $operation)
{ {
@ -463,9 +463,9 @@ class Connection
* *
* @param Closure $operation * @param Closure $operation
* *
* @throws LdapRecordException
*
* @return mixed * @return mixed
*
* @throws LdapRecordException
*/ */
protected function retry(Closure $operation) protected function retry(Closure $operation)
{ {
@ -486,9 +486,9 @@ class Connection
* @param LdapRecordException $e * @param LdapRecordException $e
* @param Closure $operation * @param Closure $operation
* *
* @throws LdapRecordException
*
* @return mixed * @return mixed
*
* @throws LdapRecordException
*/ */
protected function retryOnNextHost(LdapRecordException $e, Closure $operation) protected function retryOnNextHost(LdapRecordException $e, Closure $operation)
{ {

View File

@ -149,9 +149,9 @@ class ConnectionManager
* *
* @param string|null $name * @param string|null $name
* *
* @throws ContainerException If the given connection does not exist.
*
* @return Connection * @return Connection
*
* @throws ContainerException If the given connection does not exist.
*/ */
public function get($name = null) public function get($name = null)
{ {

View File

@ -39,11 +39,14 @@ class Logger
{ {
switch (true) { switch (true) {
case $event instanceof AuthEvent: case $event instanceof AuthEvent:
return $this->auth($event); $this->auth($event);
break;
case $event instanceof ModelEvent: case $event instanceof ModelEvent:
return $this->model($event); $this->model($event);
break;
case $event instanceof QueryEvent: case $event instanceof QueryEvent:
return $this->query($event); $this->query($event);
break;
} }
} }

View File

@ -0,0 +1,113 @@
<?php
namespace LdapRecord\Events;
class NullDispatcher implements DispatcherInterface
{
/**
* The underlying dispatcher instance.
*
* @var DispatcherInterface
*/
protected $dispatcher;
/**
* Constructor.
*
* @param DispatcherInterface $dispatcher
*/
public function __construct(DispatcherInterface $dispatcher)
{
$this->dispatcher = $dispatcher;
}
/**
* Register an event listener with the dispatcher.
*
* @param string|array $events
* @param mixed $listener
*
* @return void
*/
public function listen($events, $listener)
{
$this->dispatcher->listen($events, $listener);
}
/**
* Determine if a given event has listeners.
*
* @param string $eventName
*
* @return bool
*/
public function hasListeners($eventName)
{
return $this->dispatcher->hasListeners($eventName);
}
/**
* Fire an event until the first non-null response is returned.
*
* @param string|object $event
* @param mixed $payload
*
* @return null
*/
public function until($event, $payload = [])
{
return null;
}
/**
* Fire an event and call the listeners.
*
* @param string|object $event
* @param mixed $payload
* @param bool $halt
*
* @return null
*/
public function fire($event, $payload = [], $halt = false)
{
return null;
}
/**
* Fire an event and call the listeners.
*
* @param string|object $event
* @param mixed $payload
* @param bool $halt
*
* @return null
*/
public function dispatch($event, $payload = [], $halt = false)
{
return null;
}
/**
* Get all of the listeners for a given event name.
*
* @param string $eventName
*
* @return array
*/
public function getListeners($eventName)
{
return $this->dispatcher->getListeners($eventName);
}
/**
* Remove a set of listeners from the dispatcher.
*
* @param string $event
*
* @return void
*/
public function forget($event)
{
$this->dispatcher->forget($event);
}
}

View File

@ -150,19 +150,21 @@ trait HandlesConnection
* *
* @param Closure $operation * @param Closure $operation
* *
* @throws LdapRecordException
*
* @return mixed * @return mixed
*
* @throws LdapRecordException
*/ */
protected function executeFailableOperation(Closure $operation) protected function executeFailableOperation(Closure $operation)
{ {
// If some older versions of PHP, errors are reported instead of throwing // If some older versions of PHP, errors are reported instead of throwing
// exceptions, which could be a signifcant detriment to our application. // exceptions, which could be a significant detriment to our application.
// Here, we will enforce these operations to throw exceptions instead. // Here, we will enforce these operations to throw exceptions instead.
set_error_handler(function ($severity, $message, $file, $line) { set_error_handler(function (int $severity, string $message, string $file, int $line): bool {
if (! $this->shouldBypassError($message)) { if (! $this->shouldBypassError($message)) {
throw new ErrorException($message, $severity, $severity, $file, $line); throw new ErrorException($message, $severity, $severity, $file, $line);
} }
return true;
}); });
try { try {

View File

@ -2,6 +2,9 @@
namespace LdapRecord; namespace LdapRecord;
use LDAP\Connection as RawLdapConnection;
/** @psalm-suppress UndefinedClass */
class Ldap implements LdapInterface class Ldap implements LdapInterface
{ {
use HandlesConnection, DetectsErrors; use HandlesConnection, DetectsErrors;
@ -104,7 +107,7 @@ class Ldap implements LdapInterface
public function getLastError() public function getLastError()
{ {
if (! $this->connection) { if (! $this->connection) {
return; return null;
} }
return ldap_error($this->connection); return ldap_error($this->connection);
@ -116,7 +119,7 @@ class Ldap implements LdapInterface
public function getDetailedError() public function getDetailedError()
{ {
if (! $number = $this->errNo()) { if (! $number = $this->errNo()) {
return; return null;
} }
$this->getOption(LDAP_OPT_DIAGNOSTIC_MESSAGE, $message); $this->getOption(LDAP_OPT_DIAGNOSTIC_MESSAGE, $message);
@ -202,7 +205,9 @@ class Ldap implements LdapInterface
*/ */
public function close() public function close()
{ {
$result = is_resource($this->connection) ? @ldap_close($this->connection) : false; $result = (is_resource($this->connection) || $this->connection instanceof RawLdapConnection)
? @ldap_close($this->connection)
: false;
$this->connection = null; $this->connection = null;
$this->bound = false; $this->bound = false;
@ -214,7 +219,7 @@ class Ldap implements LdapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = [])
{ {
return $this->executeFailableOperation(function () use ( return $this->executeFailableOperation(function () use (
$dn, $dn,
@ -235,7 +240,7 @@ class Ldap implements LdapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = [])
{ {
return $this->executeFailableOperation(function () use ( return $this->executeFailableOperation(function () use (
$dn, $dn,
@ -256,7 +261,7 @@ class Ldap implements LdapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = [])
{ {
return $this->executeFailableOperation(function () use ( return $this->executeFailableOperation(function () use (
$dn, $dn,

View File

@ -156,7 +156,7 @@ interface LdapInterface
/** /**
* Return detailed information about an error. * Return detailed information about an error.
* *
* Returns false when there was a successful last request. * Returns null when there was a successful last request.
* *
* Returns DetailedError when there was an error. * Returns DetailedError when there was an error.
* *
@ -202,9 +202,9 @@ interface LdapInterface
* *
* @see http://php.net/manual/en/function.ldap-start-tls.php * @see http://php.net/manual/en/function.ldap-start-tls.php
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function startTLS(); public function startTLS();
@ -247,7 +247,7 @@ interface LdapInterface
* *
* @return resource * @return resource
*/ */
public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []); public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []);
/** /**
* Performs a single level search on the current connection. * Performs a single level search on the current connection.
@ -265,7 +265,7 @@ interface LdapInterface
* *
* @return resource * @return resource
*/ */
public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []); public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []);
/** /**
* Reads an entry on the current connection. * Reads an entry on the current connection.
@ -283,7 +283,7 @@ interface LdapInterface
* *
* @return resource * @return resource
*/ */
public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []); public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []);
/** /**
* Extract information from an LDAP result. * Extract information from an LDAP result.
@ -292,10 +292,10 @@ interface LdapInterface
* *
* @param resource $result * @param resource $result
* @param int $errorCode * @param int $errorCode
* @param string $dn * @param ?string $dn
* @param string $errorMessage * @param ?string $errorMessage
* @param array $referrals * @param ?array $referrals
* @param array $serverControls * @param ?array $serverControls
* *
* @return bool * @return bool
*/ */
@ -310,9 +310,9 @@ interface LdapInterface
* @param string $username * @param string $username
* @param string $password * @param string $password
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function bind($username, $password); public function bind($username, $password);
@ -324,9 +324,9 @@ interface LdapInterface
* @param string $dn * @param string $dn
* @param array $entry * @param array $entry
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function add($dn, array $entry); public function add($dn, array $entry);
@ -337,9 +337,9 @@ interface LdapInterface
* *
* @param string $dn * @param string $dn
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function delete($dn); public function delete($dn);
@ -353,9 +353,9 @@ interface LdapInterface
* @param string $newParent * @param string $newParent
* @param bool $deleteOldRdn * @param bool $deleteOldRdn
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function rename($dn, $newRdn, $newParent, $deleteOldRdn = false); public function rename($dn, $newRdn, $newParent, $deleteOldRdn = false);
@ -367,9 +367,9 @@ interface LdapInterface
* @param string $dn * @param string $dn
* @param array $entry * @param array $entry
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function modify($dn, array $entry); public function modify($dn, array $entry);
@ -381,9 +381,9 @@ interface LdapInterface
* @param string $dn * @param string $dn
* @param array $values * @param array $values
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function modifyBatch($dn, array $values); public function modifyBatch($dn, array $values);
@ -395,9 +395,9 @@ interface LdapInterface
* @param string $dn * @param string $dn
* @param array $entry * @param array $entry
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function modAdd($dn, array $entry); public function modAdd($dn, array $entry);
@ -409,9 +409,9 @@ interface LdapInterface
* @param string $dn * @param string $dn
* @param array $entry * @param array $entry
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function modReplace($dn, array $entry); public function modReplace($dn, array $entry);
@ -423,9 +423,9 @@ interface LdapInterface
* @param string $dn * @param string $dn
* @param array $entry * @param array $entry
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function modDelete($dn, array $entry); public function modDelete($dn, array $entry);

View File

@ -78,7 +78,7 @@ class Entry extends BaseEntry implements ActiveDirectory
*/ */
public function isDeleted() public function isDeleted()
{ {
return strtoupper($this->getFirstAttribute('isDeleted')) === 'TRUE'; return strtoupper((string) $this->getFirstAttribute('isDeleted')) === 'TRUE';
} }
/** /**
@ -86,9 +86,9 @@ class Entry extends BaseEntry implements ActiveDirectory
* *
* @param string|null $newParentDn * @param string|null $newParentDn
* *
* @throws \LdapRecord\LdapRecordException
*
* @return bool * @return bool
*
* @throws \LdapRecord\LdapRecordException
*/ */
public function restore($newParentDn = null) public function restore($newParentDn = null)
{ {
@ -109,10 +109,9 @@ class Entry extends BaseEntry implements ActiveDirectory
} }
}); });
$this->save([ $this->setRawAttribute('distinguishedname', $newDn);
'isDeleted' => null,
'distinguishedName' => $newDn, $this->save(['isDeleted' => null]);
]);
} }
/** /**
@ -120,9 +119,9 @@ class Entry extends BaseEntry implements ActiveDirectory
* *
* @param string|null $connection * @param string|null $connection
* *
* @throws \LdapRecord\Models\ModelNotFoundException
*
* @return static * @return static
*
* @throws \LdapRecord\Models\ModelNotFoundException
*/ */
public static function getRootDse($connection = null) public static function getRootDse($connection = null)
{ {

View File

@ -63,7 +63,7 @@ class Group extends Entry
*/ */
public function getRidAttribute() public function getRidAttribute()
{ {
$objectSidComponents = explode('-', $this->getConvertedSid()); $objectSidComponents = explode('-', (string) $this->getConvertedSid());
return [end($objectSidComponents)]; return [end($objectSidComponents)];
} }

View File

@ -15,9 +15,9 @@ class InConfigurationContext implements Scope
* @param Builder $query * @param Builder $query
* @param Model $model * @param Model $model
* *
* @throws \LdapRecord\Models\ModelNotFoundException
*
* @return void * @return void
*
* @throws \LdapRecord\Models\ModelNotFoundException
*/ */
public function apply(Builder $query, Model $model) public function apply(Builder $query, Model $model)
{ {
@ -29,9 +29,9 @@ class InConfigurationContext implements Scope
* *
* @param Model $model * @param Model $model
* *
* @throws \LdapRecord\Models\ModelNotFoundException
*
* @return mixed * @return mixed
*
* @throws \LdapRecord\Models\ModelNotFoundException
*/ */
protected function getConfigurationNamingContext(Model $model) protected function getConfigurationNamingContext(Model $model)
{ {

View File

@ -2,6 +2,7 @@
namespace LdapRecord\Models\ActiveDirectory; namespace LdapRecord\Models\ActiveDirectory;
use Carbon\Carbon;
use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\Authenticatable;
use LdapRecord\Models\ActiveDirectory\Concerns\HasPrimaryGroup; use LdapRecord\Models\ActiveDirectory\Concerns\HasPrimaryGroup;
use LdapRecord\Models\ActiveDirectory\Scopes\RejectComputerObjectClass; use LdapRecord\Models\ActiveDirectory\Scopes\RejectComputerObjectClass;
@ -117,4 +118,42 @@ class User extends Entry implements Authenticatable
{ {
return $query->whereHas('msExchMailboxGuid'); return $query->whereHas('msExchMailboxGuid');
} }
/**
* Scopes the query to users having a lockout value set.
*
* @param Builder $query
*
* @return Builder
*/
public function scopeWhereHasLockout(Builder $query)
{
return $query->where('lockoutTime', '>=', 1);
}
/**
* Determine if the user is locked out using the domains LockoutDuration group policy value.
*
* @see https://ldapwiki.com/wiki/Active%20Directory%20Account%20Lockout
* @see https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/account-lockout-duration
*
* @param string|int $localTimezone
* @param int|null $durationInMinutes
*
* @return bool
*/
public function isLockedOut($localTimezone, $durationInMinutes = null)
{
$time = $this->getFirstAttribute('lockouttime');
if (! $time instanceof Carbon) {
return false;
}
is_int($localTimezone)
? $time->addMinutes($localTimezone)
: $time->setTimezone($localTimezone)->addMinutes($durationInMinutes ?: 0);
return ! $time->isPast();
}
} }

View File

@ -53,14 +53,14 @@ class AccountControl
/** /**
* The account control flag values. * The account control flag values.
* *
* @var array * @var array<int, int>
*/ */
protected $values = []; protected $values = [];
/** /**
* Constructor. * Constructor.
* *
* @param int $flag * @param ?int $flag
*/ */
public function __construct($flag = null) public function __construct($flag = null)
{ {
@ -431,7 +431,7 @@ class AccountControl
/** /**
* Get the account control flag values. * Get the account control flag values.
* *
* @return array * @return array<int, int>
*/ */
public function getValues() public function getValues()
{ {
@ -441,7 +441,7 @@ class AccountControl
/** /**
* Set the account control values. * Set the account control values.
* *
* @param array $flags * @param array<int, int> $flags
* *
* @return void * @return void
*/ */

View File

@ -12,7 +12,7 @@ class DistinguishedName
/** /**
* The underlying raw value. * The underlying raw value.
* *
* @var string|null * @var string
*/ */
protected $value; protected $value;
@ -23,7 +23,7 @@ class DistinguishedName
*/ */
public function __construct($value = null) public function __construct($value = null)
{ {
$this->value = trim($value); $this->value = trim((string) $value);
} }
/** /**
@ -72,6 +72,18 @@ class DistinguishedName
return new static($value); return new static($value);
} }
/**
* Determine if the given value is a valid distinguished name.
*
* @param string $value
*
* @return bool
*/
public static function isValid($value)
{
return ! static::make($value)->isEmpty();
}
/** /**
* Explode a distinguished name into relative distinguished names. * Explode a distinguished name into relative distinguished names.
* *
@ -81,19 +93,19 @@ class DistinguishedName
*/ */
public static function explode($dn) public static function explode($dn)
{ {
$dn = ldap_explode_dn($dn, $withoutAttributes = false); $components = ldap_explode_dn($dn, (int) $withoutAttributes = false);
if (! is_array($dn)) { if (! is_array($components)) {
return []; return [];
} }
if (! array_key_exists('count', $dn)) { if (! array_key_exists('count', $components)) {
return []; return [];
} }
unset($dn['count']); unset($components['count']);
return $dn; return $components;
} }
/** /**
@ -310,6 +322,18 @@ class DistinguishedName
return implode(',', $components) ?: null; return implode(',', $components) ?: null;
} }
/**
* Determine if the distinguished name is empty.
*
* @return bool
*/
public function isEmpty()
{
return empty(
array_filter($this->values())
);
}
/** /**
* Determine if the current distinguished name is a parent of the given child. * Determine if the current distinguished name is a parent of the given child.
* *

View File

@ -236,7 +236,7 @@ class DistinguishedNameBuilder
/** /**
* Build the distinguished name from the components. * Build the distinguished name from the components.
* *
* @return $this * @return string
*/ */
protected function build() protected function build()
{ {

View File

@ -34,7 +34,7 @@ class EscapedValue
*/ */
public function __construct($value, $ignore = '', $flags = 0) public function __construct($value, $ignore = '', $flags = 0)
{ {
$this->value = $value; $this->value = (string) $value;
$this->ignore = $ignore; $this->ignore = $ignore;
$this->flags = $flags; $this->flags = $flags;
} }
@ -59,6 +59,16 @@ class EscapedValue
return ldap_escape($this->value, $this->ignore, $this->flags); return ldap_escape($this->value, $this->ignore, $this->flags);
} }
/**
* Get the raw (unescaped) value.
*
* @return mixed
*/
public function raw()
{
return $this->value;
}
/** /**
* Set the characters to exclude from being escaped. * Set the characters to exclude from being escaped.
* *

View File

@ -244,9 +244,9 @@ class Password
* *
* @param int $type * @param int $type
* *
* @throws InvalidArgumentException
*
* @return array * @return array
*
* @throws InvalidArgumentException
*/ */
protected static function makeCryptPrefixAndLength($type) protected static function makeCryptPrefixAndLength($type)
{ {
@ -297,9 +297,9 @@ class Password
/** /**
* Attempt to retrieve a salt from the encrypted password. * Attempt to retrieve a salt from the encrypted password.
* *
* @throws LdapRecordException
*
* @return string * @return string
*
* @throws LdapRecordException
*/ */
public static function getSalt($encryptedPassword) public static function getSalt($encryptedPassword)
{ {
@ -321,9 +321,9 @@ class Password
* *
* @param string $method * @param string $method
* *
* @throws \ReflectionException
*
* @return bool * @return bool
*
* @throws \ReflectionException
*/ */
public static function hashMethodRequiresSalt($method): bool public static function hashMethodRequiresSalt($method): bool
{ {

View File

@ -61,9 +61,9 @@ class Timestamp
* *
* @param mixed $value * @param mixed $value
* *
* @throws LdapRecordException
*
* @return float|string * @return float|string
*
* @throws LdapRecordException
*/ */
public function fromDateTime($value) public function fromDateTime($value)
{ {
@ -121,9 +121,9 @@ class Timestamp
* *
* @param mixed $value * @param mixed $value
* *
* @throws LdapRecordException
*
* @return Carbon|false * @return Carbon|false
*
* @throws LdapRecordException
*/ */
public function toDateTime($value) public function toDateTime($value)
{ {
@ -155,7 +155,7 @@ class Timestamp
* *
* @param string $value * @param string $value
* *
* @return DateTime|bool * @return DateTime|false
*/ */
protected function convertLdapTimeToDateTime($value) protected function convertLdapTimeToDateTime($value)
{ {
@ -184,7 +184,7 @@ class Timestamp
* *
* @param string $value * @param string $value
* *
* @return DateTime|bool * @return DateTime|false
*/ */
protected function convertWindowsTimeToDateTime($value) protected function convertWindowsTimeToDateTime($value)
{ {
@ -213,9 +213,9 @@ class Timestamp
* *
* @param int $value * @param int $value
* *
* @throws \Exception * @return DateTime|false
* *
* @return DateTime|bool * @throws \Exception
*/ */
protected function convertWindowsIntegerTimeToDateTime($value) protected function convertWindowsIntegerTimeToDateTime($value)
{ {

View File

@ -31,6 +31,7 @@ trait CanAuthenticate
*/ */
public function getAuthPassword() public function getAuthPassword()
{ {
return '';
} }
/** /**
@ -40,6 +41,7 @@ trait CanAuthenticate
*/ */
public function getRememberToken() public function getRememberToken()
{ {
return '';
} }
/** /**
@ -60,5 +62,6 @@ trait CanAuthenticate
*/ */
public function getRememberTokenName() public function getRememberTokenName()
{ {
return '';
} }
} }

View File

@ -238,26 +238,28 @@ trait HasAttributes
* Returns the models attribute by its key. * Returns the models attribute by its key.
* *
* @param int|string $key * @param int|string $key
* @param mixed $default
* *
* @return mixed * @return mixed
*/ */
public function getAttribute($key) public function getAttribute($key, $default = null)
{ {
if (! $key) { if (! $key) {
return; return;
} }
return $this->getAttributeValue($key); return $this->getAttributeValue($key, $default);
} }
/** /**
* Get an attributes value. * Get an attributes value.
* *
* @param string $key * @param string $key
* @param mixed $default
* *
* @return mixed * @return mixed
*/ */
public function getAttributeValue($key) public function getAttributeValue($key, $default = null)
{ {
$key = $this->normalizeAttributeKey($key); $key = $this->normalizeAttributeKey($key);
$value = $this->getAttributeFromArray($key); $value = $this->getAttributeFromArray($key);
@ -274,7 +276,7 @@ trait HasAttributes
return $this->castAttribute($key, $value); return $this->castAttribute($key, $value);
} }
return $value; return is_null($value) ? $default : $value;
} }
/** /**
@ -311,9 +313,9 @@ trait HasAttributes
* @param string $type * @param string $type
* @param mixed $value * @param mixed $value
* *
* @throws LdapRecordException
*
* @return float|string * @return float|string
*
* @throws LdapRecordException
*/ */
public function fromDateTime($type, $value) public function fromDateTime($type, $value)
{ {
@ -326,9 +328,9 @@ trait HasAttributes
* @param mixed $value * @param mixed $value
* @param string $type * @param string $type
* *
* @throws LdapRecordException
*
* @return Carbon|false * @return Carbon|false
*
* @throws LdapRecordException
*/ */
public function asDateTime($value, $type) public function asDateTime($value, $type)
{ {
@ -686,13 +688,14 @@ trait HasAttributes
* Returns the first attribute by the specified key. * Returns the first attribute by the specified key.
* *
* @param string $key * @param string $key
* @param mixed $default
* *
* @return mixed * @return mixed
*/ */
public function getFirstAttribute($key) public function getFirstAttribute($key, $default = null)
{ {
return Arr::first( return Arr::first(
Arr::wrap($this->getAttribute($key)) Arr::wrap($this->getAttribute($key, $default)),
); );
} }
@ -707,10 +710,10 @@ trait HasAttributes
} }
/** /**
* Set an attribute value by the specified key and sub-key. * Set an attribute value by the specified key.
* *
* @param mixed $key * @param string $key
* @param mixed $value * @param mixed $value
* *
* @return $this * @return $this
*/ */
@ -737,6 +740,23 @@ trait HasAttributes
return $this; return $this;
} }
/**
* Set an attribute on the model. No checking is done.
*
* @param string $key
* @param mixed $value
*
* @return $this
*/
public function setRawAttribute($key, $value)
{
$key = $this->normalizeAttributeKey($key);
$this->attributes[$key] = Arr::wrap($value);
return $this;
}
/** /**
* Set the models first attribute value. * Set the models first attribute value.
* *

View File

@ -3,10 +3,39 @@
namespace LdapRecord\Models\Concerns; namespace LdapRecord\Models\Concerns;
use Closure; use Closure;
use LdapRecord\Events\NullDispatcher;
use LdapRecord\Models\Events\Event; use LdapRecord\Models\Events\Event;
trait HasEvents trait HasEvents
{ {
/**
* Execute the callback without raising any events.
*
* @param Closure $callback
*
* @return mixed
*/
protected static function withoutEvents(Closure $callback)
{
$container = static::getConnectionContainer();
$dispatcher = $container->getEventDispatcher();
if ($dispatcher) {
$container->setEventDispatcher(
new NullDispatcher($dispatcher)
);
}
try {
return $callback();
} finally {
if ($dispatcher) {
$container->setEventDispatcher($dispatcher);
}
}
}
/** /**
* Fires the specified model event. * Fires the specified model event.
* *

View File

@ -14,9 +14,9 @@ trait HasGlobalScopes
* @param Scope|Closure|string $scope * @param Scope|Closure|string $scope
* @param Closure|null $implementation * @param Closure|null $implementation
* *
* @throws InvalidArgumentException
*
* @return mixed * @return mixed
*
* @throws InvalidArgumentException
*/ */
public static function addGlobalScope($scope, Closure $implementation = null) public static function addGlobalScope($scope, Closure $implementation = null)
{ {

View File

@ -159,9 +159,9 @@ trait HasPassword
* @param string $password * @param string $password
* @param string $salt * @param string $salt
* *
* @throws LdapRecordException
*
* @return string * @return string
*
* @throws LdapRecordException
*/ */
protected function getHashedPassword($method, $password, $salt = null) protected function getHashedPassword($method, $password, $salt = null)
{ {
@ -179,9 +179,9 @@ trait HasPassword
/** /**
* Validates that the current LDAP connection is secure. * Validates that the current LDAP connection is secure.
* *
* @throws ConnectionException
*
* @return void * @return void
*
* @throws ConnectionException
*/ */
protected function validateSecureConnection() protected function validateSecureConnection()
{ {

View File

@ -3,6 +3,7 @@
namespace LdapRecord\Models; namespace LdapRecord\Models;
use ArrayAccess; use ArrayAccess;
use Illuminate\Contracts\Support\Arrayable;
use InvalidArgumentException; use InvalidArgumentException;
use JsonSerializable; use JsonSerializable;
use LdapRecord\Connection; use LdapRecord\Connection;
@ -17,7 +18,7 @@ use LdapRecord\Support\Arr;
use UnexpectedValueException; use UnexpectedValueException;
/** @mixin Builder */ /** @mixin Builder */
abstract class Model implements ArrayAccess, JsonSerializable abstract class Model implements ArrayAccess, Arrayable, JsonSerializable
{ {
use EscapesValues; use EscapesValues;
use Concerns\HasEvents; use Concerns\HasEvents;
@ -28,7 +29,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
use Concerns\HasRelationships; use Concerns\HasRelationships;
/** /**
* Indicates if the model exists in the LDAP directory. * Indicates if the model exists in the directory.
* *
* @var bool * @var bool
*/ */
@ -63,7 +64,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
protected $in; protected $in;
/** /**
* The object classes of the LDAP model. * The object classes of the model.
* *
* @var array * @var array
*/ */
@ -77,7 +78,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
protected static $container; protected static $container;
/** /**
* The LDAP connection name for the model. * The connection name for the model.
* *
* @var string|null * @var string|null
*/ */
@ -138,7 +139,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
} }
/** /**
* The "booting" method of the model. * The "boot" method of the model.
* *
* @return void * @return void
*/ */
@ -204,7 +205,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @param string $dn * @param string $dn
* *
* @return static * @return $this
*/ */
public function setDn($dn) public function setDn($dn)
{ {
@ -214,7 +215,31 @@ abstract class Model implements ArrayAccess, JsonSerializable
} }
/** /**
* Get the LDAP connection for the model. * A mutator for setting the models distinguished name.
*
* @param string $dn
*
* @return $this
*/
public function setDnAttribute($dn)
{
return $this->setRawAttribute('dn', $dn)->setDn($dn);
}
/**
* A mutator for setting the models distinguished name.
*
* @param string $dn
*
* @return $this
*/
public function setDistinguishedNameAttribute($dn)
{
return $this->setRawAttribute('distinguishedname', $dn)->setDn($dn);
}
/**
* Get the connection for the model.
* *
* @return Connection * @return Connection
*/ */
@ -275,6 +300,18 @@ abstract class Model implements ArrayAccess, JsonSerializable
return static::query()->select($attributes)->paginate(); return static::query()->select($attributes)->paginate();
} }
/**
* Make a new model instance.
*
* @param array $attributes
*
* @return static
*/
public static function make($attributes = [])
{
return new static($attributes);
}
/** /**
* Begin querying the model. * Begin querying the model.
* *
@ -501,6 +538,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @return bool * @return bool
*/ */
#[\ReturnTypeWillChange]
public function offsetExists($offset) public function offsetExists($offset)
{ {
return ! is_null($this->getAttribute($offset)); return ! is_null($this->getAttribute($offset));
@ -513,6 +551,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @return mixed * @return mixed
*/ */
#[\ReturnTypeWillChange]
public function offsetGet($offset) public function offsetGet($offset)
{ {
return $this->getAttribute($offset); return $this->getAttribute($offset);
@ -526,6 +565,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @return void * @return void
*/ */
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
{ {
$this->setAttribute($offset, $value); $this->setAttribute($offset, $value);
@ -538,6 +578,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @return void * @return void
*/ */
#[\ReturnTypeWillChange]
public function offsetUnset($offset) public function offsetUnset($offset)
{ {
unset($this->attributes[$offset]); unset($this->attributes[$offset]);
@ -568,15 +609,26 @@ abstract class Model implements ArrayAccess, JsonSerializable
} }
/** /**
* Convert the object into something JSON serializable. * Convert the model to its JSON encodeable array form.
* *
* @return array * @return array
*/ */
public function jsonSerialize() public function toArray()
{ {
return $this->attributesToArray(); return $this->attributesToArray();
} }
/**
* Convert the model's attributes into JSON encodeable values.
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
}
/** /**
* Converts extra attributes for JSON serialization. * Converts extra attributes for JSON serialization.
* *
@ -615,17 +667,31 @@ abstract class Model implements ArrayAccess, JsonSerializable
/** /**
* Determine if two models have the same distinguished name and belong to the same connection. * Determine if two models have the same distinguished name and belong to the same connection.
* *
* @param static $model * @param Model|null $model
* *
* @return bool * @return bool
*/ */
public function is(self $model) public function is($model)
{ {
return $this->dn == $model->getDn() && $this->getConnectionName() == $model->getConnectionName(); return ! is_null($model)
&& $this->dn == $model->getDn()
&& $this->getConnectionName() == $model->getConnectionName();
} }
/** /**
* Hydrate a new collection of models from LDAP search results. * Determine if two models are not the same.
*
* @param Model|null $model
*
* @return bool
*/
public function isNot($model)
{
return ! $this->is($model);
}
/**
* Hydrate a new collection of models from search results.
* *
* @param array $records * @param array $records
* *
@ -714,9 +780,9 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @param array|BatchModification $mod * @param array|BatchModification $mod
* *
* @throws InvalidArgumentException
*
* @return $this * @return $this
*
* @throws InvalidArgumentException
*/ */
public function addModification($mod = []) public function addModification($mod = [])
{ {
@ -818,7 +884,7 @@ abstract class Model implements ArrayAccess, JsonSerializable
/** /**
* Get the model's object GUID key. * Get the model's object GUID key.
* *
* @return void * @return string
*/ */
public function getObjectGuidKey() public function getObjectGuidKey()
{ {
@ -942,14 +1008,30 @@ abstract class Model implements ArrayAccess, JsonSerializable
return $this; return $this;
} }
/**
* Save the model to the directory without raising any events.
*
* @param array $attributes
*
* @return void
*
* @throws \LdapRecord\LdapRecordException
*/
public function saveQuietly(array $attributes = [])
{
static::withoutEvents(function () use ($attributes) {
$this->save($attributes);
});
}
/** /**
* Save the model to the directory. * Save the model to the directory.
* *
* @param array $attributes The attributes to update or create for the current entry. * @param array $attributes The attributes to update or create for the current entry.
* *
* @throws \LdapRecord\LdapRecordException
*
* @return void * @return void
*
* @throws \LdapRecord\LdapRecordException
*/ */
public function save(array $attributes = []) public function save(array $attributes = [])
{ {
@ -967,9 +1049,9 @@ abstract class Model implements ArrayAccess, JsonSerializable
/** /**
* Inserts the model into the directory. * Inserts the model into the directory.
* *
* @throws \LdapRecord\LdapRecordException
*
* @return void * @return void
*
* @throws \LdapRecord\LdapRecordException
*/ */
protected function performInsert() protected function performInsert()
{ {
@ -1009,9 +1091,9 @@ abstract class Model implements ArrayAccess, JsonSerializable
/** /**
* Updates the model in the directory. * Updates the model in the directory.
* *
* @throws \LdapRecord\LdapRecordException
*
* @return void * @return void
*
* @throws \LdapRecord\LdapRecordException
*/ */
protected function performUpdate() protected function performUpdate()
{ {
@ -1035,9 +1117,9 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @param array $attributes The attributes for the new entry. * @param array $attributes The attributes for the new entry.
* *
* @throws \LdapRecord\LdapRecordException
*
* @return Model * @return Model
*
* @throws \LdapRecord\LdapRecordException
*/ */
public static function create(array $attributes = []) public static function create(array $attributes = [])
{ {
@ -1054,14 +1136,14 @@ abstract class Model implements ArrayAccess, JsonSerializable
* @param string $attribute The attribute to create * @param string $attribute The attribute to create
* @param mixed $value The value of the new attribute * @param mixed $value The value of the new attribute
* *
* @return void
*
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function createAttribute($attribute, $value) public function createAttribute($attribute, $value)
{ {
$this->validateExistence(); $this->requireExistence();
$this->newQuery()->insertAttributes($this->dn, [$attribute => (array) $value]); $this->newQuery()->insertAttributes($this->dn, [$attribute => (array) $value]);
@ -1073,14 +1155,14 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @param array $attributes The attributes to update for the current entry. * @param array $attributes The attributes to update for the current entry.
* *
* @return void
*
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function update(array $attributes = []) public function update(array $attributes = [])
{ {
$this->validateExistence(); $this->requireExistence();
$this->save($attributes); $this->save($attributes);
} }
@ -1091,14 +1173,14 @@ abstract class Model implements ArrayAccess, JsonSerializable
* @param string $attribute The attribute to modify * @param string $attribute The attribute to modify
* @param mixed $value The new value for the attribute * @param mixed $value The new value for the attribute
* *
* @return void
*
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function updateAttribute($attribute, $value) public function updateAttribute($attribute, $value)
{ {
$this->validateExistence(); $this->requireExistence();
$this->newQuery()->updateAttributes($this->dn, [$attribute => (array) $value]); $this->newQuery()->updateAttributes($this->dn, [$attribute => (array) $value]);
@ -1111,9 +1193,9 @@ abstract class Model implements ArrayAccess, JsonSerializable
* @param Collection|array|string $dns * @param Collection|array|string $dns
* @param bool $recursive * @param bool $recursive
* *
* @throws \LdapRecord\LdapRecordException
*
* @return int * @return int
*
* @throws \LdapRecord\LdapRecordException
*/ */
public static function destroy($dns, $recursive = false) public static function destroy($dns, $recursive = false)
{ {
@ -1144,14 +1226,14 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* @param bool $recursive Whether to recursively delete leaf nodes (models that are children). * @param bool $recursive Whether to recursively delete leaf nodes (models that are children).
* *
* @return void
*
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function delete($recursive = false) public function delete($recursive = false)
{ {
$this->validateExistence(); $this->requireExistence();
$this->fireModelEvent(new Events\Deleting($this)); $this->fireModelEvent(new Events\Deleting($this));
@ -1172,18 +1254,17 @@ abstract class Model implements ArrayAccess, JsonSerializable
/** /**
* Deletes leaf nodes that are attached to the model. * Deletes leaf nodes that are attached to the model.
* *
* @throws \LdapRecord\LdapRecordException * @return void
* *
* @return Collection * @throws \LdapRecord\LdapRecordException
*/ */
protected function deleteLeafNodes() protected function deleteLeafNodes()
{ {
return $this->newQueryWithoutScopes() $this->newQueryWithoutScopes()
->in($this->dn) ->in($this->dn)
->listing() ->listing()
->paginate() ->chunk(250, function ($models) {
->each(function (self $model) { $models->each->delete($recursive = true);
$model->delete($recursive = true);
}); });
} }
@ -1200,14 +1281,14 @@ abstract class Model implements ArrayAccess, JsonSerializable
* *
* ["memberuid" => []] * ["memberuid" => []]
* *
* @return void
*
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function deleteAttribute($attributes) public function deleteAttribute($attributes)
{ {
$this->validateExistence(); $this->requireExistence();
$attributes = $this->makeDeletableAttributes($attributes); $attributes = $this->makeDeletableAttributes($attributes);
@ -1261,15 +1342,15 @@ abstract class Model implements ArrayAccess, JsonSerializable
* @param static|string $newParentDn The new parent of the current model. * @param static|string $newParentDn The new parent of the current model.
* @param bool $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved. * @param bool $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved.
* *
* @return void
*
* @throws UnexpectedValueException * @throws UnexpectedValueException
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function move($newParentDn, $deleteOldRdn = true) public function move($newParentDn, $deleteOldRdn = true)
{ {
$this->validateExistence(); $this->requireExistence();
if (! $rdn = $this->getRdn()) { if (! $rdn = $this->getRdn()) {
throw new UnexpectedValueException('Current model does not contain an RDN to move.'); throw new UnexpectedValueException('Current model does not contain an RDN to move.');
@ -1285,14 +1366,14 @@ abstract class Model implements ArrayAccess, JsonSerializable
* @param static|string|null $newParentDn The models new parent distinguished name (if moving). Leave this null if you are only renaming. Example: "ou=MovedUsers,dc=acme,dc=org" * @param static|string|null $newParentDn The models new parent distinguished name (if moving). Leave this null if you are only renaming. Example: "ou=MovedUsers,dc=acme,dc=org"
* @param bool|true $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved. * @param bool|true $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved.
* *
* @return void
*
* @throws ModelDoesNotExistException * @throws ModelDoesNotExistException
* @throws \LdapRecord\LdapRecordException * @throws \LdapRecord\LdapRecordException
*
* @return void
*/ */
public function rename($rdn, $newParentDn = null, $deleteOldRdn = true) public function rename($rdn, $newParentDn = null, $deleteOldRdn = true)
{ {
$this->validateExistence(); $this->requireExistence();
if ($newParentDn instanceof self) { if ($newParentDn instanceof self) {
$newParentDn = $newParentDn->getDn(); $newParentDn = $newParentDn->getDn();
@ -1312,6 +1393,13 @@ abstract class Model implements ArrayAccess, JsonSerializable
return; return;
} }
// If the RDN we have been given is empty when parsed, we must
// have been given a string, with no attribute. In this case,
// we will create a new RDN using the current DN's head.
if ($this->newDn($rdn)->isEmpty()) {
$rdn = $this->getUpdateableRdn($rdn);
}
$this->fireModelEvent(new Renaming($this, $rdn, $newParentDn)); $this->fireModelEvent(new Renaming($this, $rdn, $newParentDn));
$this->newQuery()->rename($this->dn, $rdn, $newParentDn, $deleteOldRdn); $this->newQuery()->rename($this->dn, $rdn, $newParentDn, $deleteOldRdn);
@ -1337,6 +1425,18 @@ abstract class Model implements ArrayAccess, JsonSerializable
$this->wasRecentlyRenamed = true; $this->wasRecentlyRenamed = true;
} }
/**
* Get an updateable RDN for the model.
*
* @param string $name
*
* @return string
*/
public function getUpdateableRdn($name)
{
return $this->getCreatableRdn($name, $this->newDn($this->dn)->head());
}
/** /**
* Get a distinguished name that is creatable for the model. * Get a distinguished name that is creatable for the model.
* *
@ -1426,13 +1526,13 @@ abstract class Model implements ArrayAccess, JsonSerializable
} }
/** /**
* Validates that the current model exists. * Throw an exception if the model does not exist.
*
* @throws ModelDoesNotExistException
* *
* @return void * @return void
*
* @throws ModelDoesNotExistException
*/ */
protected function validateExistence() protected function requireExistence()
{ {
if (! $this->exists || is_null($this->dn)) { if (! $this->exists || is_null($this->dn)) {
throw ModelDoesNotExistException::forModel($this); throw ModelDoesNotExistException::forModel($this);

View File

@ -284,9 +284,9 @@ class HasMany extends OneToMany
* *
* @param string $model * @param string $model
* *
* @throws ModelNotFoundException
*
* @return Model * @return Model
*
* @throws ModelNotFoundException
*/ */
protected function getForeignModelByValueOrFail($model) protected function getForeignModelByValueOrFail($model)
{ {
@ -309,9 +309,9 @@ class HasMany extends OneToMany
* @param string|array $bypass * @param string|array $bypass
* @param mixed $value * @param mixed $value
* *
* @throws LdapRecordException
*
* @return mixed * @return mixed
*
* @throws LdapRecordException
*/ */
protected function attemptFailableOperation($operation, $bypass, $value) protected function attemptFailableOperation($operation, $bypass, $value)
{ {

View File

@ -27,9 +27,9 @@ class HasOne extends Relation
* *
* @param Model|string $model * @param Model|string $model
* *
* @throws \LdapRecord\LdapRecordException
*
* @return Model|string * @return Model|string
*
* @throws \LdapRecord\LdapRecordException
*/ */
public function attach($model) public function attach($model)
{ {
@ -45,9 +45,9 @@ class HasOne extends Relation
/** /**
* Detach the related model from the parent. * Detach the related model from the parent.
* *
* @throws \LdapRecord\LdapRecordException
*
* @return void * @return void
*
* @throws \LdapRecord\LdapRecordException
*/ */
public function detach() public function detach()
{ {

View File

@ -49,7 +49,7 @@ abstract class OneToMany extends Relation
/** /**
* Set the relation to load with its parent. * Set the relation to load with its parent.
* *
* @param OneToMany $relation * @param Relation $relation
* *
* @return $this * @return $this
*/ */

View File

@ -6,6 +6,7 @@ use BadMethodCallException;
use Closure; use Closure;
use DateTimeInterface; use DateTimeInterface;
use InvalidArgumentException; use InvalidArgumentException;
use LDAP\Result;
use LdapRecord\Connection; use LdapRecord\Connection;
use LdapRecord\Container; use LdapRecord\Container;
use LdapRecord\EscapesValues; use LdapRecord\EscapesValues;
@ -19,6 +20,7 @@ use LdapRecord\Query\Pagination\Paginator;
use LdapRecord\Support\Arr; use LdapRecord\Support\Arr;
use LdapRecord\Utilities; use LdapRecord\Utilities;
/** @psalm-suppress UndefinedClass */
class Builder class Builder
{ {
use EscapesValues; use EscapesValues;
@ -48,6 +50,13 @@ class Builder
*/ */
public $controls = []; public $controls = [];
/**
* The LDAP server controls that were processed.
*
* @var array
*/
public $controlsResponse = [];
/** /**
* The size limit of the query. * The size limit of the query.
* *
@ -238,12 +247,12 @@ class Builder
* *
* After running the callback, the columns are reset to the original value. * After running the callback, the columns are reset to the original value.
* *
* @param array $columns * @param array $columns
* @param callable $callback * @param Closure $callback
* *
* @return mixed * @return mixed
*/ */
protected function onceWithColumns($columns, $callback) protected function onceWithColumns($columns, Closure $callback)
{ {
$original = $this->columns; $original = $this->columns;
@ -383,8 +392,8 @@ class Builder
{ {
return str_replace( return str_replace(
'{base}', '{base}',
$this->baseDn, $this->baseDn ?: '',
$dn instanceof Model ? $dn->getDn() : $dn (string) ($dn instanceof Model ? $dn->getDn() : $dn)
); );
} }
@ -500,6 +509,25 @@ class Builder
}); });
} }
/**
* Execute a callback over each item while chunking.
*
* @param Closure $callback
* @param int $count
*
* @return bool
*/
public function each(Closure $callback, $count = 1000)
{
return $this->chunk($count, function ($results) use ($callback) {
foreach ($results as $key => $value) {
if ($callback($value, $key) === false) {
return false;
}
}
});
}
/** /**
* Chunk the results of a paginated LDAP query. * Chunk the results of a paginated LDAP query.
* *
@ -507,7 +535,7 @@ class Builder
* @param Closure $callback * @param Closure $callback
* @param bool $isCritical * @param bool $isCritical
* *
* @return void * @return bool
*/ */
public function chunk($pageSize, Closure $callback, $isCritical = false) public function chunk($pageSize, Closure $callback, $isCritical = false)
{ {
@ -515,11 +543,19 @@ class Builder
$query = $this->getQuery(); $query = $this->getQuery();
$page = 1;
foreach ($this->runChunk($query, $pageSize, $isCritical) as $chunk) { foreach ($this->runChunk($query, $pageSize, $isCritical) as $chunk) {
$callback($this->process($chunk)); if ($callback($this->process($chunk), $page) === false) {
return false;
}
$page++;
} }
$this->logQuery($this, 'chunk', $this->getElapsedTime($start)); $this->logQuery($this, 'chunk', $this->getElapsedTime($start));
return true;
} }
/** /**
@ -549,7 +585,11 @@ class Builder
{ {
unset($results['count']); unset($results['count']);
return $this->paginated ? $this->flattenPages($results) : $results; if ($this->paginated) {
return $this->flattenPages($results);
}
return $results;
} }
/** /**
@ -582,9 +622,7 @@ class Builder
*/ */
protected function getCachedResponse($query, Closure $callback) protected function getCachedResponse($query, Closure $callback)
{ {
// If caching is enabled and we have a cache instance available, if ($this->cache && $this->caching) {
// we will try to retrieve the cached results instead.
if ($this->caching && $this->cache) {
$key = $this->getCacheKey($query); $key = $this->getCacheKey($query);
if ($this->flushCache) { if ($this->flushCache) {
@ -594,7 +632,6 @@ class Builder
return $this->cache->remember($key, $this->cacheUntil, $callback); return $this->cache->remember($key, $this->cacheUntil, $callback);
} }
// Otherwise, we will simply execute the callback.
return $callback(); return $callback();
} }
@ -642,10 +679,25 @@ class Builder
} }
return $this->connection->run(function (LdapInterface $ldap) use ($resource) { return $this->connection->run(function (LdapInterface $ldap) use ($resource) {
$this->controlsResponse = $this->controls;
$errorCode = 0;
$dn = $errorMessage = $refs = null;
// Process the server controls response.
$ldap->parseResult(
$resource,
$errorCode,
$dn,
$errorMessage,
$refs,
$this->controlsResponse
);
$entries = $ldap->getEntries($resource); $entries = $ldap->getEntries($resource);
// Free up memory. // Free up memory.
if (is_resource($resource)) { if (is_resource($resource) || $resource instanceof Result) {
$ldap->freeResult($resource); $ldap->freeResult($resource);
} }
@ -684,7 +736,9 @@ class Builder
*/ */
public function first($columns = ['*']) public function first($columns = ['*'])
{ {
return Arr::get($this->limit(1)->get($columns), 0); return Arr::first(
$this->limit(1)->get($columns)
);
} }
/** /**
@ -694,9 +748,9 @@ class Builder
* *
* @param array|string $columns * @param array|string $columns
* *
* @throws ObjectNotFoundException * @return Model|array
* *
* @return Model|static * @throws ObjectNotFoundException
*/ */
public function firstOrFail($columns = ['*']) public function firstOrFail($columns = ['*'])
{ {
@ -707,6 +761,75 @@ class Builder
return $record; return $record;
} }
/**
* Return the first entry in a result, or execute the callback.
*
* @param Closure $callback
*
* @return Model|mixed
*/
public function firstOr(Closure $callback)
{
return $this->first() ?: $callback();
}
/**
* Execute the query and get the first result if it's the sole matching record.
*
* @param array|string $columns
*
* @return Model|array
*
* @throws ObjectsNotFoundException
* @throws MultipleObjectsFoundException
*/
public function sole($columns = ['*'])
{
$result = $this->limit(2)->get($columns);
if (empty($result)) {
throw new ObjectsNotFoundException;
}
if (count($result) > 1) {
throw new MultipleObjectsFoundException;
}
return reset($result);
}
/**
* Determine if any results exist for the current query.
*
* @return bool
*/
public function exists()
{
return ! is_null($this->first());
}
/**
* Determine if no results exist for the current query.
*
* @return bool
*/
public function doesntExist()
{
return ! $this->exists();
}
/**
* Execute the given callback if no rows exist for the current query.
*
* @param Closure $callback
*
* @return bool|mixed
*/
public function existsOr(Closure $callback)
{
return $this->exists() ? true : $callback();
}
/** /**
* Throws a not found exception. * Throws a not found exception.
* *
@ -747,9 +870,9 @@ class Builder
* @param string $value * @param string $value
* @param array|string $columns * @param array|string $columns
* *
* @throws ObjectNotFoundException
*
* @return Model * @return Model
*
* @throws ObjectNotFoundException
*/ */
public function findByOrFail($attribute, $value, $columns = ['*']) public function findByOrFail($attribute, $value, $columns = ['*'])
{ {
@ -830,9 +953,9 @@ class Builder
* @param string $dn * @param string $dn
* @param array|string $columns * @param array|string $columns
* *
* @throws ObjectNotFoundException
*
* @return Model|static * @return Model|static
*
* @throws ObjectNotFoundException
*/ */
public function findOrFail($dn, $columns = ['*']) public function findOrFail($dn, $columns = ['*'])
{ {
@ -876,6 +999,33 @@ class Builder
return $this; return $this;
} }
/**
* Add an order by control to the query.
*
* @param string $attribute
* @param string $direction
*
* @return $this
*/
public function orderBy($attribute, $direction = 'asc')
{
return $this->addControl(LDAP_CONTROL_SORTREQUEST, true, [
['attr' => $attribute, 'reverse' => $direction === 'desc'],
]);
}
/**
* Add an order by descending control to the query.
*
* @param string $attribute
*
* @return $this
*/
public function orderByDesc($attribute)
{
return $this->orderBy($attribute, 'desc');
}
/** /**
* Adds a raw filter to the current query. * Adds a raw filter to the current query.
* *
@ -951,9 +1101,9 @@ class Builder
* @param string $boolean * @param string $boolean
* @param bool $raw * @param bool $raw
* *
* @throws InvalidArgumentException
*
* @return $this * @return $this
*
* @throws InvalidArgumentException
*/ */
public function where($field, $operator = null, $value = null, $boolean = 'and', $raw = false) public function where($field, $operator = null, $value = null, $boolean = 'and', $raw = false)
{ {
@ -1414,9 +1564,9 @@ class Builder
* @param string $type The type of filter to add. * @param string $type The type of filter to add.
* @param array $bindings The bindings of the filter. * @param array $bindings The bindings of the filter.
* *
* @throws InvalidArgumentException
*
* @return $this * @return $this
*
* @throws InvalidArgumentException
*/ */
public function addFilter($type, array $bindings) public function addFilter($type, array $bindings)
{ {
@ -1610,9 +1760,9 @@ class Builder
* @param string $dn * @param string $dn
* @param array $attributes * @param array $attributes
* *
* @throws LdapRecordException
*
* @return bool * @return bool
*
* @throws LdapRecordException
*/ */
public function insert($dn, array $attributes) public function insert($dn, array $attributes)
{ {
@ -1728,9 +1878,9 @@ class Builder
* @param string $method * @param string $method
* @param array $parameters * @param array $parameters
* *
* @throws BadMethodCallException
*
* @return mixed * @return mixed
*
* @throws BadMethodCallException
*/ */
public function __call($method, $parameters) public function __call($method, $parameters)
{ {

View File

@ -13,6 +13,7 @@ class Collection extends BaseCollection
protected function valueRetriever($value) protected function valueRetriever($value)
{ {
if ($this->useAsCallable($value)) { if ($this->useAsCallable($value)) {
/** @var callable $value */
return $value; return $value;
} }

View File

@ -9,14 +9,14 @@ class QueryExecuted
/** /**
* The LDAP filter that was used for the query. * The LDAP filter that was used for the query.
* *
* @var string * @var Builder
*/ */
protected $query; protected $query;
/** /**
* The number of milliseconds it took to execute the query. * The number of milliseconds it took to execute the query.
* *
* @var float * @var ?float
*/ */
protected $time; protected $time;

View File

@ -506,9 +506,9 @@ class Grammar
* *
* @param array $where * @param array $where
* *
* @throws UnexpectedValueException
*
* @return string * @return string
*
* @throws UnexpectedValueException
*/ */
protected function compileWhere(array $where) protected function compileWhere(array $where)
{ {
@ -522,9 +522,9 @@ class Grammar
* *
* @param string $operator * @param string $operator
* *
* @throws UnexpectedValueException
*
* @return string * @return string
*
* @throws UnexpectedValueException
*/ */
protected function makeCompileMethod($operator) protected function makeCompileMethod($operator)
{ {

View File

@ -34,9 +34,9 @@ class ActiveDirectoryBuilder extends Builder
* @param string $sid * @param string $sid
* @param array|string $columns * @param array|string $columns
* *
* @throws ModelNotFoundException
*
* @return \LdapRecord\Models\ActiveDirectory\Entry|static * @return \LdapRecord\Models\ActiveDirectory\Entry|static
*
* @throws ModelNotFoundException
*/ */
public function findBySidOrFail($sid, $columns = []) public function findBySidOrFail($sid, $columns = [])
{ {

View File

@ -181,9 +181,9 @@ class Builder extends BaseBuilder
* @param string $value * @param string $value
* @param array|string $columns * @param array|string $columns
* *
* @throws ModelNotFoundException
*
* @return Model * @return Model
*
* @throws ModelNotFoundException
*/ */
public function findByAnrOrFail($value, $columns = ['*']) public function findByAnrOrFail($value, $columns = ['*'])
{ {
@ -271,9 +271,9 @@ class Builder extends BaseBuilder
* @param string $guid * @param string $guid
* @param array|string $columns * @param array|string $columns
* *
* @throws ModelNotFoundException
*
* @return Model|static * @return Model|static
*
* @throws ModelNotFoundException
*/ */
public function findByGuidOrFail($guid, $columns = ['*']) public function findByGuidOrFail($guid, $columns = ['*'])
{ {
@ -434,7 +434,7 @@ class Builder extends BaseBuilder
if (! $this->model->isDateAttribute($field)) { if (! $this->model->isDateAttribute($field)) {
throw new \UnexpectedValueException( throw new \UnexpectedValueException(
"Cannot convert field [$field] to an LDAP timestamp. You must add this field as a model date." "Cannot convert field [$field] to an LDAP timestamp. You must add this field as a model date."
.' Refer to https://ldaprecord.com/docs/model-mutators/#date-mutators' .' Refer to https://ldaprecord.com/docs/core/v2/model-mutators/#date-mutators'
); );
} }

View File

@ -0,0 +1,9 @@
<?php
namespace LdapRecord\Query;
use LdapRecord\LdapRecordException;
class MultipleObjectsFoundException extends LdapRecordException
{
}

View File

@ -23,8 +23,8 @@ class ObjectNotFoundException extends LdapRecordException
/** /**
* Create a new exception for the executed filter. * Create a new exception for the executed filter.
* *
* @param string $query * @param string $query
* @param null $baseDn * @param ?string $baseDn
* *
* @return static * @return static
*/ */

View File

@ -0,0 +1,9 @@
<?php
namespace LdapRecord\Query;
use LdapRecord\LdapRecordException;
class ObjectsNotFoundException extends LdapRecordException
{
}

View File

@ -71,13 +71,25 @@ abstract class AbstractPaginator
$this->updateServerControls($ldap, $resource); $this->updateServerControls($ldap, $resource);
$pages[] = $this->query->parse($resource); $pages[] = $this->query->parse($resource);
} while (! empty($this->fetchCookie())); } while ($this->shouldContinue());
$this->resetServerControls($ldap); $this->resetServerControls($ldap);
return $pages; return $pages;
} }
/**
* Whether the paginater should continue iterating.
*
* @return bool
*/
protected function shouldContinue()
{
$cookie = (string) $this->fetchCookie();
return $cookie !== '';
}
/** /**
* Fetch the pagination cookie. * Fetch the pagination cookie.
* *
@ -106,7 +118,7 @@ abstract class AbstractPaginator
* *
* @param LdapInterface $ldap * @param LdapInterface $ldap
* *
* @return mixed * @return void
*/ */
abstract protected function resetServerControls(LdapInterface $ldap); abstract protected function resetServerControls(LdapInterface $ldap);

View File

@ -11,7 +11,7 @@ class LazyPaginator extends Paginator
* *
* @param LdapInterface $ldap * @param LdapInterface $ldap
* *
* @return Generator * @return \Generator
*/ */
public function execute(LdapInterface $ldap) public function execute(LdapInterface $ldap)
{ {
@ -27,7 +27,7 @@ class LazyPaginator extends Paginator
$this->updateServerControls($ldap, $resource); $this->updateServerControls($ldap, $resource);
yield $this->query->parse($resource); yield $this->query->parse($resource);
} while (! empty($this->fetchCookie())); } while ($this->shouldContinue());
$this->resetServerControls($ldap); $this->resetServerControls($ldap);
} }

View File

@ -37,7 +37,9 @@ class Paginator extends AbstractPaginator
*/ */
protected function updateServerControls(LdapInterface $ldap, $resource) protected function updateServerControls(LdapInterface $ldap, $resource)
{ {
$errorCode = $dn = $errorMessage = $refs = null; $errorCode = 0;
$dn = $errorMessage = $refs = null;
$controls = $this->query->controls;
$ldap->parseResult( $ldap->parseResult(
$resource, $resource,
@ -45,20 +47,15 @@ class Paginator extends AbstractPaginator
$dn, $dn,
$errorMessage, $errorMessage,
$refs, $refs,
$this->query->controls $controls
); );
$this->resetPageSize(); $cookie = $controls[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'] ?? '';
}
/** $this->query->controls[LDAP_CONTROL_PAGEDRESULTS]['value'] = [
* Reset the page control page size. 'size' => $this->perPage,
* 'cookie' => $cookie,
* @return void ];
*/
protected function resetPageSize()
{
$this->query->controls[LDAP_CONTROL_PAGEDRESULTS]['value']['size'] = $this->perPage;
} }
/** /**
@ -66,6 +63,6 @@ class Paginator extends AbstractPaginator
*/ */
protected function resetServerControls(LdapInterface $ldap) protected function resetServerControls(LdapInterface $ldap)
{ {
$this->query->controls = []; unset($this->query->controls[LDAP_CONTROL_PAGEDRESULTS]);
} }
} }

View File

@ -11,9 +11,9 @@ class DirectoryFake
* *
* @param string|null $name * @param string|null $name
* *
* @throws \LdapRecord\ContainerException
*
* @return ConnectionFake * @return ConnectionFake
*
* @throws \LdapRecord\ContainerException
*/ */
public static function setup($name = null) public static function setup($name = null)
{ {

View File

@ -2,6 +2,7 @@
namespace LdapRecord\Testing; namespace LdapRecord\Testing;
use Closure;
use Exception; use Exception;
use LdapRecord\DetailedError; use LdapRecord\DetailedError;
use LdapRecord\DetectsErrors; use LdapRecord\DetectsErrors;
@ -81,11 +82,14 @@ class LdapFake implements LdapInterface
$expectations = Arr::wrap($expectations); $expectations = Arr::wrap($expectations);
foreach ($expectations as $key => $expectation) { foreach ($expectations as $key => $expectation) {
// If the key is non-numeric, we will assume if (! is_int($key)) {
// that the string is the method name and $operation = static::operation($key);
// the expectation is the return value.
if (! is_numeric($key)) { $expectation instanceof Closure
$expectation = static::operation($key)->andReturn($expectation); ? $expectation($operation)
: $operation->andReturn($expectation);
$expectation = $operation;
} }
if (! $expectation instanceof LdapExpectation) { if (! $expectation instanceof LdapExpectation) {
@ -322,7 +326,7 @@ class LdapFake implements LdapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = [])
{ {
return $this->resolveExpectation('search', func_get_args()); return $this->resolveExpectation('search', func_get_args());
} }
@ -330,7 +334,7 @@ class LdapFake implements LdapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = [])
{ {
return $this->resolveExpectation('listing', func_get_args()); return $this->resolveExpectation('listing', func_get_args());
} }
@ -338,7 +342,7 @@ class LdapFake implements LdapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = [])
{ {
return $this->resolveExpectation('read', func_get_args()); return $this->resolveExpectation('read', func_get_args());
} }
@ -453,9 +457,9 @@ class LdapFake implements LdapInterface
* @param string $method * @param string $method
* @param array $args * @param array $args
* *
* @throws Exception
*
* @return mixed * @return mixed
*
* @throws Exception
*/ */
protected function resolveExpectation($method, array $args = []) protected function resolveExpectation($method, array $args = [])
{ {

View File

@ -112,7 +112,7 @@ class Utilities
*/ */
public static function binaryGuidToString($binGuid) public static function binaryGuidToString($binGuid)
{ {
if (trim($binGuid) == '' || is_null($binGuid)) { if (is_null($binGuid) || trim($binGuid) == '') {
return; return;
} }
@ -179,7 +179,7 @@ class Utilities
*/ */
public static function isValidSid($sid) public static function isValidSid($sid)
{ {
return (bool) preg_match("/^S-\d(-\d{1,10}){1,16}$/i", $sid); return (bool) preg_match("/^S-\d(-\d{1,10}){1,16}$/i", (string) $sid);
} }
/** /**
@ -191,6 +191,6 @@ class Utilities
*/ */
public static function isValidGuid($guid) public static function isValidGuid($guid)
{ {
return (bool) preg_match('/^([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}$/', $guid); return (bool) preg_match('/^([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}$/', (string) $guid);
} }
} }

View File

@ -40,6 +40,13 @@ interface Guard
*/ */
public function validate(array $credentials = []); public function validate(array $credentials = []);
/**
* Determine if the guard has a user instance.
*
* @return bool
*/
public function hasUser();
/** /**
* Set the current user. * Set the current user.
* *

View File

@ -8,7 +8,7 @@ interface PasswordBrokerFactory
* Get a password broker instance by name. * Get a password broker instance by name.
* *
* @param string|null $name * @param string|null $name
* @return mixed * @return \Illuminate\Contracts\Auth\PasswordBroker
*/ */
public function broker($name = null); public function broker($name = null);
} }

View File

@ -28,6 +28,8 @@ interface Broadcaster
* @param string $event * @param string $event
* @param array $payload * @param array $payload
* @return void * @return void
*
* @throws \Illuminate\Broadcasting\BroadcastException
*/ */
public function broadcast(array $channels, $event, array $payload = []); public function broadcast(array $channels, $event, array $payload = []);
} }

View File

@ -7,7 +7,7 @@ interface ShouldBroadcast
/** /**
* Get the channels the event should broadcast on. * Get the channels the event should broadcast on.
* *
* @return \Illuminate\Broadcasting\Channel|\Illuminate\Broadcasting\Channel[] * @return \Illuminate\Broadcasting\Channel|\Illuminate\Broadcasting\Channel[]|string[]|string
*/ */
public function broadcastOn(); public function broadcastOn();
} }

View File

@ -81,6 +81,24 @@ interface Container extends ContainerInterface
*/ */
public function singletonIf($abstract, $concrete = null); public function singletonIf($abstract, $concrete = null);
/**
* Register a scoped binding in the container.
*
* @param string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
public function scoped($abstract, $concrete = null);
/**
* Register a scoped binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
public function scopedIf($abstract, $concrete = null);
/** /**
* "Extend" an abstract type in the container. * "Extend" an abstract type in the container.
* *
@ -163,6 +181,15 @@ interface Container extends ContainerInterface
*/ */
public function resolved($abstract); public function resolved($abstract);
/**
* Register a new before resolving callback.
*
* @param \Closure|string $abstract
* @param \Closure|null $callback
* @return void
*/
public function beforeResolving($abstract, Closure $callback = null);
/** /**
* Register a new resolving callback. * Register a new resolving callback.
* *

View File

@ -15,7 +15,7 @@ interface ContextualBindingBuilder
/** /**
* Define the implementation for the contextual binding. * Define the implementation for the contextual binding.
* *
* @param \Closure|string $implementation * @param \Closure|string|array $implementation
* @return void * @return void
*/ */
public function give($implementation); public function give($implementation);
@ -27,4 +27,13 @@ interface ContextualBindingBuilder
* @return void * @return void
*/ */
public function giveTagged($tag); public function giveTagged($tag);
/**
* Specify the configuration item to bind as a primitive.
*
* @param string $key
* @param ?string $default
* @return void
*/
public function giveConfig($key, $default = null);
} }

View File

@ -0,0 +1,14 @@
<?php
namespace Illuminate\Contracts\Database\Eloquent;
use Illuminate\Contracts\Database\Query\Builder as BaseContract;
/**
* This interface is intentionally empty and exists to improve IDE support.
*
* @mixin \Illuminate\Database\Eloquent\Builder
*/
interface Builder extends BaseContract
{
}

View File

@ -0,0 +1,12 @@
<?php
namespace Illuminate\Contracts\Database\Query;
/**
* This interface is intentionally empty and exists to improve IDE support.
*
* @mixin \Illuminate\Database\Query\Builder
*/
interface Builder
{
}

View File

@ -41,6 +41,8 @@ interface ExceptionHandler
* @param \Symfony\Component\Console\Output\OutputInterface $output * @param \Symfony\Component\Console\Output\OutputInterface $output
* @param \Throwable $e * @param \Throwable $e
* @return void * @return void
*
* @internal This method is not meant to be used or overwritten outside the framework.
*/ */
public function renderForConsole($output, Throwable $e); public function renderForConsole($output, Throwable $e);
} }

View File

@ -25,4 +25,11 @@ interface Encrypter
* @throws \Illuminate\Contracts\Encryption\DecryptException * @throws \Illuminate\Contracts\Encryption\DecryptException
*/ */
public function decrypt($payload, $unserialize = true); public function decrypt($payload, $unserialize = true);
/**
* Get the encryption key that the encrypter is currently using.
*
* @return string
*/
public function getKey();
} }

View File

@ -1,10 +0,0 @@
<?php
namespace Illuminate\Contracts\Filesystem;
use Exception;
class FileExistsException extends Exception
{
//
}

View File

@ -30,9 +30,7 @@ interface Filesystem
* Get the contents of a file. * Get the contents of a file.
* *
* @param string $path * @param string $path
* @return string * @return string|null
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/ */
public function get($path); public function get($path);
@ -41,8 +39,6 @@ interface Filesystem
* *
* @param string $path * @param string $path
* @return resource|null The path resource or null on failure. * @return resource|null The path resource or null on failure.
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/ */
public function readStream($path); public function readStream($path);
@ -63,9 +59,6 @@ interface Filesystem
* @param resource $resource * @param resource $resource
* @param array $options * @param array $options
* @return bool * @return bool
*
* @throws \InvalidArgumentException If $resource is not a file handle.
* @throws \Illuminate\Contracts\Filesystem\FileExistsException
*/ */
public function writeStream($path, $resource, array $options = []); public function writeStream($path, $resource, array $options = []);

View File

@ -24,7 +24,7 @@ interface Application extends Container
/** /**
* Get the path to the bootstrap directory. * Get the path to the bootstrap directory.
* *
* @param string $path Optionally, a path to append to the bootstrap path * @param string $path
* @return string * @return string
*/ */
public function bootstrapPath($path = ''); public function bootstrapPath($path = '');
@ -32,7 +32,7 @@ interface Application extends Container
/** /**
* Get the path to the application configuration files. * Get the path to the application configuration files.
* *
* @param string $path Optionally, a path to append to the config path * @param string $path
* @return string * @return string
*/ */
public function configPath($path = ''); public function configPath($path = '');
@ -40,7 +40,7 @@ interface Application extends Container
/** /**
* Get the path to the database directory. * Get the path to the database directory.
* *
* @param string $path Optionally, a path to append to the database path * @param string $path
* @return string * @return string
*/ */
public function databasePath($path = ''); public function databasePath($path = '');
@ -56,9 +56,10 @@ interface Application extends Container
/** /**
* Get the path to the storage directory. * Get the path to the storage directory.
* *
* @param string $path
* @return string * @return string
*/ */
public function storagePath(); public function storagePath($path = '');
/** /**
* Get or check the current application environment. * Get or check the current application environment.
@ -82,6 +83,13 @@ interface Application extends Container
*/ */
public function runningUnitTests(); public function runningUnitTests();
/**
* Get an instance of the maintenance mode manager implementation.
*
* @return \Illuminate\Contracts\Foundation\MaintenanceMode
*/
public function maintenanceMode();
/** /**
* Determine if the application is currently down for maintenance. * Determine if the application is currently down for maintenance.
* *
@ -206,6 +214,14 @@ interface Application extends Container
*/ */
public function shouldSkipMiddleware(); public function shouldSkipMiddleware();
/**
* Register a terminating callback with the application.
*
* @param callable|string $callback
* @return \Illuminate\Contracts\Foundation\Application
*/
public function terminating($callback);
/** /**
* Terminate the application. * Terminate the application.
* *

View File

@ -0,0 +1,14 @@
<?php
namespace Illuminate\Contracts\Foundation;
interface ExceptionRenderer
{
/**
* Renders the given exception as HTML.
*
* @param \Throwable $throwable
* @return string
*/
public function render($throwable);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Illuminate\Contracts\Foundation;
interface MaintenanceMode
{
/**
* Take the application down for maintenance.
*
* @param array $payload
* @return void
*/
public function activate(array $payload): void;
/**
* Take the application out of maintenance.
*
* @return void
*/
public function deactivate(): void;
/**
* Determine if the application is currently down for maintenance.
*
* @return bool
*/
public function active(): bool;
/**
* Get the data array which was provided when the application was placed into maintenance.
*
* @return array
*/
public function data(): array;
}

View File

@ -23,7 +23,7 @@ interface Mailable
public function queue(Queue $queue); public function queue(Queue $queue);
/** /**
* Deliver the queued message after the given delay. * Deliver the queued message after (n) seconds.
* *
* @param \DateTimeInterface|\DateInterval|int $delay * @param \DateTimeInterface|\DateInterval|int $delay
* @param \Illuminate\Contracts\Queue\Factory $queue * @param \Illuminate\Contracts\Queue\Factory $queue

View File

@ -38,11 +38,4 @@ interface Mailer
* @return void * @return void
*/ */
public function send($view, array $data = [], $callback = null); public function send($view, array $data = [], $callback = null);
/**
* Get the array of failed recipients.
*
* @return array
*/
public function failures();
} }

View File

@ -33,9 +33,7 @@ interface Job
public function fire(); public function fire();
/** /**
* Release the job back into the queue. * Release the job back into the queue after (n) seconds.
*
* Accepts a delay specified in seconds.
* *
* @param int $delay * @param int $delay
* @return void * @return void

View File

@ -43,7 +43,7 @@ interface Queue
public function pushRaw($payload, $queue = null, array $options = []); public function pushRaw($payload, $queue = null, array $options = []);
/** /**
* Push a new job onto the queue after a delay. * Push a new job onto the queue after (n) seconds.
* *
* @param \DateTimeInterface|\DateInterval|int $delay * @param \DateTimeInterface|\DateInterval|int $delay
* @param string|object $job * @param string|object $job
@ -54,7 +54,7 @@ interface Queue
public function later($delay, $job, $data = '', $queue = null); public function later($delay, $job, $data = '', $queue = null);
/** /**
* Push a new job onto the queue after a delay. * Push a new job onto a specific queue after (n) seconds.
* *
* @param string $queue * @param string $queue
* @param \DateTimeInterface|\DateInterval|int $delay * @param \DateTimeInterface|\DateInterval|int $delay

View File

@ -14,14 +14,14 @@ interface QueueableCollection
/** /**
* Get the identifiers for all of the entities. * Get the identifiers for all of the entities.
* *
* @return array * @return array<int, mixed>
*/ */
public function getQueueableIds(); public function getQueueableIds();
/** /**
* Get the relationships of the entities being queued. * Get the relationships of the entities being queued.
* *
* @return array * @return array<int, string>
*/ */
public function getQueueableRelations(); public function getQueueableRelations();

View File

@ -7,7 +7,7 @@ interface ResponseFactory
/** /**
* Create a new response instance. * Create a new response instance.
* *
* @param string $content * @param array|string $content
* @param int $status * @param int $status
* @param array $headers * @param array $headers
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response

View File

@ -69,6 +69,13 @@ interface UrlGenerator
*/ */
public function action($action, $parameters = [], $absolute = true); public function action($action, $parameters = [], $absolute = true);
/**
* Get the root controller namespace.
*
* @return string
*/
public function getRootControllerNamespace();
/** /**
* Set the root controller namespace. * Set the root controller namespace.
* *

Some files were not shown because too many files have changed in this diff Show More