Skip to content

Commit

Permalink
Merge pull request #35 from symplify/tv-extract-dumpre-command
Browse files Browse the repository at this point in the history
remove genercate-config-classes command, as cannot be scoped easily
  • Loading branch information
TomasVotruba authored Jan 15, 2024
2 parents ec4872b + 2b5eeb5 commit 5b19239
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 129 deletions.
12 changes: 0 additions & 12 deletions scoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

// excluded
'exclude-namespaces' => [
'#^Symfony\\\\Component\\\\Config#',
'#^Symplify\\\\ConfigTransformer#',
'#^Symplify\\\\PhpConfigPrinter#',
'#^Symfony\\\\Polyfill#',
Expand All @@ -66,17 +65,6 @@ function (string $filePath, string $prefix, string $content): string {
return Strings::replace($content, $pattern, 'public const $1 = \'');
},

function (string $filePath, string $prefix, string $content): string {
/** @see \Symplify\ConfigTransformer\Enum\SymfonyClass */
if (! str_ends_with($filePath, 'src/Enum/SymfonyClass.php')) {
return $content;
}

$pattern = sprintf('#public const (.*?) = \'%s\\\\\\\\#', $prefix);

return Strings::replace($content, $pattern, 'public const $1 = \'');
},

// unprefix strings class, used for node factory
// fixes https://github.com/symplify/symplify/issues/3976
function (string $filePath, string $prefix, string $content): string {
Expand Down
76 changes: 0 additions & 76 deletions src/Console/Command/GenerateConfigClassesCommand.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/Console/ConfigTransformerApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
namespace Symplify\ConfigTransformer\Console;

use Symfony\Component\Console\Application;
use Symplify\ConfigTransformer\Console\Command\GenerateConfigClassesCommand;
use Symplify\ConfigTransformer\Console\Command\SwitchFormatCommand;

final class ConfigTransformerApplication extends Application
{
public function __construct(
SwitchFormatCommand $switchFormatCommand,
GenerateConfigClassesCommand $generateConfigClassesCommand
) {
// must be run before adding commands
// otherwise the default command will be overridden to a "list" command
parent::__construct();

$this->add($switchFormatCommand);
$this->add($generateConfigClassesCommand);

// hide unnecesary command
$this->get('help')->setHidden();
Expand Down
38 changes: 0 additions & 38 deletions src/Enum/SymfonyClass.php

This file was deleted.

0 comments on commit 5b19239

Please sign in to comment.