From bb9bb59622de8b54c3260bf613d693b76596d8bb Mon Sep 17 00:00:00 2001 From: "lee.5151" <lee.5151@osu.edu> Date: Mon, 10 Jul 2023 13:08:31 -0400 Subject: [PATCH] Removing drupal/file_browser (1.3.0) --- composer.json | 1 - composer.lock | 168 +---- vendor/composer/autoload_files.php | 4 +- vendor/composer/autoload_static.php | 4 +- vendor/composer/installed.json | 173 +---- vendor/composer/installed.php | 40 +- vendor/doctrine/deprecations/README.md | 7 +- vendor/doctrine/deprecations/composer.json | 20 +- .../lib/Doctrine/Deprecations/Deprecation.php | 104 ++- vendor/doctrine/deprecations/phpstan.neon | 9 + vendor/doctrine/deprecations/psalm.xml | 30 + .../email-validator/src/EmailLexer.php | 10 +- vendor/egulias/email-validator/src/Parser.php | 6 +- .../email-validator/src/Parser/Comment.php | 18 +- .../Parser/CommentStrategy/DomainComment.php | 2 +- .../Parser/CommentStrategy/LocalComment.php | 2 +- .../src/Parser/DomainLiteral.php | 22 +- .../email-validator/src/Parser/DomainPart.php | 68 +- .../src/Parser/DoubleQuote.php | 20 +- .../src/Parser/FoldingWhiteSpace.php | 20 +- .../email-validator/src/Parser/IDLeftPart.php | 2 +- .../src/Parser/IDRightPart.php | 6 +- .../email-validator/src/Parser/LocalPart.php | 30 +- .../email-validator/src/Parser/PartParser.php | 6 +- .../symfony/var-dumper/Caster/DateCaster.php | 2 +- vendor/symfony/var-dumper/composer.json | 1 - web/modules/file_browser/LICENSE.txt | 339 ---------- web/modules/file_browser/README.txt | 99 --- web/modules/file_browser/composer.json | 16 - .../install/embed.button.file_browser.yml | 20 - .../entity_browser.browser.browse_files.yml | 45 -- ...ity_browser.browser.browse_files_modal.yml | 45 -- .../image.style.file_entity_browser_small.yml | 13 - ...ge.style.file_entity_browser_thumbnail.yml | 14 - .../views.view.file_entity_browser.yml | 606 ------------------ .../css/file_browser.dropzone.css | 29 - .../file_browser/css/file_browser.iframe.css | 9 - .../file_browser/css/file_browser.preview.css | 34 - .../file_browser/css/file_browser.view.css | 281 -------- .../file_browser/file_browser.info.yml | 25 - web/modules/file_browser/file_browser.install | 256 -------- .../file_browser/file_browser.libraries.yml | 61 -- web/modules/file_browser/file_browser.module | 80 --- .../file_browser/file_browser.post_update.php | 37 -- .../file_browser/file_browser.routing.yml | 14 - .../file_browser/file_browser.views.inc | 19 - .../file_browser/file_browser_icon.png | 3 - web/modules/file_browser/images/checkmark.svg | 4 - .../images/document_placeholder.svg | 4 - web/modules/file_browser/images/preview.svg | 4 - web/modules/file_browser/images/remove.svg | 4 - .../file_browser/js/file_browser.preview.js | 26 - .../file_browser/js/file_browser.view.js | 128 ---- .../block_content.type.file_browser.yml | 9 - ...lay.block_content.file_browser.default.yml | 33 - ...form_display.node.file_browser.default.yml | 89 --- ...lay.block_content.file_browser.default.yml | 24 - ...view_display.node.file_browser.default.yml | 42 -- ...e_browser.field_file_browser_reference.yml | 25 - .../field.field.node.file_browser.body.yml | 22 - ....file_browser.field_file_browser_image.yml | 38 -- ...k_content.field_file_browser_reference.yml | 20 - ....storage.node.field_file_browser_image.yml | 30 - .../config/install/node.type.file_browser.yml | 18 - .../file_browser_example.info.yml | 12 - .../src/Controller/FileBrowserController.php | 62 -- .../src/Plugin/Block/ImageEmbedBlock.php | 248 ------- .../Plugin/Field/FieldWidget/FileBrowser.php | 50 -- .../Plugin/views/field/FileBrowserPreview.php | 102 --- .../tests/src/Functional/InstallTest.php | 50 -- .../FunctionalJavascript/FileBrowserTest.php | 80 --- 71 files changed, 307 insertions(+), 3637 deletions(-) create mode 100644 vendor/doctrine/deprecations/phpstan.neon create mode 100644 vendor/doctrine/deprecations/psalm.xml delete mode 100644 web/modules/file_browser/LICENSE.txt delete mode 100644 web/modules/file_browser/README.txt delete mode 100644 web/modules/file_browser/composer.json delete mode 100644 web/modules/file_browser/config/install/embed.button.file_browser.yml delete mode 100644 web/modules/file_browser/config/install/entity_browser.browser.browse_files.yml delete mode 100644 web/modules/file_browser/config/install/entity_browser.browser.browse_files_modal.yml delete mode 100644 web/modules/file_browser/config/install/image.style.file_entity_browser_small.yml delete mode 100644 web/modules/file_browser/config/install/image.style.file_entity_browser_thumbnail.yml delete mode 100644 web/modules/file_browser/config/install/views.view.file_entity_browser.yml delete mode 100644 web/modules/file_browser/css/file_browser.dropzone.css delete mode 100644 web/modules/file_browser/css/file_browser.iframe.css delete mode 100644 web/modules/file_browser/css/file_browser.preview.css delete mode 100644 web/modules/file_browser/css/file_browser.view.css delete mode 100644 web/modules/file_browser/file_browser.info.yml delete mode 100644 web/modules/file_browser/file_browser.install delete mode 100644 web/modules/file_browser/file_browser.libraries.yml delete mode 100644 web/modules/file_browser/file_browser.module delete mode 100644 web/modules/file_browser/file_browser.post_update.php delete mode 100644 web/modules/file_browser/file_browser.routing.yml delete mode 100644 web/modules/file_browser/file_browser.views.inc delete mode 100644 web/modules/file_browser/file_browser_icon.png delete mode 100644 web/modules/file_browser/images/checkmark.svg delete mode 100644 web/modules/file_browser/images/document_placeholder.svg delete mode 100644 web/modules/file_browser/images/preview.svg delete mode 100644 web/modules/file_browser/images/remove.svg delete mode 100644 web/modules/file_browser/js/file_browser.preview.js delete mode 100644 web/modules/file_browser/js/file_browser.view.js delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/block_content.type.file_browser.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.block_content.file_browser.default.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.node.file_browser.default.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.block_content.file_browser.default.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.node.file_browser.default.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/field.field.block_content.file_browser.field_file_browser_reference.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.body.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.field_file_browser_image.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/field.storage.block_content.field_file_browser_reference.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/field.storage.node.field_file_browser_image.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/config/install/node.type.file_browser.yml delete mode 100644 web/modules/file_browser/modules/file_browser_example/file_browser_example.info.yml delete mode 100644 web/modules/file_browser/src/Controller/FileBrowserController.php delete mode 100644 web/modules/file_browser/src/Plugin/Block/ImageEmbedBlock.php delete mode 100644 web/modules/file_browser/src/Plugin/Field/FieldWidget/FileBrowser.php delete mode 100644 web/modules/file_browser/src/Plugin/views/field/FileBrowserPreview.php delete mode 100644 web/modules/file_browser/tests/src/Functional/InstallTest.php delete mode 100644 web/modules/file_browser/tests/src/FunctionalJavascript/FileBrowserTest.php diff --git a/composer.json b/composer.json index 70a7fd0dd5..119719ba4a 100644 --- a/composer.json +++ b/composer.json @@ -123,7 +123,6 @@ "drupal/externalauth": "1.4", "drupal/field_group": "3.4", "drupal/field_permissions": "1.2", - "drupal/file_browser": "1.3", "drupal/focal_point": "1.5", "drupal/google_analytics": "^4.0", "drupal/google_tag": "1.5", diff --git a/composer.lock b/composer.lock index 7d3f981610..d92d79eca2 100644 --- a/composer.lock +++ b/composer.lock @@ -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", diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 3dbe4d84f2..8229d04b01 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -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', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 367ef547ef..c23c421078 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.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', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2cbb06db5d..0ee5a824d8 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -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": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index c11be12430..f97c2176a0 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -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(), diff --git a/vendor/doctrine/deprecations/README.md b/vendor/doctrine/deprecations/README.md index 22f0cced3e..93caf83f82 100644 --- a/vendor/doctrine/deprecations/README.md +++ b/vendor/doctrine/deprecations/README.md @@ -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(); diff --git a/vendor/doctrine/deprecations/composer.json b/vendor/doctrine/deprecations/composer.json index c79e38cdcd..f8319f9a2a 100644 --- a/vendor/doctrine/deprecations/composer.json +++ b/vendor/doctrine/deprecations/composer.json @@ -1,22 +1,28 @@ { "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": { diff --git a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php b/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php index 1029372faa..07cb43b6ce 100644 --- a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php +++ b/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php @@ -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; } } diff --git a/vendor/doctrine/deprecations/phpstan.neon b/vendor/doctrine/deprecations/phpstan.neon new file mode 100644 index 0000000000..4ee286b8a7 --- /dev/null +++ b/vendor/doctrine/deprecations/phpstan.neon @@ -0,0 +1,9 @@ +parameters: + level: 6 + paths: + - lib + - tests + +includes: + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-phpunit/rules.neon diff --git a/vendor/doctrine/deprecations/psalm.xml b/vendor/doctrine/deprecations/psalm.xml new file mode 100644 index 0000000000..ad76e32e3c --- /dev/null +++ b/vendor/doctrine/deprecations/psalm.xml @@ -0,0 +1,30 @@ +<?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> diff --git a/vendor/egulias/email-validator/src/EmailLexer.php b/vendor/egulias/email-validator/src/EmailLexer.php index 6add6bd2b9..4099758ce5 100644 --- a/vendor/egulias/email-validator/src/EmailLexer.php +++ b/vendor/egulias/email-validator/src/EmailLexer.php @@ -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; diff --git a/vendor/egulias/email-validator/src/Parser.php b/vendor/egulias/email-validator/src/Parser.php index b1905f9abf..4e5ac7d1f6 100644 --- a/vendor/egulias/email-validator/src/Parser.php +++ b/vendor/egulias/email-validator/src/Parser.php @@ -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; } } diff --git a/vendor/egulias/email-validator/src/Parser/Comment.php b/vendor/egulias/email-validator/src/Parser/Comment.php index d6f3032fc3..34ef97263d 100644 --- a/vendor/egulias/email-validator/src/Parser/Comment.php +++ b/vendor/egulias/email-validator/src/Parser/Comment.php @@ -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); diff --git a/vendor/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php b/vendor/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php index cbbe3f201b..17b686be1c 100644 --- a/vendor/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php +++ b/vendor/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php @@ -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 diff --git a/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php b/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php index e72319a215..179802b833 100644 --- a/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php +++ b/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php @@ -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(); diff --git a/vendor/egulias/email-validator/src/Parser/DomainLiteral.php b/vendor/egulias/email-validator/src/Parser/DomainLiteral.php index e6d66d0bd8..10486346ad 100644 --- a/vendor/egulias/email-validator/src/Parser/DomainLiteral.php +++ b/vendor/egulias/email-validator/src/Parser/DomainLiteral.php @@ -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(); } } diff --git a/vendor/egulias/email-validator/src/Parser/DomainPart.php b/vendor/egulias/email-validator/src/Parser/DomainPart.php index e1f5b3bef3..84a4180f36 100644 --- a/vendor/egulias/email-validator/src/Parser/DomainPart.php +++ b/vendor/egulias/email-validator/src/Parser/DomainPart.php @@ -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(); } diff --git a/vendor/egulias/email-validator/src/Parser/DoubleQuote.php b/vendor/egulias/email-validator/src/Parser/DoubleQuote.php index b32e2b6b23..d722292d4e 100644 --- a/vendor/egulias/email-validator/src/Parser/DoubleQuote.php +++ b/vendor/egulias/email-validator/src/Parser/DoubleQuote.php @@ -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(); } diff --git a/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php b/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php index fff6ec3ef5..be4b05b82f 100644 --- a/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php +++ b/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php @@ -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); } } diff --git a/vendor/egulias/email-validator/src/Parser/IDLeftPart.php b/vendor/egulias/email-validator/src/Parser/IDLeftPart.php index 5fd9cdf992..3b01ae2902 100644 --- a/vendor/egulias/email-validator/src/Parser/IDLeftPart.php +++ b/vendor/egulias/email-validator/src/Parser/IDLeftPart.php @@ -10,6 +10,6 @@ class IDLeftPart extends LocalPart { protected function parseComments(): Result { - return new InvalidEmail(new CommentsInIDRight(), $this->lexer->token['value']); + return new InvalidEmail(new CommentsInIDRight(), ((array) $this->lexer->token)['value']); } } diff --git a/vendor/egulias/email-validator/src/Parser/IDRightPart.php b/vendor/egulias/email-validator/src/Parser/IDRightPart.php index 1a1268f2df..d19e05ab6f 100644 --- a/vendor/egulias/email-validator/src/Parser/IDRightPart.php +++ b/vendor/egulias/email-validator/src/Parser/IDRightPart.php @@ -20,9 +20,9 @@ protected function validateTokens(bool $hasComments) : Result EmailLexer::S_GREATERTHAN => true, EmailLexer::S_LOWERTHAN => true, ]; - - if (isset($invalidDomainTokens[$this->lexer->token['type']])) { - return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']); + + if (isset($invalidDomainTokens[((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(); } diff --git a/vendor/egulias/email-validator/src/Parser/LocalPart.php b/vendor/egulias/email-validator/src/Parser/LocalPart.php index 154521b27f..3f2ef7d8ed 100644 --- a/vendor/egulias/email-validator/src/Parser/LocalPart.php +++ b/vendor/egulias/email-validator/src/Parser/LocalPart.php @@ -36,12 +36,12 @@ public function parse() : Result { $this->lexer->startRecording(); - while ($this->lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) { + while (((array) $this->lexer->token)['type'] !== EmailLexer::S_AT && null !== ((array) $this->lexer->token)['type']) { if ($this->hasDotAtStart()) { - return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); + return new InvalidEmail(new DotAtStart(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_DQUOTE) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DQUOTE) { $dquoteParsingResult = $this->parseDoubleQuote(); //Invalid double quote parsing @@ -50,8 +50,8 @@ public function parse() : Result } } - 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 ) { $commentsResult = $this->parseComments(); //Invalid comment parsing @@ -60,14 +60,14 @@ public function parse() : Result } } - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ConsecutiveDot(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_DOT && + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_AT) ) { - return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']); + return new InvalidEmail(new DotAtEnd(), ((array) $this->lexer->token)['value']); } $resultEscaping = $this->validateEscaping(); @@ -99,8 +99,8 @@ public function parse() : Result protected function validateTokens(bool $hasComments) : Result { - if (isset(self::INVALID_TOKENS[$this->lexer->token['type']])) { - return new InvalidEmail(new ExpectingATEXT('Invalid token found'), $this->lexer->token['value']); + if (isset(self::INVALID_TOKENS[((array) $this->lexer->token)['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token found'), ((array) $this->lexer->token)['value']); } return new ValidEmail(); } @@ -110,7 +110,7 @@ public function localPart() : string return $this->localPart; } - private function parseLocalFWS() : Result + private function parseLocalFWS() : Result { $foldingWS = new FoldingWhiteSpace($this->lexer); $resultFWS = $foldingWS->parse(); @@ -122,7 +122,7 @@ private function parseLocalFWS() : Result private function hasDotAtStart() : bool { - return $this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']; + return ((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']; } private function parseDoubleQuote() : Result @@ -148,12 +148,12 @@ protected function parseComments(): Result private function validateEscaping() : Result { //Backslash found - if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { + if (((array) $this->lexer->token)['type'] !== EmailLexer::S_BACKSLASH) { return new ValidEmail(); } if ($this->lexer->isNextToken(EmailLexer::GENERIC)) { - return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), ((array) $this->lexer->token)['value']); } if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) { diff --git a/vendor/egulias/email-validator/src/Parser/PartParser.php b/vendor/egulias/email-validator/src/Parser/PartParser.php index a75a172acb..7fc6d7bf31 100644 --- a/vendor/egulias/email-validator/src/Parser/PartParser.php +++ b/vendor/egulias/email-validator/src/Parser/PartParser.php @@ -45,8 +45,8 @@ protected function parseFWS() : Result protected function checkConsecutiveDots() : Result { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ConsecutiveDot(), ((array) $this->lexer->token)['value']); } return new ValidEmail(); @@ -58,6 +58,6 @@ protected function escaped() : bool return $previous && $previous['type'] === EmailLexer::S_BACKSLASH && - $this->lexer->token['type'] !== EmailLexer::GENERIC; + ((array) $this->lexer->token)['type'] !== EmailLexer::GENERIC; } } diff --git a/vendor/symfony/var-dumper/Caster/DateCaster.php b/vendor/symfony/var-dumper/Caster/DateCaster.php index 18641fbc1d..d07bac5831 100644 --- a/vendor/symfony/var-dumper/Caster/DateCaster.php +++ b/vendor/symfony/var-dumper/Caster/DateCaster.php @@ -27,7 +27,7 @@ class DateCaster public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter) { $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); + $location = $d->getTimezone() ? $d->getTimezone()->getLocation() : null; $fromNow = (new \DateTime())->diff($d); $title = $d->format('l, F j, Y') diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json index dc46f58d99..fc127d721a 100644 --- a/vendor/symfony/var-dumper/composer.json +++ b/vendor/symfony/var-dumper/composer.json @@ -28,7 +28,6 @@ "twig/twig": "^2.13|^3.0.4" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<4.4" }, "suggest": { diff --git a/web/modules/file_browser/LICENSE.txt b/web/modules/file_browser/LICENSE.txt deleted file mode 100644 index d159169d10..0000000000 --- a/web/modules/file_browser/LICENSE.txt +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/web/modules/file_browser/README.txt b/web/modules/file_browser/README.txt deleted file mode 100644 index df06d9dbba..0000000000 --- a/web/modules/file_browser/README.txt +++ /dev/null @@ -1,99 +0,0 @@ -CONTENTS OF THIS FILE ---------------------- - - * Introduction - * Requirements - * Recommended Modules - * Installation - * Configuration - * Maintainers - - -INTRODUCTION ------------- - -The File Entity Browser module provides a default Entity Browser for files, -using Masonry and Imagesloaded. - -The purpose of this module is to bring back the Media Library experience from -Drupal 7, without requiring users to standardize on contributed projects like -File Entity and Media Entity. - - * For a full description of the module visit: - https://www.drupal.org/project/file_browser - - * To submit bug reports and feature suggestions, or to track changes visit: - https://www.drupal.org/project/issues/file_browser - - -REQUIREMENTS ------------- - -This module requires the following modules: - - * Entity Browser - https://www.drupal.org/project/entity_browser - * Entity Embed - https://www.drupal.org/project/entity_embed - * Dropzonejs - https://www.drupal.org/project/dropzonejs - * Embed - https://www.drupal.org/project/embed - -This module requires the following libraries: - - * imagesLoaded library - https://github.com/desandro/imagesloaded - * Masonry library - https://github.com/desandro/masonry/ - * dropzone.min.js library - https://github.com/enyo/dropzone - - -RECOMMENDED MODULES -------------------- - -This module introduces a common repository for libraries in sites/all/libraries -resp. sites/<domain>/libraries for contributed modules. - - * Libraries API - https://www.drupal.org/project/libraries - - -INSTALLATION ------------- - -Install the File Entity Browser module as you would normally install a -contributed Drupal module. Visit https://www.drupal.org/node/1897420 for further -information. - -If you maintain a composer.json file for your Drupal project, you can require -this module and its dependencies! A fully complete example can be found here: - - * example composer.json file - - https://gist.github.com/mortenson/a5390d99013b5b8c0254081e89bb4d47 - - -CONFIGURATION -------------- - - 1. Download the required libraries in the libraries directory. - a. Download https://github.com/desandro/imagesloaded/archive/v3.2.0.zip - and extract the download to /libraries/imagesloaded (or any libraries - directory if you're using the Libraries module). - b. Download https://github.com/desandro/masonry/archive/v3.3.2.zip and - extract the download to /libraries/masonry (or any libraries directory - if you're using the Libraries module). - c. Download https://github.com/enyo/dropzone/archive/v4.3.0.zip and - extract the download to /libraries/dropzone (or any libraries - directory if you're using the Libraries module). - 2. Navigate to Adminstration > Extend and enabled the File Entity Browser - and its dependencies. - -Please note: -The example sub-module "File Browser Example" includes a Custom Block/Content -Type that uses File Browser components for File, Image, and File Entity -Reference fields. Enable the example module if you'd like to quickly see how -Entity Browser integration with File Browser can work. - - -MAINTAINERS ------------ - - * Samuel Mortenson (samuel.mortenson) - - https://www.drupal.org/u/samuelmortenson - -Supporting organization: - * Acquia - https://www.drupal.org/acquia diff --git a/web/modules/file_browser/composer.json b/web/modules/file_browser/composer.json deleted file mode 100644 index ab73f54582..0000000000 --- a/web/modules/file_browser/composer.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "drupal/file_browser", - "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.", - "type": "drupal-module", - "license": "GPL-2.0", - "require": { - "drupal/core": "~8 || ~9", - "drupal/entity_browser": "^2 || ^1", - "drupal/dropzonejs": "^2", - "drupal/embed": "^1", - "drupal/entity_embed": "^1" - }, - "require-dev": { - "drupal/coder": "~8.3" - } -} diff --git a/web/modules/file_browser/config/install/embed.button.file_browser.yml b/web/modules/file_browser/config/install/embed.button.file_browser.yml deleted file mode 100644 index 6f858283c6..0000000000 --- a/web/modules/file_browser/config/install/embed.button.file_browser.yml +++ /dev/null @@ -1,20 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - entity_embed - - file - - image -label: 'File Browser' -id: file_browser -type_id: entity -type_settings: - entity_type: file - bundles: { } - display_plugins: - - 'file:file_default' - - 'image:image' - entity_browser: browse_files - entity_browser_settings: - display_review: false -icon_uuid: db2cad05-1e3b-4b35-b163-99d7d036130c diff --git a/web/modules/file_browser/config/install/entity_browser.browser.browse_files.yml b/web/modules/file_browser/config/install/entity_browser.browser.browse_files.yml deleted file mode 100644 index ca0e44b2d6..0000000000 --- a/web/modules/file_browser/config/install/entity_browser.browser.browse_files.yml +++ /dev/null @@ -1,45 +0,0 @@ -langcode: und -status: true -dependencies: - config: - - views.view.file_entity_browser - - image.style.file_entity_browser_small - enforced: - module: - - file_browser -name: browse_files -label: 'Browser for files' -display: iframe -display_configuration: - width: '100%' - height: '768' - link_text: 'Select files' - auto_open: true -selection_display: multi_step_display -selection_display_configuration: - entity_type: file - display: thumbnail - display_settings: - image_style: file_entity_browser_small - selection_hidden: false -widget_selector: tabs -widget_selector_configuration: { } -widgets: - a4ad947c-9669-497c-9988-24351955a02f: - settings: - view: file_entity_browser - view_display: entity_browser_1 - auto_select: true - uuid: a4ad947c-9669-497c-9988-24351955a02f - weight: 1 - label: 'Files listing' - id: view - 735d146c-a4b2-4327-a057-d109e0905e05: - settings: - upload_location: 'public://' - dropzone_description: 'Click or drop files here to upload them' - extensions: 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp' - uuid: 735d146c-a4b2-4327-a057-d109e0905e05 - weight: 0 - label: 'Upload files' - id: dropzonejs diff --git a/web/modules/file_browser/config/install/entity_browser.browser.browse_files_modal.yml b/web/modules/file_browser/config/install/entity_browser.browser.browse_files_modal.yml deleted file mode 100644 index b5cef3cce1..0000000000 --- a/web/modules/file_browser/config/install/entity_browser.browser.browse_files_modal.yml +++ /dev/null @@ -1,45 +0,0 @@ -langcode: und -status: true -dependencies: - config: - - views.view.file_entity_browser - - image.style.file_entity_browser_small - enforced: - module: - - file_browser -name: browse_files_modal -label: 'Browser for files (modal)' -display: modal -display_configuration: - width: '1100' - height: '650' - link_text: 'Select files' - auto_open: false -selection_display: multi_step_display -selection_display_configuration: - entity_type: file - display: thumbnail - display_settings: - image_style: file_entity_browser_small - selection_hidden: false -widget_selector: tabs -widget_selector_configuration: { } -widgets: - a4ad947c-9669-497c-9988-24351955a02f: - settings: - view: file_entity_browser - view_display: entity_browser_1 - auto_select: true - uuid: a4ad947c-9669-497c-9988-24351955a02f - weight: 1 - label: 'Files listing' - id: view - 735d146c-a4b2-4327-a057-d109e0905e05: - settings: - upload_location: 'public://' - dropzone_description: 'Click or drop files here to upload them' - extensions: 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp' - uuid: 735d146c-a4b2-4327-a057-d109e0905e05 - weight: 0 - label: 'Upload files' - id: dropzonejs diff --git a/web/modules/file_browser/config/install/image.style.file_entity_browser_small.yml b/web/modules/file_browser/config/install/image.style.file_entity_browser_small.yml deleted file mode 100644 index 29b08628aa..0000000000 --- a/web/modules/file_browser/config/install/image.style.file_entity_browser_small.yml +++ /dev/null @@ -1,13 +0,0 @@ -langcode: en -status: true -dependencies: { } -name: file_entity_browser_small -label: 'File Entity Browser small thumbnail' -effects: - 374fe20a-a27c-45f5-b76d-d851cabcf7b0: - uuid: 374fe20a-a27c-45f5-b76d-d851cabcf7b0 - id: image_scale_and_crop - weight: 1 - data: - width: 100 - height: 100 diff --git a/web/modules/file_browser/config/install/image.style.file_entity_browser_thumbnail.yml b/web/modules/file_browser/config/install/image.style.file_entity_browser_thumbnail.yml deleted file mode 100644 index 400eb347bd..0000000000 --- a/web/modules/file_browser/config/install/image.style.file_entity_browser_thumbnail.yml +++ /dev/null @@ -1,14 +0,0 @@ -langcode: en -status: true -dependencies: { } -name: file_entity_browser_thumbnail -label: 'File Entity Browser thumbnail' -effects: - 2002cfd3-6b51-4668-b204-4b33425cf3f7: - uuid: 2002cfd3-6b51-4668-b204-4b33425cf3f7 - id: image_scale - weight: 1 - data: - width: 350 - height: null - upscale: false diff --git a/web/modules/file_browser/config/install/views.view.file_entity_browser.yml b/web/modules/file_browser/config/install/views.view.file_entity_browser.yml deleted file mode 100644 index 48b16ff80a..0000000000 --- a/web/modules/file_browser/config/install/views.view.file_entity_browser.yml +++ /dev/null @@ -1,606 +0,0 @@ -langcode: en -status: true -dependencies: - enforced: - module: - - file_browser - module: - - entity_browser - - file - - file_browser - - user -id: file_entity_browser -label: 'File Entity Browser' -module: views -description: '' -tag: '' -base_table: file_managed -base_field: fid -core: 8.x -display: - default: - display_plugin: default - id: default - display_title: Master - position: 0 - display_options: - access: - type: perm - options: - perm: 'access content' - cache: - type: none - options: { } - query: - type: views_query - options: - disable_sql_rewrite: false - distinct: false - replica: false - query_comment: '' - query_tags: { } - exposed_form: - type: basic - options: - submit_button: Apply - reset_button: false - reset_button_label: Reset - exposed_sorts_label: 'Sort by' - expose_sort_order: true - sort_asc_label: Asc - sort_desc_label: Desc - pager: - type: full - options: - items_per_page: 25 - offset: 0 - id: 0 - total_pages: null - tags: - previous: '‹ previous' - next: 'next ›' - first: '« first' - last: 'last »' - expose: - items_per_page: false - items_per_page_label: 'Items per page' - items_per_page_options: '5, 10, 25, 50' - items_per_page_options_all: false - items_per_page_options_all_label: '- All -' - offset: false - offset_label: Offset - quantity: 9 - style: - type: default - options: - grouping: { } - row_class: grid-item - default_row_class: true - row: - type: fields - options: - inline: { } - separator: '' - hide_empty: false - default_field_elements: true - fields: - entity_browser_select: - id: entity_browser_select - table: file_managed - field: entity_browser_select - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: null - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - entity_type: file - plugin_id: entity_browser_select - file_browser_preview: - id: file_browser_preview - table: file_managed - field: file_browser_preview - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - entity_type: file - plugin_id: file_browser_preview - filename: - id: filename - table: file_managed - field: filename - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: true - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 15 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: string - settings: - link_to_entity: false - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - entity_type: file - entity_field: filename - plugin_id: field - filesize: - id: filesize - table: file_managed - field: filesize - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: true - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: file_size - settings: { } - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - entity_type: file - entity_field: filesize - plugin_id: field - nothing: - id: nothing - table: views - field: nothing - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: true - text: "<div class=\"grid-item-info\">\n<div class=\"grid-item-info-left\" title=\"{{ filename }}\">{{ filename }}</div>\n<div class=\"grid-item-info-right\">{{ filesize }}</div>\n</div>" - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: false - plugin_id: custom - filters: - filename: - id: filename - table: file_managed - field: filename - relationship: none - group_type: group - admin_label: '' - operator: contains - value: '' - group: 1 - exposed: true - expose: - operator_id: filename_op - label: Filename - description: '' - use_operator: false - operator: filename_op - identifier: filename - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - anonymous: '0' - administrator: '0' - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: file - entity_field: filename - plugin_id: string - filemime: - id: filemime - table: file_managed - field: filemime - relationship: none - group_type: group - admin_label: '' - operator: contains - value: '' - group: 1 - exposed: true - expose: - operator_id: filemime_op - label: 'File MIME type' - description: '' - use_operator: false - operator: filemime_op - identifier: filemime - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - anonymous: '0' - administrator: '0' - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: file - entity_field: filemime - plugin_id: string - status: - id: status - table: file_managed - field: status - relationship: none - group_type: group - admin_label: '' - operator: in - value: - 1: '1' - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - reduce: false - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: file - entity_field: status - plugin_id: file_status - filename_1: - id: filename_1 - table: file_managed - field: filename - relationship: none - group_type: group - admin_label: '' - operator: '!=' - value: file_browser_icon.png - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: file - entity_field: filename - plugin_id: string - sorts: - created: - id: created - table: file_managed - field: created - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: true - expose: - label: 'Created date' - granularity: second - entity_type: file - entity_field: created - plugin_id: date - filesize: - id: filesize - table: file_managed - field: filesize - relationship: none - group_type: group - admin_label: '' - order: ASC - exposed: true - expose: - label: 'File size' - entity_type: file - entity_field: filesize - plugin_id: standard - filename: - id: filename - table: file_managed - field: filename - relationship: none - group_type: group - admin_label: '' - order: ASC - exposed: true - expose: - label: Filename - entity_type: file - entity_field: filename - plugin_id: standard - header: { } - footer: { } - empty: { } - relationships: { } - arguments: { } - display_extenders: { } - css_class: '' - use_ajax: true - cache_metadata: - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url - - url.query_args - - 'url.query_args:sort_by' - - 'url.query_args:sort_order' - - user.permissions - cacheable: false - max-age: -1 - tags: { } - entity_browser_1: - display_plugin: entity_browser - id: entity_browser_1 - display_title: 'Entity browser' - position: 2 - display_options: - display_extenders: { } - cache_metadata: - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url - - url.query_args - - 'url.query_args:sort_by' - - 'url.query_args:sort_order' - - user.permissions - cacheable: false - max-age: -1 - tags: { } diff --git a/web/modules/file_browser/css/file_browser.dropzone.css b/web/modules/file_browser/css/file_browser.dropzone.css deleted file mode 100644 index a89227baa8..0000000000 --- a/web/modules/file_browser/css/file_browser.dropzone.css +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @file file_browser.dropzone.css - */ - -.dropzone .dz-preview .dz-success-mark { - background: transparent url("../images/checkmark.svg") no-repeat center center; - background-size: 100% 100%; - width: 54px; - height: 54px; - top: -20px; - right: 0; - bottom: 0; - left: 0; - margin: auto; -} - -.dropzone .dz-preview .dz-error-mark { - width: 54px; - height: 54px; - top: -20px; - right: 0; - bottom: 0; - left: 0; - margin: auto; -} - -div.dz-preview > div.dz-success-mark > svg > g { - display: none; -} diff --git a/web/modules/file_browser/css/file_browser.iframe.css b/web/modules/file_browser/css/file_browser.iframe.css deleted file mode 100644 index 6486e74eb2..0000000000 --- a/web/modules/file_browser/css/file_browser.iframe.css +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @file file_browser.iframe.css - */ - -/* Remove the border on our iframe element. */ - -#edit-field-file-browser-reference iframe { - border: none; -} diff --git a/web/modules/file_browser/css/file_browser.preview.css b/web/modules/file_browser/css/file_browser.preview.css deleted file mode 100644 index 348a501e6c..0000000000 --- a/web/modules/file_browser/css/file_browser.preview.css +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file file_browser.preview.css - */ - -.file-browser-preview-dialog { - position: absolute; - height: 100% !important; - width: 100% !important; - max-width: none !important; - top: 0 !important; - left: 0 !important; -} - -.file-browser-preview-dialog #drupal-modal { - width: 100% !important; - height: 100% !important; - max-height: none !important; - padding-top: 0; - margin-top: -20px; - background: #2d2d2d; -} - -#file-browser-preview-wrapper { - max-width: 90%; -} - -.file-browser-preview-dialog.ui-dialog .ui-dialog-titlebar { - background-color: #2d2d2d; - border-radius: 0; -} - -.file-browser-preview-dialog.ui-dialog .ui-dialog-title { - color: transparent; -} diff --git a/web/modules/file_browser/css/file_browser.view.css b/web/modules/file_browser/css/file_browser.view.css deleted file mode 100644 index 1d4aca95e3..0000000000 --- a/web/modules/file_browser/css/file_browser.view.css +++ /dev/null @@ -1,281 +0,0 @@ -/** -* @file file_browser.view.css -*/ - - -/* Generic styles */ - -.pager { - padding: 20px; -} - -/* set default standard media queries for responsive grid. */ -@media only screen and (min-width: 320px) { - .grid-sizer, - .grid-item { - width: calc(50% - 5px); - } - .gutter-sizer { - width: 5px; - } - .grid-item { - margin-bottom: 5px; - } -} - -@media only screen and (min-width: 768px) { - .grid-sizer, - .grid-item { - width: calc(33% - 10px); - } - .gutter-sizer { - width: 10px; - } - .grid-item { - margin-bottom: 10px; - } -} - -@media only screen and (min-width: 992px) { - .grid-sizer, - .grid-item { - width: calc(25% - 10px); - } - .gutter-sizer { - width: 10px; - } - .grid-item { - margin-bottom: 10px; - } -} - -/* Jump back down for XL screens to better utilize the space. */ -@media only screen and (min-width: 1600px) { - .grid-sizer, - .grid-item { - width: calc(15% - 10px); - } - .gutter-sizer { - width: 10px; - } - .grid-item { - margin-bottom: 10px; - } -} - -.grid-item { - display: block; - opacity: 0; - text-align: center; - background-color: #dedede; - overflow: hidden; - border-radius: 2px; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2); -} - -.grid-item.item-style { - opacity: 1; - transition: opacity .25s ease-in-out, box-shadow .25s ease-in-out; - -moz-transition: opacity .25s ease-in-out, box-shadow .25s ease-in-out;; - -webkit-transition: opacity .25s ease-in-out, box-shadow .25s ease-in-out;; -} - -.grid-item:hover { - cursor: pointer; -} - -.grid-item.checked:before { - content: " "; - color: transparent; - position: absolute; - left: 0; - right: 0; - top: 0; - width: calc(100% - 4px); - height: calc(100% - 4px); - border: 2px solid #37802f; - overflow: hidden; -} - -.grid-item:hover { - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 7px 3px rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2); -} - -.view-content { - margin: 0 auto; - width: 100% !important; -} - -.grid-item img { - vertical-align: bottom; - width: 100%; - height: auto; -} - -.grid-item img::selection { - background: transparent; -} - -.grid-item .views-field-entity-browser-select { - display: none; -} - -.grid-item:after { - content: " "; - width: 100%; - height: 100%; - top: 0; - left: 0; - position: absolute; -} - -.grid-item-info { - position: absolute; - z-index: 1; - width: calc(100% - 20px); - bottom: 0; - background-color: #2d2d2d; - color: #dedede; - padding: 10px; -} - -.grid-item-info-left { - float: left; - text-align: left; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 50%; -} - -.grid-item-info-right { - float: right; -} - -.file-browser-form { - position: relative; -} - - -/* Remove border above tabs. */ - -.file-browser-form .is-collapse-enabled .tabs:before, -.file-browser-form .is-horizontal .tabs:before { - background-color: transparent; -} - -input[type="submit"][name="filter"] { - margin-left: 10px; - margin-top: 30px; -} - -.layout-container { - margin: 0; -} - -.file-browser-actions { - position: fixed; - bottom: 0; - display: flex; - flex-direction: row-reverse; - justify-content: flex-end; - align-items: center; - z-index: 2; - padding: 10px; - width: 100%; - background: white; - border-top: 1px solid #b8b8b8; -} - -input.entity-browser-show-selection { - display: none; -} - -.entities-list .item-container { - position: relative; - border: 1px dashed gray; - margin: 5px; -} - -.entities-list .item-container > img, -.entities-list .item-container > input { - margin: 0; -} - -.entities-list .item-container:hover { - opacity: 1; -} - -.entities-list .item-container:hover img, -.entities-list .item-container:hover input { - transition: .2s; -} - -.entities-list .item-container:hover img { - opacity: .6; -} - -.entities-list .item-container:hover input { - opacity: 1; -} - -.entities-list .item-container input { - background: url(../images/remove.svg); - opacity: 0; - background-size: cover; - color: transparent; - text-shadow: none; - position: absolute; - width: 20px; - height: 20px; - padding: 0; - top: 2px; - right: 2px; - border-radius: 10px; - margin: 0; - background-color: #dedede; - border: 1px solid #585858; -} - -.entities-list .item-container input:hover { - background-color: #afafaf; -} - -.file-browser-file-counter { - display: flex; - align-items: center; - height: 25px; - padding: 0 0 0 25px; - margin-bottom: 5px; - background: url(../images/checkmark.svg); - background-position: 0px; - background-size: 20px; - background-repeat: no-repeat; -} - -.grid-item:hover .file-browser-preview-button { - opacity: 1; -} - -.file-browser-preview-button { - position: absolute; - top: 5px; - right: 5px; - background: url(../images/preview.svg); - z-index: 2; - background-size: 30px; - background-position: 5px; - background-color: #2d2d2d; - border-radius: 50%; - height: 40px; - width: 40px; - background-repeat: no-repeat; - color: transparent; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2); - opacity: 0; - transition: opacity .2s; -} - -.file-browser-preview-button + .ajax-progress { - display: none; -} diff --git a/web/modules/file_browser/file_browser.info.yml b/web/modules/file_browser/file_browser.info.yml deleted file mode 100644 index 70def5b038..0000000000 --- a/web/modules/file_browser/file_browser.info.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: File Browser -description: 'Provides a default Entity Browser for files, using Masonry and Imagesloaded.' -type: module -core: 8.x -core_version_requirement: ^8 || ^9 -dependencies: - - entity_browser:entity_browser - - entity_embed:entity_embed - - dropzonejs:dropzonejs - - dropzonejs:dropzonejs_eb_widget - - drupal:field (>=8.7.0) - - drupal:file (>=8.7.0) - - drupal:image (>=8.7.0) - - drupal:menu_ui (>=8.7.0) - - drupal:node (>=8.7.0) - - drupal:path (>=8.7.0) - - drupal:text (>=8.7.0) - - drupal:views (>=8.7.0) -test_dependencies: - - coder:coder - -# Information added by Drupal.org packaging script on 2020-05-24 -version: '8.x-1.3' -project: 'file_browser' -datestamp: 1590339388 diff --git a/web/modules/file_browser/file_browser.install b/web/modules/file_browser/file_browser.install deleted file mode 100644 index eefbf58bd7..0000000000 --- a/web/modules/file_browser/file_browser.install +++ /dev/null @@ -1,256 +0,0 @@ -<?php - -/** - * @file - * Defines library requirements and install routines for File Browser. - */ - -use Drupal\Component\Serialization\Yaml; -use Drupal\image\Entity\ImageStyle; -use Drupal\views\Entity\View; -use Drupal\Core\File\FileSystemInterface; - -/** - * Implements hook_install(). - */ -function file_browser_install() { - // Add an icon for File Browser if we aren't installing from configuration. - if (!\Drupal::isConfigSyncing()) { - $data = file_get_contents(dirname(__FILE__) . '/file_browser_icon.png'); - /** @var \Drupal\file\FileInterface $file */ - $file = file_save_data($data, 'public://file_browser_icon.png', FileSystemInterface::EXISTS_REPLACE); - if ($file) { - // Set file uuid same as default config. - $uuid = Yaml::decode(file_get_contents(dirname(__FILE__) . '/config/install/embed.button.file_browser.yml'))['icon_uuid']; - $file->set('uuid', $uuid); - $file->save(); - \Drupal::service('file.usage')->add($file, 'embed', 'embed_button', 'file_browser'); - } - } -} - -/** - * Implements hook_uninstall(). - */ -function file_browser_uninstall() { - Drupal::configFactory()->getEditable('image.style.file_entity_browser_small')->delete(); - Drupal::configFactory()->getEditable('image.style.file_entity_browser_thumbnail')->delete(); - Drupal::configFactory()->getEditable('embed.button.file_browser')->delete(); -} - -/** - * Implements hook_requirements(). - */ -function file_browser_requirements($phase) { - - $requirements = []; - - // Optionally use the Libraries module to determine our library paths. - if (\Drupal::moduleHandler()->moduleExists('libraries')) { - $imagesloaded_path = libraries_get_path('imagesloaded') . '/imagesloaded.pkgd.min.js'; - $masonry_path = libraries_get_path('masonry') . '/dist/masonry.pkgd.min.js'; - } - else { - $imagesloaded_path = DRUPAL_ROOT . '/libraries/imagesloaded/imagesloaded.pkgd.min.js'; - $masonry_path = DRUPAL_ROOT . '/libraries/masonry/dist/masonry.pkgd.min.js'; - } - - if (!file_exists($imagesloaded_path)) { - $requirements['imagesloaded'] = [ - 'title' => t('imagesLoaded library missing'), - 'description' => t( - 'File Browser requires the imagesLoaded library. Download the newest release -from https://github.com/desandro/imagesloaded releases and place it in /libraries' - ), - 'severity' => REQUIREMENT_ERROR, - ]; - } - - if (!file_exists($masonry_path)) { - $requirements['masonry'] = [ - 'title' => t('Masonry library missing'), - 'description' => t( - 'File Browser requires the Masonry library. Download the newest release from -https://github.com/desandro/masonry/releases and place it in /libraries' - ), - 'severity' => REQUIREMENT_ERROR, - ]; - } - - // Prevent installation if the webserver cannot write to "public://" . - $public_path = \Drupal::service('file_system')->realpath('public://'); - if ($public_path !== FALSE && !\Drupal::isConfigSyncing() && !is_writable($public_path)) { - $requirements['public_files_not_writable'] = [ - 'title' => t('Public files directory not writable'), - 'description' => t('The webserver needs to be able to write to the public files directory (public://). Please check your server configuration and try again.'), - 'severity' => REQUIREMENT_ERROR, - ]; - } - - return $requirements; -} - -/** - * Updates entity browser configuration to remove outdated values. - */ -function file_browser_update_8001() { - /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ - $config_factory = \Drupal::service('config.factory'); - $list = $config_factory->listAll('entity_browser.browser'); - - foreach (['entity_browser.browser.browse_files', 'entity_browser.browser.browse_files_modal'] as $name) { - if (in_array($name, $list, TRUE)) { - $entity_browser = $config_factory->getEditable($name); - if ($text = $entity_browser->get('display_configuration.widget_ids')) { - $entity_browser->clear('display_configuration.widget_ids'); - } - if ($name === 'entity_browser.browser.browse_files_modal') { - $entity_browser->set('display_configuration.auto_open', FALSE); - } - $entity_browser->save(); - } - } -} - -/** - * Updates entity browser configuration to update outdated values. - */ -function file_browser_update_8002() { - /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ - $config_factory = \Drupal::service('config.factory'); - $list = $config_factory->listAll('entity_browser.browser'); - - foreach (['entity_browser.browser.browse_files', 'entity_browser.browser.browse_files_modal'] as $name) { - if (in_array($name, $list, TRUE)) { - $entity_browser = $config_factory->getEditable($name); - $entity_browser->set('selection_display_configuration.selection_hidden', FALSE); - if ($entity_browser->get('widgets.a4ad947c-9669-497c-9988-24351955a02f')) { - $entity_browser->set('widgets.a4ad947c-9669-497c-9988-24351955a02f.settings.auto_select', TRUE); - } - $entity_browser->save(); - } - } - - /** @var \Drupal\image\Entity\ImageStyle $image_style */ - if ($image_style = ImageStyle::load('file_entity_browser_small')) { - $effect = $image_style->getEffect('374fe20a-a27c-45f5-b76d-d851cabcf7b0'); - $effect->setConfiguration([ - 'uuid' => '374fe20a-a27c-45f5-b76d-d851cabcf7b0', - 'id' => 'image_scale_and_crop', - 'weight' => 1, - 'data' => [ - 'width' => 100, - 'height' => 100, - ], - ]); - $image_style->save(); - } -} - -/** - * Updates the file browser view to only show permanent files. - */ -function file_browser_update_8003() { - /** @var \Drupal\views\Entity\View $view */ - if ($view = View::load('file_entity_browser')) { - $display = &$view->getDisplay('default'); - $display['display_options']['filters']['status'] = [ - 'id' => 'status', - 'table' => 'file_managed', - 'field' => 'status', - 'relationship' => 'none', - 'group_type' => 'group', - 'admin_label' => '', - 'operator' => 'in', - 'value' => [ - 1 => '1', - ], - 'group' => 1, - 'exposed' => FALSE, - 'expose' => [ - 'operator_id' => '', - 'label' => '', - 'description' => '', - 'use_operator' => FALSE, - 'operator' => '', - 'identifier' => '', - 'required' => FALSE, - 'remember' => FALSE, - 'multiple' => FALSE, - 'remember_roles' => [ - 'authenticated' => 'authenticated', - ], - 'reduce' => FALSE, - ], - 'is_grouped' => FALSE, - 'group_info' => [ - 'label' => '', - 'description' => '', - 'identifier' => '', - 'optional' => TRUE, - 'widget' => 'select', - 'multiple' => FALSE, - 'remember' => FALSE, - 'default_group' => 'All', - 'default_group_multiple' => [], - 'group_items' => [], - ], - 'entity_type' => 'file', - 'entity_field' => 'status', - 'plugin_id' => 'file_status', - ]; - $view->save(); - } -} - -/** - * Updates alpha1 users to use the correct View machine name. - */ -function file_browser_update_8004() { - /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ - $config_factory = \Drupal::service('config.factory'); - if (empty($config_factory->get('views.view.file_entity_browser')->getRawData()) && !empty($config_factory->get('views.view.files_entity_browser')->getRawData())) { - $config_factory->rename('views.view.files_entity_browser', 'views.view.file_entity_browser'); - $view = $config_factory->getEditable('views.view.file_entity_browser'); - $view->set('id', 'file_entity_browser'); - $view->save(); - - // Re-run file_browser_update_8003(), which never ran on the old view. - file_browser_update_8003(); - - $list = $config_factory->listAll('entity_browser.browser'); - - foreach (['entity_browser.browser.browse_files', 'entity_browser.browser.browse_files_modal'] as $name) { - if (in_array($name, $list, TRUE)) { - $entity_browser = $config_factory->getEditable($name); - if ($entity_browser->get('widgets.a4ad947c-9669-497c-9988-24351955a02f')) { - $entity_browser->set('widgets.a4ad947c-9669-497c-9988-24351955a02f.settings.view', 'file_entity_browser'); - } - $entity_browser->save(); - } - } - } -} - -/** - * Fix widget configuration if it was broken by a previous update. - */ -function file_browser_update_8005() { - /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ - $config_factory = \Drupal::service('config.factory'); - $list = $config_factory->listAll('entity_browser.browser'); - - $default_uuid = 'a4ad947c-9669-497c-9988-24351955a02f'; - - foreach (['entity_browser.browser.browse_files', 'entity_browser.browser.browse_files_modal'] as $name) { - if (in_array($name, $list, TRUE)) { - $entity_browser = $config_factory->getEditable($name); - $widgets = $entity_browser->get('widgets'); - // If the UUID exists but has no plugin ID, it was added accidentally. - if (isset($widgets[$default_uuid]) && !isset($widgets[$default_uuid]['id'])) { - $entity_browser->clear("widgets.$default_uuid"); - $entity_browser->save(); - } - } - } -} diff --git a/web/modules/file_browser/file_browser.libraries.yml b/web/modules/file_browser/file_browser.libraries.yml deleted file mode 100644 index 17c5a19b48..0000000000 --- a/web/modules/file_browser/file_browser.libraries.yml +++ /dev/null @@ -1,61 +0,0 @@ -iframe: - version: VERSION - css: - theme: - css/file_browser.iframe.css: {} - -dropzone_css: - version: VERSION - css: - theme: - css/file_browser.dropzone.css: {} - -view: - version: VERSION - js: - js/file_browser.view.js: {} - css: - theme: - css/file_browser.view.css: {} - dependencies: - - core/jquery - - core/drupal - - core/jquery.once - - file_browser/imagesloaded - - file_browser/masonry - -preview: - version: VERSION - js: - js/file_browser.preview.js: {} - css: - theme: - css/file_browser.preview.css: {} - dependencies: - - core/jquery - - core/drupal - - core/jquery.once - -imagesloaded: - remote: https://github.com/desandro/imagesloaded - version: VERSION - license: - name: MIT - url: https://github.com/desandro/imagesloaded/ - gpl-compatible: true - js: - /libraries/imagesloaded/imagesloaded.pkgd.min.js: { minified: true } - dependencies: - - core/jquery - -masonry: - remote: http://masonry.desandro.com/ - version: VERSION - license: - name: MIT - url: https://github.com/desandro/masonry/ - gpl-compatible: true - js: - /libraries/masonry/dist/masonry.pkgd.min.js: { minified: true } - dependencies: - - core/jquery diff --git a/web/modules/file_browser/file_browser.module b/web/modules/file_browser/file_browser.module deleted file mode 100644 index 3cc240a483..0000000000 --- a/web/modules/file_browser/file_browser.module +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/** - * @file - * Contains hook implementations for file_browser. - */ - -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Form\FormStateInterface; - -/** - * Implements hook_help(). - */ -function file_browser_help($route_name, RouteMatchInterface $route_match) { - switch ($route_name) { - // Main module help for the file_browser module. - case 'help.page.file_browser': - $output = ''; - $output .= '<h3>' . t('About') . '</h3>'; - $output .= '<p>' . t('Provides an entity browser for files.') . '</p>'; - return $output; - - default: - } -} - -/** - * Implements hook_form_alter(). - */ -function file_browser_form_alter(&$form, FormStateInterface &$form_state) { - if (isset($form['#form_id'])) { - if ($form['#form_id'] == 'entity_browser_browse_files_form' || - $form['#form_id'] == 'entity_browser_browse_files_modal_form') { - file_browser_attach_file_browser_to_form($form); - } - } -} - -/** - * Attach the file_browser functionality into a form. - * - * @param array $form - * Nested array of form elements that comprise the form. - */ -function file_browser_attach_file_browser_to_form(array &$form) { - // Attach our library. - $form['#attached']['library'][] = 'file_browser/view'; - $form['#attached']['library'][] = 'file_browser/dropzone_css'; - - if (isset($form['selection_display'])) { - $form['selection_display']['#type'] = 'container'; - $form['selection_display']['#attributes']['class'] = ['file-browser-actions']; - } - - // Add a class for generic styling. - $form['#attributes']['class'][] = 'file-browser-form'; -} - -/** - * Implements hook_preprocess_details(). - */ -function file_browser_preprocess_details(&$variables) { - if (isset($variables['element']['#id']) && $variables['element']['#id'] == 'edit-field-file-browser-reference') { - $variables['#attached']['library'][] = 'file_browser/iframe'; - } -} - -/** - * Implements hook_library_info_alter(). - */ -function file_browser_library_info_alter(&$libraries, $extension) { - // Optionally use the Libraries module to determine our library paths. - if ($extension == 'file_browser' && \Drupal::moduleHandler()->moduleExists('libraries')) { - $imagesloaded_path = libraries_get_path('imagesloaded') . '/imagesloaded.pkgd.min.js'; - $masonry_path = libraries_get_path('masonry') . '/dist/masonry.pkgd.min.js'; - - $libraries['imagesloaded']['js'] = ['/' . $imagesloaded_path => ['minified' => 'true']]; - $libraries['masonry']['js'] = ['/' . $masonry_path => ['minified' => 'true']]; - } -} diff --git a/web/modules/file_browser/file_browser.post_update.php b/web/modules/file_browser/file_browser.post_update.php deleted file mode 100644 index 7b5964e524..0000000000 --- a/web/modules/file_browser/file_browser.post_update.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @file - * Post update functions for File Browser. - */ - -/** - * @addtogroup updates-8.x-1.x - * @{ - */ - -/** - * Update default config with default uuid. - */ -function file_browser_post_update_default_uuid() { - $configuration = \Drupal::configFactory()->getEditable('embed.button.file_browser'); - // Default uuid in the config. - $uuid = 'db2cad05-1e3b-4b35-b163-99d7d036130c'; - // Set file uuid in the config. - $configuration->set('icon_uuid', $uuid); - $configuration->save(); - // Load the file_browser_icon form the storage. - $files = \Drupal::entityTypeManager() - ->getStorage('file') - ->loadByProperties(['uri' => 'public://file_browser_icon.png']); - if (!empty($files)) { - $file = reset($files); - // Set file uuid same as default config. - $file->set('uuid', $uuid); - $file->save(); - } -} - -/** - * @} End of "addtogroup updates-8.x-1.x". - */ diff --git a/web/modules/file_browser/file_browser.routing.yml b/web/modules/file_browser/file_browser.routing.yml deleted file mode 100644 index f84b7703f0..0000000000 --- a/web/modules/file_browser/file_browser.routing.yml +++ /dev/null @@ -1,14 +0,0 @@ -file_browser.preview: - path: '/admin/file-browser-preview/{file}/{image_style}' - defaults: - _title: 'Preview' - _controller: '\Drupal\file_browser\Controller\FileBrowserController::preview' - image_style: '' - requirements: - _entity_access: 'file.view' - file: \d+ - # Who knows why this isn't converted normally... - options: - parameters: - file: - type: entity:file diff --git a/web/modules/file_browser/file_browser.views.inc b/web/modules/file_browser/file_browser.views.inc deleted file mode 100644 index 559bf1f0b8..0000000000 --- a/web/modules/file_browser/file_browser.views.inc +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @file - * Provide custom views data for rendering file previews. - */ - -/** - * Implements hook_views_data_alter(). - */ -function file_browser_views_data_alter(&$data) { - $data['file_managed']['file_browser_preview'] = [ - 'title' => t('File Browser Preview'), - 'help' => t('Displays a preview of a file.'), - 'field' => [ - 'id' => 'file_browser_preview', - ], - ]; -} diff --git a/web/modules/file_browser/file_browser_icon.png b/web/modules/file_browser/file_browser_icon.png deleted file mode 100644 index 5ab220f6af..0000000000 --- a/web/modules/file_browser/file_browser_icon.png +++ /dev/null @@ -1,3 +0,0 @@ -�PNG - -��� IHDR���0���0����1����IDATx��?JA��Zz�0h/�6�"'�1U<A�=���{��e��[���ð��������$�&)�ܬ3��µ"2T�_��!XŎ�U@C0��Ȁ����@�ئ^Y;���߸��w��%��Jw�䎱������{�6Z`������i[ ���Θ��$������i����cZ�ˁ5�6�@�~x�B�À����2��H��r�,!�ˀ�6�k�H �t��m_��_�*$�7����IEND�B`� \ No newline at end of file diff --git a/web/modules/file_browser/images/checkmark.svg b/web/modules/file_browser/images/checkmark.svg deleted file mode 100644 index 5b382d8b4c..0000000000 --- a/web/modules/file_browser/images/checkmark.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> - <path d="M0 0h24v24H0z" fill="none"/> - <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/> -</svg> \ No newline at end of file diff --git a/web/modules/file_browser/images/document_placeholder.svg b/web/modules/file_browser/images/document_placeholder.svg deleted file mode 100644 index 4666feec9d..0000000000 --- a/web/modules/file_browser/images/document_placeholder.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> - <path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/> - <path d="M0 0h24v24H0z" fill="none"/> -</svg> \ No newline at end of file diff --git a/web/modules/file_browser/images/preview.svg b/web/modules/file_browser/images/preview.svg deleted file mode 100644 index 111903880a..0000000000 --- a/web/modules/file_browser/images/preview.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg fill="#dedede" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> - <path d="M0 0h24v24H0z" fill="none"/> - <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/> -</svg> \ No newline at end of file diff --git a/web/modules/file_browser/images/remove.svg b/web/modules/file_browser/images/remove.svg deleted file mode 100644 index ac1b154e0d..0000000000 --- a/web/modules/file_browser/images/remove.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg fill="#444" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> - <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> - <path d="M0 0h24v24H0z" fill="none"/> -</svg> \ No newline at end of file diff --git a/web/modules/file_browser/js/file_browser.preview.js b/web/modules/file_browser/js/file_browser.preview.js deleted file mode 100644 index cd215b3500..0000000000 --- a/web/modules/file_browser/js/file_browser.preview.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @file file_browser.preview.js - */ - -(function ($, Drupal) { - - "use strict"; - - /** - * Contains logic for the view widget. - */ - Drupal.behaviors.fileBrowserPreview = { - attach: function (context, settings) { - var $wrapper = $('#file-browser-preview-wrapper').once('file-browser-preview'); - if ($wrapper.length) { - $wrapper.find('select').on('change', function () { - Drupal.ajax({ - url: settings.file_browser.preview_path + '/' + $(this).val(), - wrapper: 'file-browser-preview-wrapper' - }).execute(); - }); - } - } - }; - -}(jQuery, Drupal)); diff --git a/web/modules/file_browser/js/file_browser.view.js b/web/modules/file_browser/js/file_browser.view.js deleted file mode 100644 index c596dcd030..0000000000 --- a/web/modules/file_browser/js/file_browser.view.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * @file file_browser.view.js - */ - -(function ($, Drupal) { - - "use strict"; - - /** - * Renders the file counter based on our internally tracked count. - */ - function renderFileCounter () { - $('.file-browser-file-counter').each(function () { - $(this).remove(); - }); - var counter = []; - $('.entities-list [data-entity-id]').each(function () { - if (counter[this.dataset.entityId]) { - ++counter[this.dataset.entityId]; - } - else { - counter[this.dataset.entityId] = 1; - } - }); - for (var id in counter) { - var count = counter[id]; - if (count > 0) { - var text = Drupal.formatPlural(count, 'Selected one time', 'Selected @count times'); - var $counter = $('<div class="file-browser-file-counter"></div>').text(text); - $('[name="entity_browser_select[file:' + id + ']"]').closest('.grid-item').find('.grid-item-info').prepend($counter); - } - } - } - - /** - * Adjusts the padding on the body to account for the fixed actions bar. - */ - function adjustBodyPadding () { - setTimeout(function () { - $('body').css('padding-bottom', $('.file-browser-actions').outerHeight() + 'px'); - }, 2000); - } - - /** - * Initializes Masonry for the view widget. - */ - Drupal.behaviors.fileBrowserMasonry = { - attach: function (context) { - var $item = $('.grid-item', context); - var $view = $item.parent().once('file-browser-init'); - if ($view.length) { - $view.prepend('<div class="grid-sizer"></div><div class="gutter-sizer"></div>'); - - // Indicate that images are loading. - $view.append('<div class="ajax-progress ajax-progress-fullscreen"> </div>'); - $view.imagesLoaded(function () { - // Save the scroll position. - var scroll = document.body.scrollTop; - // Remove old Masonry object if it exists. This allows modules like - // Views Infinite Scroll to function with File Browser. - if ($view.data('masonry')) { - $view.masonry('destroy'); - } - $view.masonry({ - columnWidth: '.grid-sizer', - gutter: '.gutter-sizer', - itemSelector: '.grid-item', - percentPosition: true, - isFitWidth: true - }); - // Jump to the old scroll position. - document.body.scrollTop = scroll; - // Add a class to reveal the loaded images, which avoids FOUC. - $item.addClass('item-style'); - $view.find('.ajax-progress').remove(); - }); - } - } - }; - - /** - * Checks the hidden Entity Browser checkbox when an item is clicked. - * - * This behavior provides backwards-compatibility for users not using - * auto-select and multi-step. - */ - Drupal.behaviors.fileBrowserClickProxy = { - attach: function (context, settings) { - if (!settings.entity_browser_widget.auto_select) { - $('.grid-item', context).once('bind-click-event').click(function () { - var input = $(this).find('.views-field-entity-browser-select input'); - input.prop('checked', !input.prop('checked')); - if (input.prop('checked')) { - $(this).addClass('checked'); - } - else { - $(this).removeClass('checked'); - } - }); - } - } - }; - - /** - * Tracks when entities have been added or removed in the multi-step form, - * and displays that information on each grid item. - */ - Drupal.behaviors.fileBrowserEntityCount = { - attach: function (context) { - adjustBodyPadding(); - renderFileCounter(); - // Indicate when files have been selected. - var $entities = $('.entities-list', context).once('file-browser-add-count'); - if ($entities.length) { - $entities.bind('add-entities', function (event, entity_ids) { - adjustBodyPadding(); - renderFileCounter(); - }); - - $entities.bind('remove-entities', function (event, entity_ids) { - adjustBodyPadding(); - renderFileCounter(); - }); - } - } - }; - -}(jQuery, Drupal)); diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/block_content.type.file_browser.yml b/web/modules/file_browser/modules/file_browser_example/config/install/block_content.type.file_browser.yml deleted file mode 100644 index 803545280b..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/block_content.type.file_browser.yml +++ /dev/null @@ -1,9 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - file_browser_example -id: file_browser -label: 'File Browser' -revision: 1 -description: 'An example Custom Block type that uses File Browser''s Entity Browser and EntityReferenceImageFormatter.' diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.block_content.file_browser.default.yml b/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.block_content.file_browser.default.yml deleted file mode 100644 index 5f33863469..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.block_content.file_browser.default.yml +++ /dev/null @@ -1,33 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - block_content.type.file_browser - - field.field.block_content.file_browser.field_file_browser_reference - module: - - entity_browser - - file_browser_example -id: block_content.file_browser.default -targetEntityType: block_content -bundle: file_browser -mode: default -content: - field_file_browser_reference: - weight: 3 - settings: - entity_browser: browse_files - field_widget_display: thumbnail - field_widget_display_settings: - image_style: medium - third_party_settings: { } - type: entity_browser_entity_reference - region: content - info: - type: string_textfield - weight: -5 - settings: - size: 60 - placeholder: '' - third_party_settings: { } - region: content -hidden: { } diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.node.file_browser.default.yml b/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.node.file_browser.default.yml deleted file mode 100644 index 4b429a45bd..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_form_display.node.file_browser.default.yml +++ /dev/null @@ -1,89 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.field.node.file_browser.body - - field.field.node.file_browser.field_file_browser_image - - node.type.file_browser - module: - - file_browser - - file_browser_example - - path - - text -_core: - default_config_hash: B1eHRl1uKMwrKpcK18CORRnGRIH_TJdpO1ivInSqWSs -id: node.file_browser.default -targetEntityType: node -bundle: file_browser -mode: default -content: - body: - weight: 1 - settings: - rows: 9 - summary_rows: 3 - placeholder: '' - third_party_settings: { } - type: text_textarea_with_summary - region: content - created: - type: datetime_timestamp - weight: 4 - settings: { } - third_party_settings: { } - region: content - field_file_browser_image: - weight: 2 - settings: - entity_browser: browse_files - field_widget_edit: true - field_widget_remove: true - view_mode: default - open: false - third_party_settings: { } - type: entity_browser_file - region: content - langcode: - type: language_select - weight: 5 - settings: { } - third_party_settings: { } - region: content - path: - type: path - weight: 8 - settings: { } - third_party_settings: { } - region: content - promote: - type: boolean_checkbox - settings: - display_label: true - weight: 6 - third_party_settings: { } - region: content - sticky: - type: boolean_checkbox - settings: - display_label: true - weight: 7 - third_party_settings: { } - region: content - title: - type: string_textfield - weight: 0 - settings: - size: 60 - placeholder: '' - third_party_settings: { } - region: content - uid: - type: entity_reference_autocomplete - weight: 3 - settings: - match_operator: CONTAINS - size: 60 - placeholder: '' - third_party_settings: { } - region: content -hidden: { } diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.block_content.file_browser.default.yml b/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.block_content.file_browser.default.yml deleted file mode 100644 index dfacc279d2..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.block_content.file_browser.default.yml +++ /dev/null @@ -1,24 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - block_content.type.file_browser - - field.field.block_content.file_browser.field_file_browser_reference - module: - - file_browser - - file_browser_example -id: block_content.file_browser.default -targetEntityType: block_content -bundle: file_browser -mode: default -content: - field_file_browser_reference: - weight: 0 - label: above - settings: - view_mode: default - link: false - third_party_settings: { } - type: entity_reference_entity_view - region: content -hidden: { } diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.node.file_browser.default.yml b/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.node.file_browser.default.yml deleted file mode 100644 index 078ee9d90b..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/core.entity_view_display.node.file_browser.default.yml +++ /dev/null @@ -1,42 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.field.node.file_browser.body - - field.field.node.file_browser.field_file_browser_image - - node.type.file_browser - module: - - image - - file_browser_example - - text - - user -_core: - default_config_hash: '-YwiZ90Nldz62AXVn6bS3ONKVpHFeoK_Ujm8Pq1ZU4w' -id: node.file_browser.default -targetEntityType: node -bundle: file_browser -mode: default -content: - body: - weight: 3 - label: above - settings: { } - third_party_settings: { } - type: text_default - region: content - field_file_browser_image: - weight: 4 - label: above - settings: - image_style: '' - image_link: '' - third_party_settings: { } - type: image - region: content - links: - weight: 2 - settings: { } - third_party_settings: { } - region: content -hidden: - langcode: true diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/field.field.block_content.file_browser.field_file_browser_reference.yml b/web/modules/file_browser/modules/file_browser_example/config/install/field.field.block_content.file_browser.field_file_browser_reference.yml deleted file mode 100644 index e978217d04..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/field.field.block_content.file_browser.field_file_browser_reference.yml +++ /dev/null @@ -1,25 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - block_content.type.file_browser - - field.storage.block_content.field_file_browser_reference - module: - - file_browser_example -id: block_content.file_browser.field_file_browser_reference -field_name: field_file_browser_reference -entity_type: block_content -bundle: file_browser -label: 'File Browser Reference' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - handler: 'default:file' - handler_settings: - target_bundles: null - sort: - field: _none -field_type: entity_reference diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.body.yml b/web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.body.yml deleted file mode 100644 index 441686ca08..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.body.yml +++ /dev/null @@ -1,22 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.storage.node.body - - node.type.file_browser - module: - - file_browser_example - - text -id: node.file_browser.body -field_name: body -entity_type: node -bundle: file_browser -label: Body -description: '' -required: false -translatable: true -default_value: { } -default_value_callback: '' -settings: - display_summary: false -field_type: text_with_summary diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.field_file_browser_image.yml b/web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.field_file_browser_image.yml deleted file mode 100644 index 748a696efd..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/field.field.node.file_browser.field_file_browser_image.yml +++ /dev/null @@ -1,38 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.storage.node.field_file_browser_image - - node.type.file_browser - module: - - file_browser_example - - image -id: node.file_browser.field_file_browser_image -field_name: field_file_browser_image -entity_type: node -bundle: file_browser -label: 'File Browser Image' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - file_directory: '[date:custom:Y]-[date:custom:m]' - file_extensions: 'png gif jpg jpeg' - max_filesize: '' - max_resolution: '' - min_resolution: '' - alt_field: true - alt_field_required: true - title_field: false - title_field_required: false - default_image: - uuid: '' - alt: '' - title: '' - width: null - height: null - handler: 'default:file' - handler_settings: { } -field_type: image diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/field.storage.block_content.field_file_browser_reference.yml b/web/modules/file_browser/modules/file_browser_example/config/install/field.storage.block_content.field_file_browser_reference.yml deleted file mode 100644 index a11c544d7f..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/field.storage.block_content.field_file_browser_reference.yml +++ /dev/null @@ -1,20 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - block_content - - file - - file_browser_example -id: block_content.field_file_browser_reference -field_name: field_file_browser_reference -entity_type: block_content -type: entity_reference -settings: - target_type: file -module: core -locked: false -cardinality: -1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/field.storage.node.field_file_browser_image.yml b/web/modules/file_browser/modules/file_browser_example/config/install/field.storage.node.field_file_browser_image.yml deleted file mode 100644 index 3b97356d8d..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/field.storage.node.field_file_browser_image.yml +++ /dev/null @@ -1,30 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - file - - file_browser_example - - image - - node -id: node.field_file_browser_image -field_name: field_file_browser_image -entity_type: node -type: image -settings: - uri_scheme: public - default_image: - uuid: '' - alt: '' - title: '' - width: null - height: null - target_type: file - display_field: false - display_default: false -module: image -locked: false -cardinality: -1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/web/modules/file_browser/modules/file_browser_example/config/install/node.type.file_browser.yml b/web/modules/file_browser/modules/file_browser_example/config/install/node.type.file_browser.yml deleted file mode 100644 index 5e30e668b6..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/config/install/node.type.file_browser.yml +++ /dev/null @@ -1,18 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - menu_ui - - file_browser_example -third_party_settings: - menu_ui: - available_menus: - - main - parent: 'main:' -name: 'File Browser' -type: file_browser -description: 'An example Custom Content type that uses File Browser''s Entity Browser and EntityReferenceImageFormatter.' -help: '' -new_revision: false -preview_mode: 1 -display_submitted: true diff --git a/web/modules/file_browser/modules/file_browser_example/file_browser_example.info.yml b/web/modules/file_browser/modules/file_browser_example/file_browser_example.info.yml deleted file mode 100644 index c39327aa5c..0000000000 --- a/web/modules/file_browser/modules/file_browser_example/file_browser_example.info.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: File Browser Example -description: 'Provides an example Content Type and Custom Block Type for File Browser.' -type: module -core: 8.x -core_version_requirement: ^8 || ^9 -dependencies: - - file_browser:file_browser - -# Information added by Drupal.org packaging script on 2020-05-24 -version: '8.x-1.3' -project: 'file_browser' -datestamp: 1590339388 diff --git a/web/modules/file_browser/src/Controller/FileBrowserController.php b/web/modules/file_browser/src/Controller/FileBrowserController.php deleted file mode 100644 index 3cf2425ce8..0000000000 --- a/web/modules/file_browser/src/Controller/FileBrowserController.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Drupal\file_browser\Controller; - -use Drupal\Core\Controller\ControllerBase; -use Drupal\Core\Url; -use Drupal\file\FileInterface; -use Drupal\file_browser\Plugin\views\field\FileBrowserPreview; - -/** - * Endpoints for the File Browser module. - */ -class FileBrowserController extends ControllerBase { - - /** - * Renders a preview of a file for use with File Browser. - * - * @param \Drupal\file\FileInterface $file - * The requested file. - * @param string $image_style - * (Optional) An image style to preview the (image) file in. - * - * @return array - * A render array representing the preview. - */ - public function preview(FileInterface $file, $image_style = '') { - $build = [ - '#type' => 'container', - '#attributes' => [ - 'id' => 'file-browser-preview-wrapper', - ], - '#attached' => [ - 'library' => [ - 'file_browser/preview', - ], - 'drupalSettings' => [ - 'file_browser' => [ - 'preview_path' => Url::fromRoute('file_browser.preview', [ - 'file' => $file->id(), - ])->toString(), - ], - ], - ], - ]; - - $preview = FileBrowserPreview::getFilePreview($file, $image_style); - - if ($preview['#theme'] === 'image_formatter') { - $build['image_style'] = [ - '#type' => 'select', - '#options' => image_style_options(), - '#value' => $image_style, - ]; - $build['image_style']['#options'][''] = $this->t('No image style'); - } - - $build['preview'] = $preview; - - return $build; - } - -} diff --git a/web/modules/file_browser/src/Plugin/Block/ImageEmbedBlock.php b/web/modules/file_browser/src/Plugin/Block/ImageEmbedBlock.php deleted file mode 100644 index d55a4bfaa6..0000000000 --- a/web/modules/file_browser/src/Plugin/Block/ImageEmbedBlock.php +++ /dev/null @@ -1,248 +0,0 @@ -<?php - -namespace Drupal\file_browser\Plugin\Block; - -use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Block\BlockBase; -use Drupal\Core\Form\FormStateInterface; -use Drupal\file\Entity\File; - -/** - * Provides the "Image Embed" block. - * - * @Block( - * id = "image_embed", - * admin_label = @Translation("Image Embed"), - * category = @Translation("Embed") - * ) - */ -class ImageEmbedBlock extends BlockBase { - - /** - * {@inheritdoc} - */ - public function defaultConfiguration() { - return [ - 'image_style' => '', - 'files' => [], - ]; - } - - /** - * {@inheritdoc} - */ - public function blockForm($form, FormStateInterface $form_state) { - $entities = $form_state->getValue([ - 'settings', - 'selection', - 'fids', - 'entities', - ], []); - $table = $form_state->getValue([ - 'settings', - 'selection', - 'table', - ], []); - $files = []; - foreach ($entities as $entity) { - $settings = isset($table[$entity->id()]) ? $table[$entity->id()] : []; - $settings['fid'] = $entity->id(); - $files[] = $settings; - } - if (empty($files)) { - $files = $this->configuration['files']; - } - - $form['selection'] = $this->browserForm($files); - - $form['image_style'] = [ - '#type' => 'select', - '#options' => image_style_options(), - '#title' => $this->t('Image style'), - '#default_value' => $this->configuration['image_style'], - ]; - - return $form; - } - - /** - * Constructs parts of the form needed to use Entity Browser. - * - * @param array $files - * An array representing the current configuration + form state. - * - * @return array - * A render array representing Entity Browser components. - */ - public function browserForm(array $files) { - $selection = [ - '#type' => 'container', - '#attributes' => ['id' => 'image-embed-block-browser'], - ]; - - $selection['fids'] = [ - '#type' => 'entity_browser', - '#entity_browser' => 'browse_files_modal', - '#entity_browser_validators' => [ - 'entity_type' => ['type' => 'file'], - ], - '#process' => [ - [ - '\Drupal\entity_browser\Element\EntityBrowserElement', - 'processEntityBrowser', - ], - [get_called_class(), 'processEntityBrowser'], - ], - ]; - - $order_class = 'image-embed-block-delta-order'; - - $selection['table'] = [ - '#type' => 'table', - '#header' => [ - $this->t('Preview'), - $this->t('Filename'), - $this->t('Metadata'), - $this->t('Order', [], ['context' => 'Sort order']), - ], - '#empty' => $this->t('No files yet'), - '#tabledrag' => [ - [ - 'action' => 'order', - 'relationship' => 'sibling', - 'group' => $order_class, - ], - ], - ]; - - $delta = 0; - - foreach ($files as $info) { - $file = File::load($info['fid']); - $uri = $file->getFileUri(); - $image = \Drupal::service('image.factory')->get($uri); - if ($image->isValid()) { - $width = $image->getWidth(); - $height = $image->getHeight(); - } - else { - $width = $height = NULL; - } - - $display = [ - '#theme' => 'image_style', - '#width' => $width, - '#height' => $height, - '#style_name' => 'file_entity_browser_small', - '#uri' => $uri, - ]; - - $fid = $file->id(); - $selection['table'][$fid] = [ - '#attributes' => [ - 'class' => ['draggable'], - 'data-entity-id' => $file->getEntityTypeId() . ':' . $fid, - ], - 'display' => $display, - 'filename' => ['#markup' => $file->label()], - 'alt' => [ - '#type' => 'textfield', - '#title' => $this->t('Alternative text'), - '#default_value' => isset($info['settings']['alt']) ? $info['settings']['alt'] : '', - '#size' => 45, - '#maxlength' => 512, - '#description' => $this->t('This text will be used by screen readers, search engines, or when the image cannot be loaded.'), - ], - '_weight' => [ - '#type' => 'weight', - '#title' => $this->t('Weight for row @number', ['@number' => $delta + 1]), - '#title_display' => 'invisible', - '#delta' => count($files), - '#default_value' => $delta, - '#attributes' => ['class' => [$order_class]], - ], - ]; - - $delta++; - } - - return $selection; - } - - /** - * AJAX callback: Re-renders the Entity Browser button/table. - */ - public static function updateCallback(array &$form, FormStateInterface $form_state) { - $trigger = $form_state->getTriggeringElement(); - $parents = array_slice($trigger['#array_parents'], 0, -2); - $selection = NestedArray::getValue($form, $parents); - return $selection; - } - - /** - * Render API callback: Processes the entity browser element. - */ - public static function processEntityBrowser(&$element, FormStateInterface $form_state, &$complete_form) { - $element['entity_ids']['#ajax'] = [ - 'callback' => [get_called_class(), 'updateCallback'], - 'wrapper' => 'image-embed-block-browser', - 'event' => 'entity_browser_value_updated', - ]; - return $element; - } - - /** - * {@inheritdoc} - */ - public function blockSubmit($form, FormStateInterface $form_state) { - $this->configuration['files'] = []; - foreach ($form_state->getValue(['selection', 'table'], []) as $fid => $settings) { - $this->configuration['files'][] = [ - 'fid' => $fid, - 'settings' => $settings, - ]; - } - $this->configuration['image_style'] = $form_state->getValue('image_style'); - } - - /** - * {@inheritdoc} - */ - public function build() { - $build = []; - - foreach ($this->configuration['files'] as $info) { - /** @var \Drupal\file\Entity\File $file */ - $file = File::load($info['fid']); - if ($file && $file->access('view')) { - $uri = $file->getFileUri(); - $image = \Drupal::service('image.factory')->get($uri); - if ($image->isValid()) { - $width = $image->getWidth(); - $height = $image->getHeight(); - } - else { - $width = $height = NULL; - } - - $current = [ - '#theme' => 'image', - '#width' => $width, - '#height' => $height, - '#alt' => isset($info['settings']['alt']) ? $info['settings']['alt'] : '', - '#uri' => $uri, - ]; - - if ($this->configuration['image_style']) { - $current['#theme'] = 'image_style'; - $current['#style_name'] = $this->configuration['image_style']; - } - - $build[] = $current; - } - } - - return $build; - } - -} diff --git a/web/modules/file_browser/src/Plugin/Field/FieldWidget/FileBrowser.php b/web/modules/file_browser/src/Plugin/Field/FieldWidget/FileBrowser.php deleted file mode 100644 index fe232e3885..0000000000 --- a/web/modules/file_browser/src/Plugin/Field/FieldWidget/FileBrowser.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Drupal\file_browser\Plugin\Field\FieldWidget; - -use Drupal\Core\Entity\Entity\EntityFormDisplay; -use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget; - -/** - * Entity browser file widget. - * - * @FieldWidget( - * id = "file_browser", - * label = @Translation("File Browser"), - * provider = "file_browser", - * multiple_values = TRUE, - * field_types = { - * "file", - * "image" - * } - * ) - */ -class FileBrowser extends FileBrowserWidget { - - /** - * {@inheritdoc} - */ - public static function isApplicable(FieldDefinitionInterface $field_definition) { - // If the bundle this field belongs to uses File Browser in any existing - // form display, we're still applicable. This lets users who are already - // using this widget to continue their work normally, but prevents future - // users from using this instead of Entity Browser's widget. - $entity_type_id = $field_definition->getTargetEntityTypeId(); - $bundle = $field_definition->getTargetBundle(); - $ids = \Drupal::entityQuery('entity_form_display') - ->condition('bundle', $bundle) - ->condition('targetEntityType', $entity_type_id) - ->execute(); - /** @var \Drupal\Core\Entity\Entity\EntityFormDisplay[] $displays */ - $displays = EntityFormDisplay::loadMultiple($ids); - foreach ($displays as $display) { - $configuration = $display->getComponent($field_definition->getName()); - if (isset($configuration['type']) && $configuration['type'] == 'file_browser') { - return TRUE; - } - } - return FALSE; - } - -} diff --git a/web/modules/file_browser/src/Plugin/views/field/FileBrowserPreview.php b/web/modules/file_browser/src/Plugin/views/field/FileBrowserPreview.php deleted file mode 100644 index 3c1c33f47b..0000000000 --- a/web/modules/file_browser/src/Plugin/views/field/FileBrowserPreview.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Drupal\file_browser\Plugin\views\field; - -use Drupal\Core\Url; -use Drupal\file\FileInterface; -use Drupal\views\Plugin\views\field\FieldPluginBase; -use Drupal\views\ResultRow; - -/** - * Defines a custom field that renders a preview of a file, for the purposes of. - * - * @ViewsField("file_browser_preview") - */ -class FileBrowserPreview extends FieldPluginBase { - - /** - * {@inheritdoc} - */ - public function render(ResultRow $values) { - /** @var \Drupal\file\Entity\File $file */ - $file = $this->getEntity($values); - $build = []; - - $build['image'] = $this->getFilePreview($file, 'file_entity_browser_thumbnail'); - - $build['preview'] = [ - '#title' => $this->t('Preview'), - '#type' => 'link', - '#url' => Url::fromRoute('file_browser.preview', [ - 'file' => $file->id(), - ]), - '#attributes' => [ - 'class' => ['file-browser-preview-button', 'use-ajax'], - 'data-dialog-type' => 'modal', - 'data-dialog-options' => '{"classes": {"ui-dialog": "ui-corner-all file-browser-preview-dialog"}, "show": "fadeIn", "hide": "fadeOut"}', - ], - ]; - - return $build; - } - - /** - * {@inheritdoc} - */ - public function query() {} - - /** - * {@inheritdoc} - */ - public function clickSortable() { - return FALSE; - } - - /** - * Renders a preview of an arbitrary file. - * - * @param \Drupal\file\FileInterface $file - * The file you want to render a preview of. - * @param string $image_style - * (Optional) An image style to render the preview in. - * - * @return array - * A render array representing the file preview. - */ - public static function getFilePreview(FileInterface $file, $image_style = '') { - // Check if this file is an image. - $image_factory = \Drupal::service('image.factory'); - - // Loading large files is slow, make sure it is an image mime type before - // doing that. - list($type,) = explode('/', $file->getMimeType(), 2); - if ($type == 'image' && ($image = $image_factory->get($file->getFileUri())) && $image->isValid()) { - // Fake an ImageItem object. - $item = new \stdClass(); - $item->width = $image->getWidth(); - $item->height = $image->getHeight(); - $item->alt = ''; - $item->title = $file->getFilename(); - $item->entity = $file; - - $build = [ - '#theme' => 'image_formatter', - '#item' => $item, - '#image_style' => $image_style, - ]; - } - // Use a placeholder image for now. - // @todo See if we can use fallback formatters for this. - else { - $path = drupal_get_path('module', 'file_browser'); - $build = [ - '#theme' => 'image', - '#attributes' => [ - 'src' => base_path() . $path . '/images/document_placeholder.svg', - ], - ]; - } - return $build; - } - -} diff --git a/web/modules/file_browser/tests/src/Functional/InstallTest.php b/web/modules/file_browser/tests/src/Functional/InstallTest.php deleted file mode 100644 index 20daa95ca8..0000000000 --- a/web/modules/file_browser/tests/src/Functional/InstallTest.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Drupal\Tests\file_browser\Functional; - -use Drupal\Tests\BrowserTestBase; - -/** - * Tests install/uninstall routines for File Browser. - * - * @group file_browser - */ -class InstallTest extends BrowserTestBase { - - /** - * {@inheritdoc} - * - * We set this to FALSE here as DropzoneJS and Entity Browser use dynamic - * config settings which fail strict checks during install. - */ - protected $strictConfigSchema = FALSE; - - /** - * {@inheritdoc} - */ - protected $defaultTheme = 'stable'; - - /** - * {@inheritdoc} - */ - public static $modules = ['file_browser']; - - /** - * Tests if the module can be installed during a config sync. - */ - public function testInstallDuringSync() { - // Export config post-module install. - $active = $this->container->get('config.storage'); - $sync = $this->container->get('config.storage.sync'); - $this->copyConfig($active, $sync); - - // Uninstall File browser. - /** @var \Drupal\Core\Extension\ModuleInstaller $module_installer */ - $module_installer = $this->container->get('module_installer'); - $module_installer->uninstall(['file_browser']); - - // Import config. - $this->configImporter()->import(); - } - -} diff --git a/web/modules/file_browser/tests/src/FunctionalJavascript/FileBrowserTest.php b/web/modules/file_browser/tests/src/FunctionalJavascript/FileBrowserTest.php deleted file mode 100644 index 13a6fd0482..0000000000 --- a/web/modules/file_browser/tests/src/FunctionalJavascript/FileBrowserTest.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -namespace Drupal\Tests\file_browser\FunctionalJavascript; - -use Drupal\Tests\entity_browser\FunctionalJavascript\EntityBrowserWebDriverTestBase; - -/** - * Tests the file_browser module. - * - * @group entity_browser - */ -class FileBrowserTest extends EntityBrowserWebDriverTestBase { - - /** - * {@inheritdoc} - */ - public static $modules = [ - 'file_browser', - ]; - - /** - * {@inheritdoc} - */ - protected static $userPermissions = [ - 'access browse_files entity browser pages', - 'create article content', - 'access content', - 'dropzone upload files', - ]; - - /** - * Tests that selecting files in the view works. - */ - public function testFileBrowserView() { - /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display */ - $form_display = $this->container->get('entity_type.manager') - ->getStorage('entity_form_display') - ->load('node.article.default'); - - $form_display->setComponent('field_reference', [ - 'type' => 'entity_browser_entity_reference', - 'settings' => [ - 'entity_browser' => 'browse_files', - 'field_widget_display' => 'label', - 'open' => TRUE, - ], - ])->save(); - - // Create a file. - $image = $this->createFile('llama', 'jpg'); - - $this->drupalGet('node/add/article'); - - // Open the browser and select a file. - $this->getSession()->switchToIFrame('entity_browser_iframe_browse_files'); - $this->getSession()->getPage()->clickLink('Files listing'); - $this->clickViewEntity('file:' . $image->id()); - $this->assertSession()->assertWaitOnAjaxRequest(); - $this->getSession()->getPage()->pressButton('Use selected'); - - // Switch back to the main page and assert that the file was selected. - $this->getSession()->switchToIFrame(); - $this->assertSession()->assertWaitOnAjaxRequest(); - $this->assertSession()->pageTextContains('llama.jpg'); - } - - /** - * Click on entity in view to be selected. - * - * @param string $entityId - * Entity ID that will be selected. Format: "file:1". - * - * @throws \Behat\Mink\Exception\ElementNotFoundException - */ - protected function clickViewEntity($entityId) { - $xpathViewRow = '//*[./*[contains(@class, "views-field-entity-browser-select") and .//input[@name="entity_browser_select[' . $entityId . ']"]]]'; - $this->assertSession()->elementExists('xpath', $xpathViewRow)->click(); - } - -} -- GitLab