Issue #3214234 by alexpott: Add core/class_aliases.php
parent
85ee5e164b
commit
a9fbf2709a
|
@ -530,7 +530,7 @@
|
|||
"dist": {
|
||||
"type": "path",
|
||||
"url": "core",
|
||||
"reference": "84de0d6ef4eda33dd426005557f64496a2fd02d1"
|
||||
"reference": "874a51210b265aa07599dc966748e43cf31a0321"
|
||||
},
|
||||
"require": {
|
||||
"asm89/stack-cors": "^1.1",
|
||||
|
@ -759,6 +759,7 @@
|
|||
"lib/Drupal/Core/Site/Settings.php"
|
||||
],
|
||||
"files": [
|
||||
"class_aliases.php",
|
||||
"includes/bootstrap.inc"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains class_aliases that will be added by the autoloader.
|
||||
*
|
||||
* @see core/composer.json
|
||||
*/
|
||||
|
||||
// @todo https://www.drupal.org/project/drupal/issues/3197482 Remove this class
|
||||
// alias once Drupal is running Symfony 5.3 or higher.
|
||||
class_alias('Drupal\Core\Http\KernelEvent', 'Symfony\Component\HttpKernel\Event\KernelEvent', TRUE);
|
|
@ -201,7 +201,10 @@
|
|||
"lib/Drupal/Core/Installer/InstallerRedirectTrait.php",
|
||||
"lib/Drupal/Core/Site/Settings.php"
|
||||
],
|
||||
"files": [ "includes/bootstrap.inc" ]
|
||||
"files": [
|
||||
"class_aliases.php",
|
||||
"includes/bootstrap.inc"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
|
|
|
@ -18,7 +18,6 @@ use Drupal\Core\DependencyInjection\YamlFileLoader;
|
|||
use Drupal\Core\Extension\ExtensionDiscovery;
|
||||
use Drupal\Core\File\MimeType\MimeTypeGuesser;
|
||||
use Drupal\Core\Http\InputBag;
|
||||
use Drupal\Core\Http\KernelEvent;
|
||||
use Drupal\Core\Http\TrustedHostsRequestFactory;
|
||||
use Drupal\Core\Installer\InstallerKernel;
|
||||
use Drupal\Core\Installer\InstallerRedirectTrait;
|
||||
|
@ -40,10 +39,6 @@ use TYPO3\PharStreamWrapper\Manager as PharStreamWrapperManager;
|
|||
use TYPO3\PharStreamWrapper\Behavior as PharStreamWrapperBehavior;
|
||||
use TYPO3\PharStreamWrapper\PharStreamWrapper;
|
||||
|
||||
// @todo https://www.drupal.org/project/drupal/issues/3197482 Remove this class
|
||||
// alias once Drupal is running Symfony 5.3 or higher.
|
||||
class_alias(KernelEvent::class, 'Symfony\Component\HttpKernel\Event\KernelEvent', TRUE);
|
||||
|
||||
/**
|
||||
* The DrupalKernel class is the core of Drupal itself.
|
||||
*
|
||||
|
|
|
@ -19,7 +19,7 @@ class DrupalKernelLegacyTest extends UnitTestCase {
|
|||
* @covers ::isMasterRequest
|
||||
*/
|
||||
public function testKernelEventDeprecation() {
|
||||
$kernel = new DrupalKernel('test', NULL);
|
||||
$kernel = $this->createMock(DrupalKernel::class);
|
||||
$request = $this->createMock(Request::class);
|
||||
$event = new KernelEvent($kernel, $request, $kernel::MASTER_REQUEST);
|
||||
|
||||
|
|
Loading…
Reference in New Issue