Skip to content

Commit

Permalink
Deprecate dump commands (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
eerison committed Jul 16, 2022
1 parent f11143b commit 488259c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Command/DumpPageCommand.php
Expand Up @@ -24,6 +24,10 @@
* Migrates the name setting of all blocks into a code setting.
*
* @final since sonata-project/page-bundle 3.26
*
* NEXT_MAJOR: Remove this class
*
* @deprecated since 3.27, and it will be removed in 4.0.
*/
class DumpPageCommand extends BaseCommand
{
Expand Down Expand Up @@ -104,4 +108,18 @@ public function renderBlock(BlockInterface $block, OutputInterface $output, $ext
$this->renderBlock($block, $output, $extended, $space + 1);
}
}

public function run(InputInterface $input, OutputInterface $output)
{
@trigger_error(
sprintf(
'This %s is deprecated since sonata-project/page-bundle 3.27.0'.
' and it will be removed in 4.0',
self::class
),
\E_USER_DEPRECATED
);

return parent::run($input, $output);
}
}
18 changes: 18 additions & 0 deletions src/Command/RenderBlockCommand.php
Expand Up @@ -23,6 +23,10 @@
* Migrates the name setting of all blocks into a code setting.
*
* @final since sonata-project/page-bundle 3.26
*
* NEXT_MAJOR: Remove this class
*
* @deprecated since 3.27, and it will be removed in 4.0.
*/
class RenderBlockCommand extends BaseCommand
{
Expand Down Expand Up @@ -88,4 +92,18 @@ public function execute(InputInterface $input, OutputInterface $output)

return 0;
}

public function run(InputInterface $input, OutputInterface $output)
{
@trigger_error(
sprintf(
'This %s is deprecated since sonata-project/page-bundle 3.27.0'.
' and it will be removed in 4.0',
self::class
),
\E_USER_DEPRECATED
);

return parent::run($input, $output);
}
}

0 comments on commit 488259c

Please sign in to comment.