Skip to content

Commit

Permalink
Remove storyblok:components:overview in favor of storyblok:debug
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelbox committed Jun 24, 2024
1 parent 2d8642a commit 927aeaa
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 128 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

* (improvement) Detect space id / content token mismatch and automatically abort all further requests.
* (feature) Add `storyblok:debug` command.
* (deprecation) Deprecate `storyblok:components:overview` command, use `storyblok:debug` instead.


3.12.1
Expand Down
7 changes: 6 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
2.x to 4.0
3.x to 4.0
==========

* Removed `storyblok:components:overview` command, use `storyblok:debug` instead.


2.x to 4.0
==========

* `AbstractField::enablePreview()` is removed, use `AbstractField::useAsAdminDisplayName()` instead.

Expand Down
126 changes: 0 additions & 126 deletions src/Command/ComponentsOverviewCommand.php

This file was deleted.

19 changes: 18 additions & 1 deletion src/Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@

use function Symfony\Component\String\u;

#[AsCommand("storyblok:debug")]
#[AsCommand(
"storyblok:debug",
description: "Displays debug info for the current Storyblok connection and config.",
// TODO v4: remove alias
aliases: ["storyblok:components:overview"],
)]
final class DebugCommand extends Command
{
/**
Expand All @@ -39,6 +44,18 @@ protected function execute (InputInterface $input, OutputInterface $output) : in
$io = new TorrStyle($input, $output);
$io->title("Storyblok: Debug");

// TODO v4: remove check
if ("storyblok:debug" !== $input->getFirstArgument())
{
$message = sprintf(
"The command `%s` is deprecated. Use `%s` instead.",
$input->getFirstArgument(),
"storyblok:debug",
);
trigger_deprecation("21torr/storyblok", "3.13.0", $message);
$io->caution($message);
}

try
{
$this->showInfo($io);
Expand Down

0 comments on commit 927aeaa

Please sign in to comment.