Commit 94a884fb authored by catch's avatar catch
Browse files

fix: #3555528 Symfony\Component\Console\Application::add() is deprecated in Symfony 7.4

By: @longwave
By: @aryan_singh
By: @catch
By: @quietone
(cherry picked from commit d69e2f99fc3fdf4f039ed8bcd3db4fe8fcd57edf)
parent dd92a9c6
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@

# Symfony 7.4.
%Since symfony/browser-kit 7.4: Method "Symfony\\Component\\BrowserKit\\AbstractBrowser::useHtml5Parser\(\)" is deprecated. Symfony 8 will unconditionally use the native HTML5 parser.%
%Since symfony/console 7.4: The "Symfony\\Component\\Console\\Application::add\(\)" method is deprecated and will be removed in Symfony 8.0, use "Symfony\\Component\\Console\\Application::addCommand\(\)" instead.%
%Since symfony/dom-crawler 7.4: Disabling HTML5 parsing is deprecated. Symfony 8 will unconditionally use the native HTML5 parser.%
%Since symfony/http-foundation 7.4: Request::get\(\) is deprecated, use properties -.*attributes, query or request directly instead.%
%Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of Drupal\\(Core|ckeditor5|file)\\[^ ]+ instead.%
+0 −7
Original line number Diff line number Diff line
@@ -48742,13 +48742,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method add\\(\\) of class Symfony\\\\Component\\\\Console\\\\Application\\:
since Symfony 7\\.4, use Application\\:\\:addCommand\\(\\) instead$#',
	'identifier' => 'method.deprecated',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Command/BootableCommandTraitTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Condition\\\\ConditionAccessResolverTraitTest\\:\\:providerTestResolveConditions\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
+7 −7
Original line number Diff line number Diff line
@@ -23,12 +23,12 @@ $classloader = require_once __DIR__ . '/../../autoload.php';

$application = new Application('drupal', \Drupal::VERSION);

$application->add(new QuickStartCommand());
$application->add(new InstallCommand($classloader));
$application->add(new ServerCommand($classloader));
$application->add(new GenerateTheme());
$application->add(new RecipeCommand($classloader));
$application->add(new RecipeInfoCommand($classloader));
$application->add(new ContentExportCommand($classloader));
$application->addCommand(new QuickStartCommand());
$application->addCommand(new InstallCommand($classloader));
$application->addCommand(new ServerCommand($classloader));
$application->addCommand(new GenerateTheme());
$application->addCommand(new RecipeCommand($classloader));
$application->addCommand(new RecipeInfoCommand($classloader));
$application->addCommand(new ContentExportCommand($classloader));

$application->run();
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ protected function setUp(): void {
   */
  public function testRequestUrlIsValid(): void {
    // Create a fake command that boots Drupal and outputs the base URL.
    $this->application->add(new class ($this->classLoader) extends Command {
    $this->application->addCommand(new class ($this->classLoader) extends Command {

      use BootableCommandTrait;