From dc86e91e612a5482ce5fd64b563b384da6a2cb97 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Mon, 20 Jan 2020 16:32:15 +0000
Subject: [PATCH] Issue #3104015 by TravisCarden, alexpott, longwave, Spokje,
 fgm, catch, xjm, Berdir, Bruno Vincent: Replace ZendFramework/* dependencies
 with their Laminas equivalents

---
 composer.lock                                 | 521 ++++++++++--------
 .../Metapackage/CoreRecommended/composer.json |  11 +-
 core/composer.json                            |   4 +-
 core/core.services.yml                        |  50 +-
 .../Bridge/ZfExtensionManagerSfContainer.php  |  33 +-
 .../lib/Drupal/Component/Bridge/composer.json |   2 +-
 core/lib/Drupal/Core/Composer/Composer.php    |   6 +-
 .../aggregator/parser/DefaultParser.php       |   6 +-
 core/modules/simpletest/src/WebTestBase.php   |   2 +-
 .../src/TestControllers.php                   |   2 +-
 .../ZfExtensionManagerSfContainerTest.php     |   6 +-
 11 files changed, 360 insertions(+), 283 deletions(-)

diff --git a/composer.lock b/composer.lock
index ff0bd9634da0..6fe36bcbc832 100644
--- a/composer.lock
+++ b/composer.lock
@@ -456,7 +456,7 @@
             "dist": {
                 "type": "path",
                 "url": "core",
-                "reference": "1dc86e4e09e69594c38a30504c2687d2ca05f9e9"
+                "reference": "fb43f60ee811f200a5db702bcfcab309b2e684f4"
             },
             "require": {
                 "asm89/stack-cors": "^1.1",
@@ -478,6 +478,8 @@
                 "ext-tokenizer": "*",
                 "ext-xml": "*",
                 "guzzlehttp/guzzle": "^6.5.2",
+                "laminas/laminas-diactoros": "^1.8",
+                "laminas/laminas-feed": "^2.12",
                 "masterminds/html5": "^2.1",
                 "pear/archive_tar": "^1.4.9",
                 "php": ">=7.2.3",
@@ -499,9 +501,7 @@
                 "symfony/validator": "^4.4",
                 "symfony/yaml": "^4.4",
                 "twig/twig": "^2.12.0",
-                "typo3/phar-stream-wrapper": "^3.1.3",
-                "zendframework/zend-diactoros": "^1.8",
-                "zendframework/zend-feed": "^2.12"
+                "typo3/phar-stream-wrapper": "^3.1.3"
             },
             "conflict": {
                 "drupal/pathauto": "<1.6",
@@ -988,6 +988,299 @@
             ],
             "time": "2019-07-01T23:21:34+00:00"
         },
+        {
+            "name": "laminas/laminas-diactoros",
+            "version": "1.8.7",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laminas/laminas-diactoros.git",
+                "reference": "1c2dce9d2822030d5dcfd50b709708830429c89a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/1c2dce9d2822030d5dcfd50b709708830429c89a",
+                "reference": "1c2dce9d2822030d5dcfd50b709708830429c89a",
+                "shasum": ""
+            },
+            "require": {
+                "laminas/laminas-zendframework-bridge": "^1.0",
+                "php": "^5.6 || ^7.0",
+                "psr/http-message": "^1.0"
+            },
+            "provide": {
+                "psr/http-message-implementation": "1.0"
+            },
+            "replace": {
+                "zendframework/zend-diactoros": "self.version"
+            },
+            "require-dev": {
+                "ext-dom": "*",
+                "ext-libxml": "*",
+                "laminas/laminas-coding-standard": "~1.0",
+                "php-http/psr7-integration-tests": "dev-master",
+                "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-release-1.8": "1.8.x-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions/create_uploaded_file.php",
+                    "src/functions/marshal_headers_from_sapi.php",
+                    "src/functions/marshal_method_from_sapi.php",
+                    "src/functions/marshal_protocol_version_from_sapi.php",
+                    "src/functions/marshal_uri_from_sapi.php",
+                    "src/functions/normalize_server.php",
+                    "src/functions/normalize_uploaded_files.php",
+                    "src/functions/parse_cookie_header.php",
+                    "src/functions/create_uploaded_file.legacy.php",
+                    "src/functions/marshal_headers_from_sapi.legacy.php",
+                    "src/functions/marshal_method_from_sapi.legacy.php",
+                    "src/functions/marshal_protocol_version_from_sapi.legacy.php",
+                    "src/functions/marshal_uri_from_sapi.legacy.php",
+                    "src/functions/normalize_server.legacy.php",
+                    "src/functions/normalize_uploaded_files.legacy.php",
+                    "src/functions/parse_cookie_header.legacy.php"
+                ],
+                "psr-4": {
+                    "Laminas\\Diactoros\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "PSR HTTP Message implementations",
+            "homepage": "https://laminas.dev",
+            "keywords": [
+                "http",
+                "laminas",
+                "psr",
+                "psr-7"
+            ],
+            "time": "2019-12-31T16:41:30+00:00"
+        },
+        {
+            "name": "laminas/laminas-escaper",
+            "version": "2.6.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laminas/laminas-escaper.git",
+                "reference": "25f2a053eadfa92ddacb609dcbbc39362610da70"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/25f2a053eadfa92ddacb609dcbbc39362610da70",
+                "reference": "25f2a053eadfa92ddacb609dcbbc39362610da70",
+                "shasum": ""
+            },
+            "require": {
+                "laminas/laminas-zendframework-bridge": "^1.0",
+                "php": "^5.6 || ^7.0"
+            },
+            "replace": {
+                "zendframework/zend-escaper": "self.version"
+            },
+            "require-dev": {
+                "laminas/laminas-coding-standard": "~1.0.0",
+                "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.6.x-dev",
+                    "dev-develop": "2.7.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Laminas\\Escaper\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs",
+            "homepage": "https://laminas.dev",
+            "keywords": [
+                "escaper",
+                "laminas"
+            ],
+            "time": "2019-12-31T16:43:30+00:00"
+        },
+        {
+            "name": "laminas/laminas-feed",
+            "version": "2.12.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laminas/laminas-feed.git",
+                "reference": "64d25e18a6ea3db90c27fe2d6b95630daa1bf602"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laminas/laminas-feed/zipball/64d25e18a6ea3db90c27fe2d6b95630daa1bf602",
+                "reference": "64d25e18a6ea3db90c27fe2d6b95630daa1bf602",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-libxml": "*",
+                "laminas/laminas-escaper": "^2.5.2",
+                "laminas/laminas-stdlib": "^3.2.1",
+                "laminas/laminas-zendframework-bridge": "^1.0",
+                "php": "^5.6 || ^7.0"
+            },
+            "replace": {
+                "zendframework/zend-feed": "self.version"
+            },
+            "require-dev": {
+                "laminas/laminas-cache": "^2.7.2",
+                "laminas/laminas-coding-standard": "~1.0.0",
+                "laminas/laminas-db": "^2.8.2",
+                "laminas/laminas-http": "^2.7",
+                "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+                "laminas/laminas-validator": "^2.10.1",
+                "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+                "psr/http-message": "^1.0.1"
+            },
+            "suggest": {
+                "laminas/laminas-cache": "Laminas\\Cache component, for optionally caching feeds between requests",
+                "laminas/laminas-db": "Laminas\\Db component, for use with PubSubHubbub",
+                "laminas/laminas-http": "Laminas\\Http for PubSubHubbub, and optionally for use with Laminas\\Feed\\Reader",
+                "laminas/laminas-servicemanager": "Laminas\\ServiceManager component, for easily extending ExtensionManager implementations",
+                "laminas/laminas-validator": "Laminas\\Validator component, for validating email addresses used in Atom feeds and entries when using the Writer subcomponent",
+                "psr/http-message": "PSR-7 ^1.0.1, if you wish to use Laminas\\Feed\\Reader\\Http\\Psr7ResponseDecorator"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.12.x-dev",
+                    "dev-develop": "2.13.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Laminas\\Feed\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "provides functionality for consuming RSS and Atom feeds",
+            "homepage": "https://laminas.dev",
+            "keywords": [
+                "feed",
+                "laminas"
+            ],
+            "time": "2019-12-31T16:46:54+00:00"
+        },
+        {
+            "name": "laminas/laminas-stdlib",
+            "version": "3.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laminas/laminas-stdlib.git",
+                "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/2b18347625a2f06a1a485acfbc870f699dbe51c6",
+                "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6",
+                "shasum": ""
+            },
+            "require": {
+                "laminas/laminas-zendframework-bridge": "^1.0",
+                "php": "^5.6 || ^7.0"
+            },
+            "replace": {
+                "zendframework/zend-stdlib": "self.version"
+            },
+            "require-dev": {
+                "laminas/laminas-coding-standard": "~1.0.0",
+                "phpbench/phpbench": "^0.13",
+                "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2.x-dev",
+                    "dev-develop": "3.3.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Laminas\\Stdlib\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "SPL extensions, array utilities, error handlers, and more",
+            "homepage": "https://laminas.dev",
+            "keywords": [
+                "laminas",
+                "stdlib"
+            ],
+            "time": "2019-12-31T17:51:15+00:00"
+        },
+        {
+            "name": "laminas/laminas-zendframework-bridge",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laminas/laminas-zendframework-bridge.git",
+                "reference": "32d7095e436a31b8d98e485a5c63d70df74915a8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/32d7095e436a31b8d98e485a5c63d70df74915a8",
+                "reference": "32d7095e436a31b8d98e485a5c63d70df74915a8",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1",
+                "squizlabs/php_codesniffer": "^3.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev",
+                    "dev-develop": "1.1.x-dev"
+                },
+                "laminas": {
+                    "module": "Laminas\\ZendFrameworkBridge"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/autoload.php"
+                ],
+                "psr-4": {
+                    "Laminas\\ZendFrameworkBridge\\": "src//"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "Alias legacy ZF class names to Laminas Project equivalents.",
+            "keywords": [
+                "ZendFramework",
+                "autoloading",
+                "laminas",
+                "zf"
+            ],
+            "time": "2019-12-31T15:24:03+00:00"
+        },
         {
             "name": "masterminds/html5",
             "version": "2.7.0",
@@ -3417,226 +3710,6 @@
             ],
             "description": "Composer plugin to merge multiple composer.json files",
             "time": "2017-04-25T02:31:25+00:00"
-        },
-        {
-            "name": "zendframework/zend-diactoros",
-            "version": "1.8.7",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/zendframework/zend-diactoros.git",
-                "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/a85e67b86e9b8520d07e6415fcbcb8391b44a75b",
-                "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^5.6 || ^7.0",
-                "psr/http-message": "^1.0"
-            },
-            "provide": {
-                "psr/http-message-implementation": "1.0"
-            },
-            "require-dev": {
-                "ext-dom": "*",
-                "ext-libxml": "*",
-                "php-http/psr7-integration-tests": "dev-master",
-                "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7",
-                "zendframework/zend-coding-standard": "~1.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-release-1.8": "1.8.x-dev"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "src/functions/create_uploaded_file.php",
-                    "src/functions/marshal_headers_from_sapi.php",
-                    "src/functions/marshal_method_from_sapi.php",
-                    "src/functions/marshal_protocol_version_from_sapi.php",
-                    "src/functions/marshal_uri_from_sapi.php",
-                    "src/functions/normalize_server.php",
-                    "src/functions/normalize_uploaded_files.php",
-                    "src/functions/parse_cookie_header.php"
-                ],
-                "psr-4": {
-                    "Zend\\Diactoros\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-2-Clause"
-            ],
-            "description": "PSR HTTP Message implementations",
-            "homepage": "https://github.com/zendframework/zend-diactoros",
-            "keywords": [
-                "http",
-                "psr",
-                "psr-7"
-            ],
-            "abandoned": "laminas/laminas-diactoros",
-            "time": "2019-08-06T17:53:53+00:00"
-        },
-        {
-            "name": "zendframework/zend-escaper",
-            "version": "2.6.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/zendframework/zend-escaper.git",
-                "reference": "3801caa21b0ca6aca57fa1c42b08d35c395ebd5f"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/3801caa21b0ca6aca57fa1c42b08d35c395ebd5f",
-                "reference": "3801caa21b0ca6aca57fa1c42b08d35c395ebd5f",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^5.6 || ^7.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
-                "zendframework/zend-coding-standard": "~1.0.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.6.x-dev",
-                    "dev-develop": "2.7.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Zend\\Escaper\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs",
-            "keywords": [
-                "ZendFramework",
-                "escaper",
-                "zf"
-            ],
-            "abandoned": "laminas/laminas-escaper",
-            "time": "2019-09-05T20:03:20+00:00"
-        },
-        {
-            "name": "zendframework/zend-feed",
-            "version": "2.12.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/zendframework/zend-feed.git",
-                "reference": "d926c5af34b93a0121d5e2641af34ddb1533d733"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/d926c5af34b93a0121d5e2641af34ddb1533d733",
-                "reference": "d926c5af34b93a0121d5e2641af34ddb1533d733",
-                "shasum": ""
-            },
-            "require": {
-                "ext-dom": "*",
-                "ext-libxml": "*",
-                "php": "^5.6 || ^7.0",
-                "zendframework/zend-escaper": "^2.5.2",
-                "zendframework/zend-stdlib": "^3.2.1"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^5.7.23 || ^6.4.3",
-                "psr/http-message": "^1.0.1",
-                "zendframework/zend-cache": "^2.7.2",
-                "zendframework/zend-coding-standard": "~1.0.0",
-                "zendframework/zend-db": "^2.8.2",
-                "zendframework/zend-http": "^2.7",
-                "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
-                "zendframework/zend-validator": "^2.10.1"
-            },
-            "suggest": {
-                "psr/http-message": "PSR-7 ^1.0.1, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator",
-                "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests",
-                "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub",
-                "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader",
-                "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations",
-                "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries when using the Writer subcomponent"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.12.x-dev",
-                    "dev-develop": "2.13.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Zend\\Feed\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "description": "provides functionality for consuming RSS and Atom feeds",
-            "keywords": [
-                "ZendFramework",
-                "feed",
-                "zf"
-            ],
-            "abandoned": "laminas/laminas-feed",
-            "time": "2019-03-05T20:08:49+00:00"
-        },
-        {
-            "name": "zendframework/zend-stdlib",
-            "version": "3.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/zendframework/zend-stdlib.git",
-                "reference": "66536006722aff9e62d1b331025089b7ec71c065"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/66536006722aff9e62d1b331025089b7ec71c065",
-                "reference": "66536006722aff9e62d1b331025089b7ec71c065",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^5.6 || ^7.0"
-            },
-            "require-dev": {
-                "phpbench/phpbench": "^0.13",
-                "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
-                "zendframework/zend-coding-standard": "~1.0.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.2.x-dev",
-                    "dev-develop": "3.3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Zend\\Stdlib\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "description": "SPL extensions, array utilities, error handlers, and more",
-            "keywords": [
-                "ZendFramework",
-                "stdlib",
-                "zf"
-            ],
-            "abandoned": "laminas/laminas-stdlib",
-            "time": "2018-08-28T21:34:05+00:00"
         }
     ],
     "packages-dev": [
diff --git a/composer/Metapackage/CoreRecommended/composer.json b/composer/Metapackage/CoreRecommended/composer.json
index b35c8ff685d0..b905a11d801a 100644
--- a/composer/Metapackage/CoreRecommended/composer.json
+++ b/composer/Metapackage/CoreRecommended/composer.json
@@ -18,6 +18,11 @@
         "guzzlehttp/guzzle": "6.5.2",
         "guzzlehttp/promises": "v1.3.1",
         "guzzlehttp/psr7": "1.6.1",
+        "laminas/laminas-diactoros": "1.8.7",
+        "laminas/laminas-escaper": "2.6.1",
+        "laminas/laminas-feed": "2.12.0",
+        "laminas/laminas-stdlib": "3.2.1",
+        "laminas/laminas-zendframework-bridge": "1.0.0",
         "masterminds/html5": "2.7.0",
         "pear/archive_tar": "1.4.9",
         "pear/console_getopt": "v1.4.2",
@@ -56,10 +61,6 @@
         "symfony/var-dumper": "v5.0.2",
         "symfony/yaml": "v4.4.2",
         "twig/twig": "v2.12.1",
-        "typo3/phar-stream-wrapper": "v3.1.3",
-        "zendframework/zend-diactoros": "1.8.7",
-        "zendframework/zend-escaper": "2.6.1",
-        "zendframework/zend-feed": "2.12.0",
-        "zendframework/zend-stdlib": "3.2.1"
+        "typo3/phar-stream-wrapper": "v3.1.3"
     }
 }
diff --git a/core/composer.json b/core/composer.json
index 798f4b9782e0..9e39dad2a3af 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -37,12 +37,12 @@
         "doctrine/annotations": "^1.4",
         "guzzlehttp/guzzle": "^6.5.2",
         "symfony-cmf/routing": "^2.1",
-        "zendframework/zend-feed": "^2.12",
+        "laminas/laminas-feed": "^2.12",
         "stack/builder": "^1.0",
         "egulias/email-validator": "^2.0",
         "masterminds/html5": "^2.1",
         "symfony/psr-http-message-bridge": "^1.2.0",
-        "zendframework/zend-diactoros": "^1.8",
+        "laminas/laminas-diactoros": "^1.8",
         "composer/semver": "^1.0",
         "asm89/stack-cors": "^1.1",
         "pear/archive_tar": "^1.4.9",
diff --git a/core/core.services.yml b/core/core.services.yml
index 1fa8b952b9ed..461d04999fb8 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -1418,78 +1418,78 @@ services:
     class: Drupal\Component\Bridge\ZfExtensionManagerSfContainer
     calls:
       - [setContainer, ['@service_container']]
-      - [setStandalone, ['\Zend\Feed\Reader\StandaloneExtensionManager']]
+      - [setStandalone, ['\Laminas\Feed\Reader\StandaloneExtensionManager']]
     arguments: ['feed.reader.']
   feed.bridge.writer:
     class: Drupal\Component\Bridge\ZfExtensionManagerSfContainer
     calls:
       - [setContainer, ['@service_container']]
-      - [setStandalone, ['\Zend\Feed\Writer\StandaloneExtensionManager']]
+      - [setStandalone, ['\Laminas\Feed\Writer\StandaloneExtensionManager']]
     arguments: ['feed.writer.']
-# Zend Feed reader plugins. Plugin instances should not be shared.
+# Laminas Feed reader plugins. Plugin instances should not be shared.
   feed.reader.dublincoreentry:
-    class: Zend\Feed\Reader\Extension\DublinCore\Entry
+    class: Laminas\Feed\Reader\Extension\DublinCore\Entry
     shared: false
   feed.reader.dublincorefeed:
-    class: Zend\Feed\Reader\Extension\DublinCore\Feed
+    class: Laminas\Feed\Reader\Extension\DublinCore\Feed
     shared: false
   feed.reader.contententry:
-    class: Zend\Feed\Reader\Extension\Content\Entry
+    class: Laminas\Feed\Reader\Extension\Content\Entry
     shared: false
   feed.reader.atomentry:
-    class: Zend\Feed\Reader\Extension\Atom\Entry
+    class: Laminas\Feed\Reader\Extension\Atom\Entry
     shared: false
   feed.reader.atomfeed:
-    class: Zend\Feed\Reader\Extension\Atom\Feed
+    class: Laminas\Feed\Reader\Extension\Atom\Feed
     shared: false
   feed.reader.slashentry:
-    class: Zend\Feed\Reader\Extension\Slash\Entry
+    class: Laminas\Feed\Reader\Extension\Slash\Entry
     shared: false
   feed.reader.wellformedwebentry:
-    class: Zend\Feed\Reader\Extension\WellFormedWeb\Entry
+    class: Laminas\Feed\Reader\Extension\WellFormedWeb\Entry
     shared: false
   feed.reader.threadentry:
-    class: Zend\Feed\Reader\Extension\Thread\Entry
+    class: Laminas\Feed\Reader\Extension\Thread\Entry
     shared: false
   feed.reader.podcastentry:
-    class: Zend\Feed\Reader\Extension\Podcast\Entry
+    class: Laminas\Feed\Reader\Extension\Podcast\Entry
     shared: false
   feed.reader.podcastfeed:
-    class: Zend\Feed\Reader\Extension\Podcast\Feed
+    class: Laminas\Feed\Reader\Extension\Podcast\Feed
     shared: false
-# Zend Feed writer plugins. Plugins should be set as prototype scope.
+# Laminas Feed writer plugins. Plugins should be set as prototype scope.
   feed.writer.atomrendererfeed:
-    class: Zend\Feed\Writer\Extension\Atom\Renderer\Feed
+    class: Laminas\Feed\Writer\Extension\Atom\Renderer\Feed
     shared: false
   feed.writer.contentrendererentry:
-    class: Zend\Feed\Writer\Extension\Content\Renderer\Entry
+    class: Laminas\Feed\Writer\Extension\Content\Renderer\Entry
     shared: false
   feed.writer.dublincorerendererentry:
-    class: Zend\Feed\Writer\Extension\DublinCore\Renderer\Entry
+    class: Laminas\Feed\Writer\Extension\DublinCore\Renderer\Entry
     shared: false
   feed.writer.dublincorerendererfeed:
-    class: Zend\Feed\Writer\Extension\DublinCore\Renderer\Feed
+    class: Laminas\Feed\Writer\Extension\DublinCore\Renderer\Feed
     shared: false
   feed.writer.itunesentry:
-    class: Zend\Feed\Writer\Extension\ITunes\Entry
+    class: Laminas\Feed\Writer\Extension\ITunes\Entry
     shared: false
   feed.writer.itunesfeed:
-    class: Zend\Feed\Writer\Extension\ITunes\Feed
+    class: Laminas\Feed\Writer\Extension\ITunes\Feed
     shared: false
   feed.writer.itunesrendererentry:
-    class: Zend\Feed\Writer\Extension\ITunes\Renderer\Entry
+    class: Laminas\Feed\Writer\Extension\ITunes\Renderer\Entry
     shared: false
   feed.writer.itunesrendererfeed:
-    class: Zend\Feed\Writer\Extension\ITunes\Renderer\Feed
+    class: Laminas\Feed\Writer\Extension\ITunes\Renderer\Feed
     shared: false
   feed.writer.slashrendererentry:
-    class: Zend\Feed\Writer\Extension\Slash\Renderer\Entry
+    class: Laminas\Feed\Writer\Extension\Slash\Renderer\Entry
     shared: false
   feed.writer.threadingrendererentry:
-    class: Zend\Feed\Writer\Extension\Threading\Renderer\Entry
+    class: Laminas\Feed\Writer\Extension\Threading\Renderer\Entry
     shared: false
   feed.writer.wellformedwebrendererentry:
-    class: Zend\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry
+    class: Laminas\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry
     shared: false
   theme.manager:
     class: Drupal\Core\Theme\ThemeManager
diff --git a/core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php b/core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php
index 59ae9f56464b..396e8439076e 100644
--- a/core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php
+++ b/core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php
@@ -5,26 +5,27 @@
 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Zend\Feed\Reader\ExtensionManagerInterface as ReaderManagerInterface;
-use Zend\Feed\Writer\ExtensionManagerInterface as WriterManagerInterface;
+use Laminas\Feed\Reader\ExtensionManagerInterface as ReaderManagerInterface;
+use Laminas\Feed\Writer\ExtensionManagerInterface as WriterManagerInterface;
 
 /**
- * Defines a bridge between the ZF2 service manager to Symfony container.
+ * Defines a bridge between the Laminas service manager to Symfony container.
  */
 class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterManagerInterface, ContainerAwareInterface {
 
   /**
-   * This property was based from Zend Framework (http://framework.zend.com/)
+   * A map of characters to be replaced through strtr.
    *
-   * @link http://github.com/zendframework/zf2 for the canonical source repository
-   * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
-   * @license http://framework.zend.com/license/new-bsd New BSD License
+   * This property is based on Laminas service manager.
    *
-   * A map of characters to be replaced through strtr.
+   * @link https://github.com/laminas/laminas-servicemanager for the canonical source repository
+   * @copyright Copyright (c) 2019, Laminas Foundation. (https://getlaminas.org/)
+   * @license https://github.com/laminas/laminas-servicemanager/blob/master/LICENSE.md
    *
    * @var array
    *
    * @see \Drupal\Component\Bridge\ZfExtensionManagerSfContainer::canonicalizeName().
+   * @see https://github.com/laminas/laminas-servicemanager/blob/2.7.11/src/ServiceManager.php#L114
    */
   protected $canonicalNamesReplacements = ['-' => '', '_' => '', ' ' => '', '\\' => '', '/' => ''];
 
@@ -50,7 +51,7 @@ class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterMan
   protected $canonicalNames;
 
   /**
-   * @var \Zend\Feed\Reader\ExtensionManagerInterface|\Zend\Feed\Writer\ExtensionManagerInterface
+   * @var \Laminas\Feed\Reader\ExtensionManagerInterface|\Laminas\Feed\Writer\ExtensionManagerInterface
    */
   protected $standalone;
 
@@ -90,19 +91,21 @@ public function has($extension) {
   }
 
   /**
-   * This method was based from Zend Framework (http://framework.zend.com/)
+   * Canonicalize the extension name to a service name.
    *
-   * @link http://github.com/zendframework/zf2 for the canonical source repository
-   * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
-   * @license http://framework.zend.com/license/new-bsd New BSD License
+   * This method is based on Laminas service manager.
    *
-   * Canonicalize the extension name to a service name.
+   * @link https://github.com/laminas/laminas-servicemanager for the canonical source repository
+   * @copyright Copyright (c) 2019, Laminas Foundation. (https://getlaminas.org/)
+   * @license https://github.com/laminas/laminas-servicemanager/blob/master/LICENSE.md
    *
    * @param string $name
    *   The extension name.
    *
    * @return string
    *   The service name, without the prefix.
+   *
+   * @see https://github.com/laminas/laminas-servicemanager/blob/2.7.11/src/ServiceManager.php#L900
    */
   protected function canonicalizeName($name) {
     if (isset($this->canonicalNames[$name])) {
@@ -124,7 +127,7 @@ public function setContainer(ContainerInterface $container = NULL) {
    */
   public function setStandalone($class) {
     if (!is_subclass_of($class, ReaderManagerInterface::class) && !is_subclass_of($class, WriterManagerInterface::class)) {
-      throw new \RuntimeException("$class must implement Zend\Feed\Reader\ExtensionManagerInterface or Zend\Feed\Writer\ExtensionManagerInterface");
+      throw new \RuntimeException("$class must implement Laminas\Feed\Reader\ExtensionManagerInterface or Laminas\Feed\Writer\ExtensionManagerInterface");
     }
     $this->standalone = new $class();
   }
diff --git a/core/lib/Drupal/Component/Bridge/composer.json b/core/lib/Drupal/Component/Bridge/composer.json
index 2f986c83320a..043dd0e436e3 100644
--- a/core/lib/Drupal/Component/Bridge/composer.json
+++ b/core/lib/Drupal/Component/Bridge/composer.json
@@ -6,7 +6,7 @@
   "license": "GPL-2.0-or-later",
   "require": {
     "php": ">=7.2.3",
-    "zendframework/zend-feed": "^2.12"
+    "laminas/laminas-feed": "^2.12"
   },
   "autoload": {
     "psr-4": {
diff --git a/core/lib/Drupal/Core/Composer/Composer.php b/core/lib/Drupal/Core/Composer/Composer.php
index 9d7659e7173a..b6937c39b2db 100644
--- a/core/lib/Drupal/Core/Composer/Composer.php
+++ b/core/lib/Drupal/Core/Composer/Composer.php
@@ -35,6 +35,9 @@ class Composer {
     'guzzlehttp/psr7' => ['tests'],
     'instaclick/php-webdriver' => ['doc', 'test'],
     'justinrainbow/json-schema' => ['demo'],
+    'laminas/laminas-escaper' => ['doc'],
+    'laminas/laminas-feed' => ['doc'],
+    'laminas/laminas-stdlib' => ['doc'],
     'masterminds/html5' => ['bin', 'test'],
     'mikey179/vfsStream' => ['src/test'],
     'myclabs/deep-copy' => ['doc'],
@@ -87,9 +90,6 @@ class Composer {
     'symfony-cmf/routing' => ['Test', 'Tests'],
     'theseer/tokenizer' => ['tests'],
     'twig/twig' => ['doc', 'ext', 'test', 'tests'],
-    'zendframework/zend-escaper' => ['doc'],
-    'zendframework/zend-feed' => ['doc'],
-    'zendframework/zend-stdlib' => ['doc'],
   ];
 
   /**
diff --git a/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php b/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php
index 2694042104c9..66448fa5a6fc 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php
@@ -5,8 +5,8 @@
 use Drupal\aggregator\Plugin\ParserInterface;
 use Drupal\aggregator\FeedInterface;
 use Drupal\Core\Messenger\MessengerTrait;
-use Zend\Feed\Reader\Reader;
-use Zend\Feed\Reader\Exception\ExceptionInterface;
+use Laminas\Feed\Reader\Reader;
+use Laminas\Feed\Reader\Exception\ExceptionInterface;
 
 /**
  * Defines a default parser implementation.
@@ -27,7 +27,7 @@ class DefaultParser implements ParserInterface {
    * {@inheritdoc}
    */
   public function parse(FeedInterface $feed) {
-    // Set our bridge extension manager to Zend Feed.
+    // Set our bridge extension manager to Laminas Feed.
     Reader::setExtensionManager(\Drupal::service('feed.bridge.reader'));
     try {
       $channel = Reader::importString($feed->source_string);
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 24042264afe5..03e5e12b0d80 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -27,7 +27,7 @@
 use Drupal\Tests\TestFileCreationTrait;
 use Drupal\Tests\user\Traits\UserCreationTrait as BaseUserCreationTrait;
 use Drupal\Tests\XdebugRequestTrait;
-use Zend\Diactoros\Uri;
+use Laminas\Diactoros\Uri;
 
 /**
  * Test case for typical Drupal tests.
diff --git a/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php b/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php
index adebf28ddd31..fe228a336b64 100644
--- a/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php
+++ b/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php
@@ -8,7 +8,7 @@
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
-use Zend\Diactoros\Response\HtmlResponse;
+use Laminas\Diactoros\Response\HtmlResponse;
 
 /**
  * Controller routines for testing the routing system.
diff --git a/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php b/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php
index dcad80f8dac6..88cac103dd81 100644
--- a/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php
@@ -6,8 +6,8 @@
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Zend\Feed\Reader\Extension\Atom\Entry;
-use Zend\Feed\Reader\StandaloneExtensionManager;
+use Laminas\Feed\Reader\Extension\Atom\Entry;
+use Laminas\Feed\Reader\StandaloneExtensionManager;
 
 /**
  * @coversDefaultClass \Drupal\Component\Bridge\ZfExtensionManagerSfContainer
@@ -59,7 +59,7 @@ public function testHas() {
    */
   public function testSetStandaloneException() {
     $this->expectException(\RuntimeException::class);
-    $this->expectExceptionMessage('Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest must implement Zend\Feed\Reader\ExtensionManagerInterface or Zend\Feed\Writer\ExtensionManagerInterface');
+    $this->expectExceptionMessage('Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest must implement Laminas\Feed\Reader\ExtensionManagerInterface or Laminas\Feed\Writer\ExtensionManagerInterface');
     $bridge = new ZfExtensionManagerSfContainer();
     $bridge->setStandalone(static::class);
   }
-- 
GitLab