Skip to content
Snippets Groups Projects
Commit bb9bb596 authored by Michael Lee's avatar Michael Lee
Browse files

Removing drupal/file_browser (1.3.0)

parent 467f1965
No related branches found
No related tags found
No related merge requests found
Showing
with 284 additions and 444 deletions
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e7563b426a09017f8207d3ccff7d6732",
"content-hash": "6ff0d1d583560e4cb0c835724d1ab236",
"packages": [
{
"name": "alchemy/zippy",
......@@ -1416,25 +1416,29 @@
},
{
"name": "doctrine/deprecations",
"version": "v1.0.0",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de"
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
"shasum": ""
},
"require": {
"php": "^7.1|^8.0"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"phpunit/phpunit": "^7.5|^8.5|^9.5",
"psr/log": "^1|^2|^3"
"phpstan/phpstan": "1.4.10 || 1.10.15",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "0.18.4",
"psr/log": "^1 || ^2 || ^3",
"vimeo/psalm": "4.30.0 || 5.12.0"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
......@@ -1453,9 +1457,9 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
"source": "https://github.com/doctrine/deprecations/tree/v1.0.0"
"source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
},
"time": "2022-05-02T15:47:09+00:00"
"time": "2023-06-03T09:27:29+00:00"
},
{
"name": "doctrine/lexer",
......@@ -3606,73 +3610,6 @@
"#media": "http://drupal.slack.com"
}
},
{
"name": "drupal/dropzonejs_eb_widget",
"version": "2.5.0",
"require": {
"drupal/core": "^8.8 || ^9",
"drupal/dropzonejs": "*",
"drupal/entity_browser": "*"
},
"type": "metapackage",
"extra": {
"drupal": {
"version": "8.x-2.5",
"datestamp": "1614606376",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Berdir",
"homepage": "https://www.drupal.org/user/214652"
},
{
"name": "chr.fritsch",
"homepage": "https://www.drupal.org/user/2103716"
},
{
"name": "Drupal media CI",
"homepage": "https://www.drupal.org/user/3057985"
},
{
"name": "Drupal Media Team",
"homepage": "https://www.drupal.org/user/3260690"
},
{
"name": "jungle",
"homepage": "https://www.drupal.org/user/2919723"
},
{
"name": "Primsi",
"homepage": "https://www.drupal.org/user/282629"
},
{
"name": "slashrsm",
"homepage": "https://www.drupal.org/user/744628"
},
{
"name": "wouters_f",
"homepage": "https://www.drupal.org/user/721548"
},
{
"name": "zkday",
"homepage": "https://www.drupal.org/user/888644"
}
],
"description": "DropzoneJS Entity browser widget.",
"homepage": "https://www.drupal.org/project/dropzonejs",
"support": {
"source": "https://git.drupalcode.org/project/dropzonejs"
}
},
{
"name": "drupal/editor_advanced_link",
"version": "1.9.0",
......@@ -4441,58 +4378,6 @@
"issues": "https://www.drupal.org/project/issues/field_permissions"
}
},
{
"name": "drupal/file_browser",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/file_browser.git",
"reference": "8.x-1.3"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/file_browser-8.x-1.3.zip",
"reference": "8.x-1.3",
"shasum": "054419484bf01fb83913fc434d3bda106634fdf2"
},
"require": {
"drupal/core": "~8 || ~9",
"drupal/dropzonejs": "^2",
"drupal/dropzonejs_eb_widget": "*",
"drupal/embed": "^1",
"drupal/entity_browser": "^2 || ^1",
"drupal/entity_embed": "^1"
},
"require-dev": {
"drupal/coder": "~8.3"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.3",
"datestamp": "1590339383",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0"
],
"authors": [
{
"name": "samuel.mortenson",
"homepage": "https://www.drupal.org/user/2582268"
}
],
"description": "This module provides a default Entity Browser that lets you browse and select your files in a nice-looking, mobile-ready Masonry based interface, and upload files using the Dropzonejs module.",
"homepage": "https://www.drupal.org/project/file_browser",
"support": {
"source": "https://git.drupalcode.org/project/file_browser"
}
},
{
"name": "drupal/focal_point",
"version": "1.5.0",
......@@ -8627,16 +8512,16 @@
},
{
"name": "egulias/email-validator",
"version": "3.2.5",
"version": "3.2.6",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "b531a2311709443320c786feb4519cfaf94af796"
"reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796",
"reference": "b531a2311709443320c786feb4519cfaf94af796",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7",
"reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7",
"shasum": ""
},
"require": {
......@@ -8682,7 +8567,7 @@
],
"support": {
"issues": "https://github.com/egulias/EmailValidator/issues",
"source": "https://github.com/egulias/EmailValidator/tree/3.2.5"
"source": "https://github.com/egulias/EmailValidator/tree/3.2.6"
},
"funding": [
{
......@@ -8690,7 +8575,7 @@
"type": "github"
}
],
"time": "2023-01-02T17:26:14+00:00"
"time": "2023-06-01T07:04:22+00:00"
},
{
"name": "enlightn/security-checker",
......@@ -16085,16 +15970,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v5.4.23",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "9a8a5b6d6508928174ded2109e29328a55342a42"
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a8a5b6d6508928174ded2109e29328a55342a42",
"reference": "9a8a5b6d6508928174ded2109e29328a55342a42",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/82269f73c0f0f9859ab9b6900eebacbe54954ede",
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede",
"shasum": ""
},
"require": {
......@@ -16103,7 +15988,6 @@
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4"
},
"require-dev": {
......@@ -16154,7 +16038,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.23"
"source": "https://github.com/symfony/var-dumper/tree/v5.4.25"
},
"funding": [
{
......@@ -16170,7 +16054,7 @@
"type": "tidelift"
}
],
"time": "2023-04-18T09:26:27+00:00"
"time": "2023-06-20T20:56:26+00:00"
},
{
"name": "symfony/var-exporter",
......
......@@ -10,8 +10,8 @@
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
......@@ -19,6 +19,7 @@
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'3e41e0554275033aae3e9e7e056c2d14' => $vendorDir . '/longwave/laminas-diactoros/src/functions/create_uploaded_file.php',
'f4ee20bfdee1006b0970e8d951bea11e' => $vendorDir . '/longwave/laminas-diactoros/src/functions/marshal_headers_from_sapi.php',
'039b4ca04402a921dc2af19c2e8c1f6e' => $vendorDir . '/longwave/laminas-diactoros/src/functions/marshal_method_from_sapi.php',
......@@ -38,7 +39,6 @@
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'2f69d3914119f042cca9e44442d5ce95' => $baseDir . '/web/core/includes/bootstrap.inc',
'6db5533840cb1ae1bc049452845aa88e' => $baseDir . '/web/core/includes/guzzle_php81_shim.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'5abda994d126976858eb25d2546ee3c9' => $vendorDir . '/simplesamlphp/simplesamlphp/lib/_autoload_modules.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
......
......@@ -11,8 +11,8 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
......@@ -20,6 +20,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
'3e41e0554275033aae3e9e7e056c2d14' => __DIR__ . '/..' . '/longwave/laminas-diactoros/src/functions/create_uploaded_file.php',
'f4ee20bfdee1006b0970e8d951bea11e' => __DIR__ . '/..' . '/longwave/laminas-diactoros/src/functions/marshal_headers_from_sapi.php',
'039b4ca04402a921dc2af19c2e8c1f6e' => __DIR__ . '/..' . '/longwave/laminas-diactoros/src/functions/marshal_method_from_sapi.php',
......@@ -39,7 +40,6 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
'2f69d3914119f042cca9e44442d5ce95' => __DIR__ . '/../..' . '/web/core/includes/bootstrap.inc',
'6db5533840cb1ae1bc049452845aa88e' => __DIR__ . '/../..' . '/web/core/includes/guzzle_php81_shim.php',
'23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
'5abda994d126976858eb25d2546ee3c9' => __DIR__ . '/..' . '/simplesamlphp/simplesamlphp/lib/_autoload_modules.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
......
......@@ -1461,31 +1461,35 @@
},
{
"name": "doctrine/deprecations",
"version": "v1.0.0",
"version_normalized": "1.0.0.0",
"version": "v1.1.1",
"version_normalized": "1.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de"
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
"shasum": ""
},
"require": {
"php": "^7.1|^8.0"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"phpunit/phpunit": "^7.5|^8.5|^9.5",
"psr/log": "^1|^2|^3"
"phpstan/phpstan": "1.4.10 || 1.10.15",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "0.18.4",
"psr/log": "^1 || ^2 || ^3",
"vimeo/psalm": "4.30.0 || 5.12.0"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
},
"time": "2022-05-02T15:47:09+00:00",
"time": "2023-06-03T09:27:29+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
......@@ -1501,7 +1505,7 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
"source": "https://github.com/doctrine/deprecations/tree/v1.0.0"
"source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
},
"install-path": "../doctrine/deprecations"
},
......@@ -3732,71 +3736,6 @@
},
"install-path": "../../web/modules/dropzonejs"
},
{
"name": "drupal/dropzonejs_eb_widget",
"version": "2.5.0",
"version_normalized": "2.5.0.0",
"require": {
"drupal/core": "^8.8 || ^9",
"drupal/dropzonejs": "*",
"drupal/entity_browser": "*"
},
"type": "metapackage",
"extra": {
"drupal": {
"version": "8.x-2.5",
"datestamp": "1614606376",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Drupal Media Team",
"homepage": "https://www.drupal.org/user/3260690"
},
{
"name": "Drupal media CI",
"homepage": "https://www.drupal.org/user/3057985"
},
{
"name": "Primsi",
"homepage": "https://www.drupal.org/user/282629"
},
{
"name": "chr.fritsch",
"homepage": "https://www.drupal.org/user/2103716"
},
{
"name": "jungle",
"homepage": "https://www.drupal.org/user/2919723"
},
{
"name": "slashrsm",
"homepage": "https://www.drupal.org/user/744628"
},
{
"name": "wouters_f",
"homepage": "https://www.drupal.org/user/721548"
},
{
"name": "zkday",
"homepage": "https://www.drupal.org/user/888644"
}
],
"description": "DropzoneJS Entity browser widget.",
"homepage": "https://www.drupal.org/project/dropzonejs",
"support": {
"source": "https://git.drupalcode.org/project/dropzonejs"
},
"install-path": null
},
{
"name": "drupal/editor_advanced_link",
"version": "1.9.0",
......@@ -4599,61 +4538,6 @@
},
"install-path": "../../web/modules/field_permissions"
},
{
"name": "drupal/file_browser",
"version": "1.3.0",
"version_normalized": "1.3.0.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/file_browser.git",
"reference": "8.x-1.3"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/file_browser-8.x-1.3.zip",
"reference": "8.x-1.3",
"shasum": "054419484bf01fb83913fc434d3bda106634fdf2"
},
"require": {
"drupal/core": "~8 || ~9",
"drupal/dropzonejs": "^2",
"drupal/dropzonejs_eb_widget": "*",
"drupal/embed": "^1",
"drupal/entity_browser": "^2 || ^1",
"drupal/entity_embed": "^1"
},
"require-dev": {
"drupal/coder": "~8.3"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.3",
"datestamp": "1590339383",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"installation-source": "dist",
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0"
],
"authors": [
{
"name": "samuel.mortenson",
"homepage": "https://www.drupal.org/user/2582268"
}
],
"description": "This module provides a default Entity Browser that lets you browse and select your files in a nice-looking, mobile-ready Masonry based interface, and upload files using the Dropzonejs module.",
"homepage": "https://www.drupal.org/project/file_browser",
"support": {
"source": "https://git.drupalcode.org/project/file_browser"
},
"install-path": "../../web/modules/file_browser"
},
{
"name": "drupal/focal_point",
"version": "1.5.0",
......@@ -8947,17 +8831,17 @@
},
{
"name": "egulias/email-validator",
"version": "3.2.5",
"version_normalized": "3.2.5.0",
"version": "3.2.6",
"version_normalized": "3.2.6.0",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "b531a2311709443320c786feb4519cfaf94af796"
"reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796",
"reference": "b531a2311709443320c786feb4519cfaf94af796",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7",
"reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7",
"shasum": ""
},
"require": {
......@@ -8972,7 +8856,7 @@
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
},
"time": "2023-01-02T17:26:14+00:00",
"time": "2023-06-01T07:04:22+00:00",
"type": "library",
"extra": {
"branch-alias": {
......@@ -9005,7 +8889,7 @@
],
"support": {
"issues": "https://github.com/egulias/EmailValidator/issues",
"source": "https://github.com/egulias/EmailValidator/tree/3.2.5"
"source": "https://github.com/egulias/EmailValidator/tree/3.2.6"
},
"funding": [
{
......@@ -16689,17 +16573,17 @@
},
{
"name": "symfony/var-dumper",
"version": "v5.4.23",
"version_normalized": "5.4.23.0",
"version": "v5.4.25",
"version_normalized": "5.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "9a8a5b6d6508928174ded2109e29328a55342a42"
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a8a5b6d6508928174ded2109e29328a55342a42",
"reference": "9a8a5b6d6508928174ded2109e29328a55342a42",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/82269f73c0f0f9859ab9b6900eebacbe54954ede",
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede",
"shasum": ""
},
"require": {
......@@ -16708,7 +16592,6 @@
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4"
},
"require-dev": {
......@@ -16723,7 +16606,7 @@
"ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
},
"time": "2023-04-18T09:26:27+00:00",
"time": "2023-06-20T20:56:26+00:00",
"bin": [
"Resources/bin/var-dump-server"
],
......@@ -16761,7 +16644,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.23"
"source": "https://github.com/symfony/var-dumper/tree/v5.4.25"
},
"funding": [
{
......
......@@ -3,7 +3,7 @@
'name' => 'osu-asc-webservices/d8-upstream',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '8322ffc7651bab972d71fa671738ac3969b0eb9b',
'reference' => '467f19657ab91922f4980095ea79aed35fa6633d',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
......@@ -236,9 +236,9 @@
'dev_requirement' => false,
),
'doctrine/deprecations' => array(
'pretty_version' => 'v1.0.0',
'version' => '1.0.0.0',
'reference' => '0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de',
'pretty_version' => 'v1.1.1',
'version' => '1.1.1.0',
'reference' => '612a3ee5ab0d5dd97b7cf3874a6efe24325efac3',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/deprecations',
'aliases' => array(),
......@@ -688,15 +688,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
'drupal/dropzonejs_eb_widget' => array(
'pretty_version' => '2.5.0',
'version' => '2.5.0.0',
'reference' => NULL,
'type' => 'metapackage',
'install_path' => NULL,
'aliases' => array(),
'dev_requirement' => false,
),
'drupal/editor_advanced_link' => array(
'pretty_version' => '1.9.0',
'version' => '1.9.0.0',
......@@ -805,15 +796,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
'drupal/file_browser' => array(
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'reference' => '8.x-1.3',
'type' => 'drupal-module',
'install_path' => __DIR__ . '/../../web/modules/file_browser',
'aliases' => array(),
'dev_requirement' => false,
),
'drupal/focal_point' => array(
'pretty_version' => '1.5.0',
'version' => '1.5.0.0',
......@@ -1400,9 +1382,9 @@
'dev_requirement' => false,
),
'egulias/email-validator' => array(
'pretty_version' => '3.2.5',
'version' => '3.2.5.0',
'reference' => 'b531a2311709443320c786feb4519cfaf94af796',
'pretty_version' => '3.2.6',
'version' => '3.2.6.0',
'reference' => 'e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7',
'type' => 'library',
'install_path' => __DIR__ . '/../egulias/email-validator',
'aliases' => array(),
......@@ -1621,7 +1603,7 @@
'osu-asc-webservices/d8-upstream' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '8322ffc7651bab972d71fa671738ac3969b0eb9b',
'reference' => '467f19657ab91922f4980095ea79aed35fa6633d',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
......@@ -2523,9 +2505,9 @@
'dev_requirement' => false,
),
'symfony/var-dumper' => array(
'pretty_version' => 'v5.4.23',
'version' => '5.4.23.0',
'reference' => '9a8a5b6d6508928174ded2109e29328a55342a42',
'pretty_version' => 'v5.4.25',
'version' => '5.4.25.0',
'reference' => '82269f73c0f0f9859ab9b6900eebacbe54954ede',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-dumper',
'aliases' => array(),
......
......@@ -19,13 +19,16 @@ Enable Doctrine deprecations to be sent to a PSR3 logger:
```
Enable Doctrine deprecations to be sent as `@trigger_error($message, E_USER_DEPRECATED)`
messages.
messages by setting the `DOCTRINE_DEPRECATIONS` environment variable to `trigger`.
Alternatively, call:
```php
\Doctrine\Deprecations\Deprecation::enableWithTriggerError();
```
If you only want to enable deprecation tracking, without logging or calling `trigger_error` then call:
If you only want to enable deprecation tracking, without logging or calling `trigger_error`
then set the `DOCTRINE_DEPRECATIONS` environment variable to `track`.
Alternatively, call:
```php
\Doctrine\Deprecations\Deprecation::enableTrackingDeprecations();
......
{
"name": "doctrine/deprecations",
"type": "library",
"description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.",
"homepage": "https://www.doctrine-project.org/",
"license": "MIT",
"type": "library",
"homepage": "https://www.doctrine-project.org/",
"require": {
"php": "^7.1|^8.0"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5|^8.5|^9.5",
"psr/log": "^1|^2|^3",
"doctrine/coding-standard": "^9"
"doctrine/coding-standard": "^9",
"phpstan/phpstan": "1.4.10 || 1.10.15",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "0.18.4",
"psr/log": "^1 || ^2 || ^3",
"vimeo/psalm": "4.30.0 || 5.12.0"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
},
"autoload": {
"psr-4": {"Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"}
"psr-4": {
"Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"
}
},
"autoload-dev": {
"psr-4": {
......
......@@ -8,6 +8,7 @@
use function array_key_exists;
use function array_reduce;
use function assert;
use function debug_backtrace;
use function sprintf;
use function strpos;
......@@ -46,8 +47,8 @@ class Deprecation
private const TYPE_TRIGGER_ERROR = 2;
private const TYPE_PSR_LOGGER = 4;
/** @var int */
private static $type = self::TYPE_NONE;
/** @var int-mask-of<self::TYPE_*>|null */
private static $type;
/** @var LoggerInterface|null */
private static $logger;
......@@ -56,6 +57,9 @@ class Deprecation
private static $ignoredPackages = [];
/** @var array<string,int> */
private static $triggeredDeprecations = [];
/** @var array<string,bool> */
private static $ignoredLinks = [];
/** @var bool */
......@@ -68,21 +72,27 @@ class Deprecation
* deprecation. It is additionally used to de-duplicate the trigger of the
* same deprecation during a request.
*
* @param mixed $args
* @param float|int|string $args
*/
public static function trigger(string $package, string $link, string $message, ...$args): void
{
if (self::$type === self::TYPE_NONE) {
$type = self::$type ?? self::getTypeFromEnv();
if ($type === self::TYPE_NONE) {
return;
}
if (isset(self::$ignoredLinks[$link])) {
return;
}
if (array_key_exists($link, self::$ignoredLinks)) {
self::$ignoredLinks[$link]++;
if (array_key_exists($link, self::$triggeredDeprecations)) {
self::$triggeredDeprecations[$link]++;
} else {
self::$ignoredLinks[$link] = 1;
self::$triggeredDeprecations[$link] = 1;
}
if (self::$deduplication === true && self::$ignoredLinks[$link] > 1) {
if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) {
return;
}
......@@ -114,18 +124,20 @@ public static function trigger(string $package, string $link, string $message, .
* deprecation tracking is enabled even during deduplication, because it
* needs to call {@link debug_backtrace()}
*
* @param mixed $args
* @param float|int|string $args
*/
public static function triggerIfCalledFromOutside(string $package, string $link, string $message, ...$args): void
{
if (self::$type === self::TYPE_NONE) {
$type = self::$type ?? self::getTypeFromEnv();
if ($type === self::TYPE_NONE) {
return;
}
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
// first check that the caller is not from a tests folder, in which case we always let deprecations pass
if (strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
$path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR;
if (strpos($backtrace[0]['file'], $path) === false) {
......@@ -137,13 +149,17 @@ public static function triggerIfCalledFromOutside(string $package, string $link,
}
}
if (array_key_exists($link, self::$ignoredLinks)) {
self::$ignoredLinks[$link]++;
if (isset(self::$ignoredLinks[$link])) {
return;
}
if (array_key_exists($link, self::$triggeredDeprecations)) {
self::$triggeredDeprecations[$link]++;
} else {
self::$ignoredLinks[$link] = 1;
self::$triggeredDeprecations[$link] = 1;
}
if (self::$deduplication === true && self::$ignoredLinks[$link] > 1) {
if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) {
return;
}
......@@ -157,31 +173,35 @@ public static function triggerIfCalledFromOutside(string $package, string $link,
}
/**
* @param array<mixed> $backtrace
* @param list<array{function: string, line?: int, file?: string, class?: class-string, type?: string, args?: mixed[], object?: object}> $backtrace
*/
private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void
{
if ((self::$type & self::TYPE_PSR_LOGGER) > 0) {
$type = self::$type ?? self::getTypeFromEnv();
if (($type & self::TYPE_PSR_LOGGER) > 0) {
$context = [
'file' => $backtrace[0]['file'],
'line' => $backtrace[0]['line'],
'file' => $backtrace[0]['file'] ?? null,
'line' => $backtrace[0]['line'] ?? null,
'package' => $package,
'link' => $link,
];
assert(self::$logger !== null);
self::$logger->notice($message, $context);
}
if (! ((self::$type & self::TYPE_TRIGGER_ERROR) > 0)) {
if (! (($type & self::TYPE_TRIGGER_ERROR) > 0)) {
return;
}
$message .= sprintf(
' (%s:%d called by %s:%d, %s, package %s)',
self::basename($backtrace[0]['file']),
$backtrace[0]['line'],
self::basename($backtrace[1]['file']),
$backtrace[1]['line'],
self::basename($backtrace[0]['file'] ?? 'native code'),
$backtrace[0]['line'] ?? 0,
self::basename($backtrace[1]['file'] ?? 'native code'),
$backtrace[1]['line'] ?? 0,
$link,
$package
);
......@@ -205,16 +225,19 @@ private static function basename(string $filename): string
public static function enableTrackingDeprecations(): void
{
self::$type = self::$type ?? 0;
self::$type |= self::TYPE_TRACK_DEPRECATIONS;
}
public static function enableWithTriggerError(): void
{
self::$type = self::$type ?? 0;
self::$type |= self::TYPE_TRIGGER_ERROR;
}
public static function enableWithPsrLogger(LoggerInterface $logger): void
{
self::$type = self::$type ?? 0;
self::$type |= self::TYPE_PSR_LOGGER;
self::$logger = $logger;
}
......@@ -229,9 +252,10 @@ public static function disable(): void
self::$type = self::TYPE_NONE;
self::$logger = null;
self::$deduplication = true;
self::$ignoredLinks = [];
foreach (self::$ignoredLinks as $link => $count) {
self::$ignoredLinks[$link] = 0;
foreach (self::$triggeredDeprecations as $link => $count) {
self::$triggeredDeprecations[$link] = 0;
}
}
......@@ -243,13 +267,13 @@ public static function ignorePackage(string $packageName): void
public static function ignoreDeprecations(string ...$links): void
{
foreach ($links as $link) {
self::$ignoredLinks[$link] = 0;
self::$ignoredLinks[$link] = true;
}
}
public static function getUniqueTriggeredDeprecationsCount(): int
{
return array_reduce(self::$ignoredLinks, static function (int $carry, int $count) {
return array_reduce(self::$triggeredDeprecations, static function (int $carry, int $count) {
return $carry + $count;
}, 0);
}
......@@ -261,6 +285,28 @@ public static function getUniqueTriggeredDeprecationsCount(): int
*/
public static function getTriggeredDeprecations(): array
{
return self::$ignoredLinks;
return self::$triggeredDeprecations;
}
/**
* @return int-mask-of<self::TYPE_*>
*/
private static function getTypeFromEnv(): int
{
switch ($_SERVER['DOCTRINE_DEPRECATIONS'] ?? $_ENV['DOCTRINE_DEPRECATIONS'] ?? null) {
case 'trigger':
self::$type = self::TYPE_TRIGGER_ERROR;
break;
case 'track':
self::$type = self::TYPE_TRACK_DEPRECATIONS;
break;
default:
self::$type = self::TYPE_NONE;
break;
}
return self::$type;
}
}
parameters:
level: 6
paths:
- lib
- tests
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
<?xml version="1.0"?>
<psalm
errorLevel="1"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="lib/Doctrine/Deprecations" />
<directory name="tests/Doctrine/Deprecations" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<DeprecatedMethod>
<errorLevel type="suppress">
<!-- Remove when dropping support for PHPUnit 9.6 -->
<referencedMethod name="PHPUnit\Framework\TestCase::expectDeprecation"/>
<referencedMethod name="PHPUnit\Framework\TestCase::expectDeprecationMessage"/>
</errorLevel>
</DeprecatedMethod>
</issueHandlers>
</psalm>
......@@ -213,13 +213,11 @@ public function find($type) : bool
public function moveNext() : bool
{
if ($this->hasToRecord && $this->previous === self::$nullToken) {
$this->accumulator .= $this->token['value'];
$this->accumulator .= ((array) $this->token)['value'];
}
$this->previous = $this->token instanceof Token
? ['value' => $this->token->value, 'type' => $this->token->type, 'position' => $this->token->position]
: $this->token;
$this->previous = (array) $this->token;
if($this->lookahead === null) {
$this->lookahead = self::$nullToken;
}
......@@ -227,7 +225,7 @@ public function moveNext() : bool
$hasNext = parent::moveNext();
if ($this->hasToRecord) {
$this->accumulator .= $this->token['value'];
$this->accumulator .= ((array) $this->token)['value'];
}
return $hasNext;
......
......@@ -29,7 +29,7 @@ abstract protected function preLeftParsing() : Result;
public function __construct(EmailLexer $lexer)
{
$this->lexer = $lexer;
$this->lexer = $lexer;
}
public function parse(string $str) : Result
......@@ -51,7 +51,7 @@ public function parse(string $str) : Result
return $localPartResult;
}
$domainPartResult = $this->parseRightFromAt();
$domainPartResult = $this->parseRightFromAt();
if ($domainPartResult->isInvalid()) {
return $domainPartResult;
......@@ -73,6 +73,6 @@ protected function hasAtToken() : bool
$this->lexer->moveNext();
$this->lexer->moveNext();
return $this->lexer->token['type'] !== EmailLexer::S_AT;
return ((array) $this->lexer->token)['type'] !== EmailLexer::S_AT;
}
}
......@@ -31,15 +31,15 @@ public function __construct(EmailLexer $lexer, CommentStrategy $commentStrategy)
public function parse() : Result
{
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS) {
$this->openedParenthesis++;
if($this->noClosingParenthesis()) {
return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']);
return new InvalidEmail(new UnclosedComment(), ((array) $this->lexer->token)['value']);
}
}
if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) {
return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEPARENTHESIS) {
return new InvalidEmail(new UnOpenedComment(), ((array) $this->lexer->token)['value']);
}
$this->warnings[WarningComment::CODE] = new WarningComment();
......@@ -58,10 +58,10 @@ public function parse() : Result
}
if($this->openedParenthesis >= 1) {
return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']);
return new InvalidEmail(new UnclosedComment(), ((array) $this->lexer->token)['value']);
}
if ($this->openedParenthesis < 0) {
return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']);
return new InvalidEmail(new UnOpenedComment(), ((array) $this->lexer->token)['value']);
}
$finalValidations = $this->commentStrategy->endOfLoopValidations($this->lexer);
......@@ -78,7 +78,7 @@ public function parse() : Result
private function warnEscaping() : bool
{
//Backslash found
if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) {
if (((array) $this->lexer->token)['type'] !== EmailLexer::S_BACKSLASH) {
return false;
}
......@@ -87,12 +87,12 @@ private function warnEscaping() : bool
}
$this->warnings[QuotedPart::CODE] =
new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']);
new QuotedPart($this->lexer->getPrevious()['type'], ((array) $this->lexer->token)['type']);
return true;
}
private function noClosingParenthesis() : bool
private function noClosingParenthesis() : bool
{
try {
$this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS);
......
......@@ -23,7 +23,7 @@ public function endOfLoopValidations(EmailLexer $lexer) : Result
{
//test for end of string
if (!$lexer->isNextToken(EmailLexer::S_DOT)) {
return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->token['value']);
return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), ((array) $lexer->token)['value']);
}
//add warning
//Address is valid within the message but cannot be used unmodified for the envelope
......
......@@ -24,7 +24,7 @@ public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool
public function endOfLoopValidations(EmailLexer $lexer) : Result
{
if (!$lexer->isNextToken(EmailLexer::S_AT)) {
return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->token['value']);
return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), ((array) $lexer->token)['value']);
}
$this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
return new ValidEmail();
......
......@@ -39,14 +39,14 @@ public function parse() : Result
$addressLiteral = '';
do {
if ($this->lexer->token['type'] === EmailLexer::C_NUL) {
return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::C_NUL) {
return new InvalidEmail(new ExpectingDTEXT(), ((array) $this->lexer->token)['value']);
}
$this->addObsoleteWarnings();
if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENBRACKET, EmailLexer::S_OPENBRACKET))) {
return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']);
return new InvalidEmail(new ExpectingDTEXT(), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->isNextTokenAny(
......@@ -57,21 +57,21 @@ public function parse() : Result
}
if ($this->lexer->isNextToken(EmailLexer::S_CR)) {
return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']);
return new InvalidEmail(new CRNoLF(), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) {
return new InvalidEmail(new UnusualElements($this->lexer->token['value']), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_BACKSLASH) {
return new InvalidEmail(new UnusualElements(((array) $this->lexer->token)['value']), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_IPV6TAG) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_IPV6TAG) {
$IPv6TAG = true;
}
if ($this->lexer->token['type'] === EmailLexer::S_CLOSEBRACKET) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEBRACKET) {
break;
}
$addressLiteral .= $this->lexer->token['value'];
$addressLiteral .= ((array) $this->lexer->token)['value'];
} while ($this->lexer->moveNext());
......@@ -144,7 +144,7 @@ public function checkIPV6Tag($addressLiteral, $maxGroups = 8) : void
$this->warnings[IPV6Deprecated::CODE] = new IPV6Deprecated();
}
}
public function convertIPv4ToIPv6(string $addressLiteralIPv4) : string
{
$matchesIP = [];
......@@ -189,7 +189,7 @@ protected function checkIPV4Tag($addressLiteral) : bool
private function addObsoleteWarnings() : void
{
if(in_array($this->lexer->token['type'], self::OBSOLETE_WARNINGS)) {
if(in_array(((array) $this->lexer->token)['type'], self::OBSOLETE_WARNINGS)) {
$this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT();
}
}
......
......@@ -50,8 +50,8 @@ public function parse() : Result
return $domainChecks;
}
if ($this->lexer->token['type'] === EmailLexer::S_AT) {
return new InvalidEmail(new ConsecutiveAt(), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_AT) {
return new InvalidEmail(new ConsecutiveAt(), ((array) $this->lexer->token)['value']);
}
$result = $this->doParseDomainPart();
......@@ -69,7 +69,7 @@ public function parse() : Result
$length = strlen($this->domainPart);
if ($length > self::DOMAIN_MAX_LENGTH) {
return new InvalidEmail(new DomainTooLong(), $this->lexer->token['value']);
return new InvalidEmail(new DomainTooLong(), ((array) $this->lexer->token)['value']);
}
return new ValidEmail();
......@@ -79,13 +79,13 @@ private function checkEndOfDomain() : Result
{
$prev = $this->lexer->getPrevious();
if ($prev['type'] === EmailLexer::S_DOT) {
return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']);
return new InvalidEmail(new DotAtEnd(), ((array) $this->lexer->token)['value']);
}
if ($prev['type'] === EmailLexer::S_HYPHEN) {
return new InvalidEmail(new DomainHyphened('Hypen found at the end of the domain'), $prev['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_SP) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_SP) {
return new InvalidEmail(new CRLFAtTheEnd(), $prev['value']);
}
return new ValidEmail();
......@@ -98,13 +98,13 @@ private function performDomainStartChecks() : Result
if ($invalidTokens->isInvalid()) {
return $invalidTokens;
}
$missingDomain = $this->checkEmptyDomain();
if ($missingDomain->isInvalid()) {
return $missingDomain;
}
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS) {
$this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
}
return new ValidEmail();
......@@ -112,12 +112,12 @@ private function performDomainStartChecks() : Result
private function checkEmptyDomain() : Result
{
$thereIsNoDomain = $this->lexer->token['type'] === EmailLexer::S_EMPTY ||
($this->lexer->token['type'] === EmailLexer::S_SP &&
$thereIsNoDomain = ((array) $this->lexer->token)['type'] === EmailLexer::S_EMPTY ||
(((array) $this->lexer->token)['type'] === EmailLexer::S_SP &&
!$this->lexer->isNextToken(EmailLexer::GENERIC));
if ($thereIsNoDomain) {
return new InvalidEmail(new NoDomainPart(), $this->lexer->token['value']);
return new InvalidEmail(new NoDomainPart(), ((array) $this->lexer->token)['value']);
}
return new ValidEmail();
......@@ -125,11 +125,11 @@ private function checkEmptyDomain() : Result
private function checkInvalidTokensAfterAT() : Result
{
if ($this->lexer->token['type'] === EmailLexer::S_DOT) {
return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT) {
return new InvalidEmail(new DotAtStart(), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) {
return new InvalidEmail(new DomainHyphened('After AT'), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_HYPHEN) {
return new InvalidEmail(new DomainHyphened('After AT'), ((array) $this->lexer->token)['value']);
}
return new ValidEmail();
}
......@@ -156,8 +156,8 @@ protected function doParseDomainPart() : Result
return $notAllowedChars;
}
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS ||
$this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS ||
((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEPARENTHESIS ) {
$hasComments = true;
$commentsResult = $this->parseComments();
......@@ -172,7 +172,7 @@ protected function doParseDomainPart() : Result
return $dotsResult;
}
if ($this->lexer->token['type'] === EmailLexer::S_OPENBRACKET) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENBRACKET) {
$literalResult = $this->parseDomainLiteral();
$this->addTLDWarnings($tldMissing);
......@@ -189,9 +189,9 @@ protected function doParseDomainPart() : Result
return $FwsResult;
}
$domain .= $this->lexer->token['value'];
$domain .= ((array) $this->lexer->token)['value'];
if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::GENERIC)) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::GENERIC)) {
$tldMissing = false;
}
......@@ -201,7 +201,7 @@ protected function doParseDomainPart() : Result
}
$this->lexer->moveNext();
} while (null !== $this->lexer->token['type']);
} while (null !== ((array) $this->lexer->token)['type']);
$labelCheck = $this->checkLabelLength(true);
if ($labelCheck->isInvalid()) {
......@@ -219,8 +219,8 @@ protected function doParseDomainPart() : Result
private function checkNotAllowedChars($token) : Result
{
$notAllowed = [EmailLexer::S_BACKSLASH => true, EmailLexer::S_SLASH=> true];
if (isset($notAllowed[$token['type']])) {
return new InvalidEmail(new CharNotAllowed(), $token['value']);
if (isset($notAllowed[((array) $token)['type']])) {
return new InvalidEmail(new CharNotAllowed(), ((array) $token)['value']);
}
return new ValidEmail();
}
......@@ -233,7 +233,7 @@ protected function parseDomainLiteral() : Result
try {
$this->lexer->find(EmailLexer::S_CLOSEBRACKET);
} catch (\RuntimeException $e) {
return new InvalidEmail(new ExpectingDomainLiteralClose(), $this->lexer->token['value']);
return new InvalidEmail(new ExpectingDomainLiteralClose(), ((array) $this->lexer->token)['value']);
}
$domainLiteralParser = new DomainLiteralParser($this->lexer);
......@@ -244,17 +244,17 @@ protected function parseDomainLiteral() : Result
protected function checkDomainPartExceptions(array $prev, bool $hasComments) : Result
{
if ($this->lexer->token['type'] === EmailLexer::S_OPENBRACKET && $prev['type'] !== EmailLexer::S_AT) {
return new InvalidEmail(new ExpectingATEXT('OPENBRACKET not after AT'), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENBRACKET && $prev['type'] !== EmailLexer::S_AT) {
return new InvalidEmail(new ExpectingATEXT('OPENBRACKET not after AT'), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
return new InvalidEmail(new DomainHyphened('Hypen found near DOT'), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
return new InvalidEmail(new DomainHyphened('Hypen found near DOT'), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH
if (((array) $this->lexer->token)['type'] === EmailLexer::S_BACKSLASH
&& $this->lexer->isNextToken(EmailLexer::GENERIC)) {
return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), $this->lexer->token['value']);
return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), ((array) $this->lexer->token)['value']);
}
return $this->validateTokens($hasComments);
......@@ -273,8 +273,8 @@ protected function validateTokens(bool $hasComments) : Result
$validDomainTokens[EmailLexer::S_CLOSEPARENTHESIS] = true;
}
if (!isset($validDomainTokens[$this->lexer->token['type']])) {
return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']);
if (!isset($validDomainTokens[((array) $this->lexer->token)['type']])) {
return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . ((array) $this->lexer->token)['value']), ((array) $this->lexer->token)['value']);
}
return new ValidEmail();
......@@ -282,13 +282,13 @@ protected function validateTokens(bool $hasComments) : Result
private function checkLabelLength(bool $isEndOfDomain = false) : Result
{
if ($this->lexer->token['type'] === EmailLexer::S_DOT || $isEndOfDomain) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT || $isEndOfDomain) {
if ($this->isLabelTooLong($this->label)) {
return new InvalidEmail(new LabelTooLong(), $this->lexer->token['value']);
return new InvalidEmail(new LabelTooLong(), ((array) $this->lexer->token)['value']);
}
$this->label = '';
}
$this->label .= $this->lexer->token['value'];
$this->label .= ((array) $this->lexer->token)['value'];
return new ValidEmail();
}
......
......@@ -30,24 +30,24 @@ public function parse() : Result
EmailLexer::S_CR => true,
EmailLexer::S_LF => true
];
$setSpecialsWarning = true;
$this->lexer->moveNext();
while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) {
if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) {
while (((array) $this->lexer->token)['type'] !== EmailLexer::S_DQUOTE && null !== ((array) $this->lexer->token)['type']) {
if (isset($special[((array) $this->lexer->token)['type']]) && $setSpecialsWarning) {
$this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
$setSpecialsWarning = false;
}
if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) {
if (((array) $this->lexer->token)['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) {
$this->lexer->moveNext();
}
$this->lexer->moveNext();
if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) {
return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']);
if (!$this->escaped() && isset($invalid[((array) $this->lexer->token)['type']])) {
return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), ((array) $this->lexer->token)['value']);
}
}
......@@ -59,7 +59,7 @@ public function parse() : Result
}
if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) {
return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']);
return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), ((array) $this->lexer->token)['value']);
}
return new ValidEmail();
......@@ -71,15 +71,15 @@ protected function checkDQUOTE() : Result
if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) {
$description = 'https://tools.ietf.org/html/rfc5322#section-3.2.4 - quoted string should be a unit';
return new InvalidEmail(new ExpectingATEXT($description), $this->lexer->token['value']);
return new InvalidEmail(new ExpectingATEXT($description), ((array) $this->lexer->token)['value']);
}
try {
$this->lexer->find(EmailLexer::S_DQUOTE);
} catch (\Exception $e) {
return new InvalidEmail(new UnclosedQuotedString(), $this->lexer->token['value']);
return new InvalidEmail(new UnclosedQuotedString(), ((array) $this->lexer->token)['value']);
}
$this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], $this->lexer->token['value']);
$this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], ((array) $this->lexer->token)['value']);
return new ValidEmail();
}
......
......@@ -36,16 +36,16 @@ public function parse() : Result
return $resultCRLF;
}
if ($this->lexer->token['type'] === EmailLexer::S_CR) {
return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_CR) {
return new InvalidEmail(new CRNoLF(), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) {
return new InvalidEmail(new AtextAfterCFWS(), $this->lexer->token['value']);
return new InvalidEmail(new AtextAfterCFWS(), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) {
return new InvalidEmail(new ExpectingCTEXT(), $this->lexer->token['value']);
if (((array) $this->lexer->token)['type'] === EmailLexer::S_LF || ((array) $this->lexer->token)['type'] === EmailLexer::C_NUL) {
return new InvalidEmail(new ExpectingCTEXT(), ((array) $this->lexer->token)['value']);
}
if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) {
......@@ -59,28 +59,28 @@ public function parse() : Result
protected function checkCRLFInFWS() : Result
{
if ($this->lexer->token['type'] !== EmailLexer::CRLF) {
if (((array) $this->lexer->token)['type'] !== EmailLexer::CRLF) {
return new ValidEmail();
}
if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) {
return new InvalidEmail(new CRLFX2(), $this->lexer->token['value']);
return new InvalidEmail(new CRLFX2(), ((array) $this->lexer->token)['value']);
}
//this has no coverage. Condition is repeated from above one
if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) {
return new InvalidEmail(new CRLFAtTheEnd(), $this->lexer->token['value']);
return new InvalidEmail(new CRLFAtTheEnd(), ((array) $this->lexer->token)['value']);
}
return new ValidEmail();
}
protected function isFWS() : bool
{
if ($this->escaped()) {
return false;
}
return in_array($this->lexer->token['type'], self::FWS_TYPES);
return in_array(((array) $this->lexer->token)['type'], self::FWS_TYPES);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment