Skip to content

Commit 6174132

Browse files
author
julien
committed
fix(deprecated): fix deprecated symfony 7
1 parent bb2106c commit 6174132

10 files changed

+17
-17
lines changed

src/Command/MakeTwcCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ContextGenerator $contextGenerator)
2525
$this->contextGenerator = $contextGenerator;
2626
}
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Creates a new console command class')

src/Command/MakeTwcController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function getCommandDescription(): string
6262
return 'Creates a new controller class';
6363
}
6464

65-
public function configureCommand(Command $command, InputConfiguration $inputConf)
65+
public function configureCommand(Command $command, InputConfiguration $inputConf): void
6666
{
6767
$command
6868
->setDescription('Creates a new controller class')
@@ -72,7 +72,7 @@ public function configureCommand(Command $command, InputConfiguration $inputConf
7272
;
7373
}
7474

75-
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator)
75+
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator): void
7676
{
7777
$controllerClass = $input->getArgument('controller-class');
7878
$context = $input->getOption('context');
@@ -136,15 +136,15 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
136136
$io->text('Next: Open your new controller class and add some pages!');
137137
}
138138

139-
public function configureDependencies(DependencyBuilder $dependencies)
139+
public function configureDependencies(DependencyBuilder $dependencies): void
140140
{
141141
$dependencies->addClassDependency(
142142
Annotation::class,
143143
'doctrine/annotations'
144144
);
145145
}
146146

147-
private function isTwigInstalled()
147+
private function isTwigInstalled(): bool
148148
{
149149
return class_exists(TwigBundle::class);
150150
}

src/Command/MakeTwcEntity.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function getCommandDescription(): string
9898
return 'Creates or updates a Doctrine entity class, and optionally an API Platform resource';
9999
}
100100

101-
public function configureCommand(Command $command, InputConfiguration $inputConf)
101+
public function configureCommand(Command $command, InputConfiguration $inputConf): void
102102
{
103103
$command
104104
->setDescription('Creates or updates a Doctrine entity class, and optionally an API Platform resource')
@@ -134,7 +134,7 @@ public function configureCommand(Command $command, InputConfiguration $inputConf
134134
$inputConf->setArgumentAsNonInteractive('name');
135135
}
136136

137-
public function interact(InputInterface $input, ConsoleStyle $io, Command $command)
137+
public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
138138
{
139139
if ($input->getArgument('name')) {
140140
return;
@@ -187,7 +187,7 @@ class_exists(Broadcast::class) &&
187187
}
188188
}
189189

190-
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator)
190+
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator): void
191191
{
192192
$overwrite = $input->getOption('overwrite');
193193
// the regenerate option has entirely custom behavior
@@ -380,7 +380,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
380380
]);
381381
}
382382

383-
public function configureDependencies(DependencyBuilder $dependencies, InputInterface $input = null)
383+
public function configureDependencies(DependencyBuilder $dependencies, InputInterface $input = null): void
384384
{
385385
$dependencies->requirePHP71();
386386

@@ -599,7 +599,7 @@ private function askRelationDetails(
599599
string $generatedEntityClass,
600600
string $type,
601601
string $newFieldName
602-
) {
602+
): EntityRelation {
603603
// ask the targetEntity
604604
$targetEntityClass = null;
605605
while (null === $targetEntityClass) {

src/Command/MakeTwcFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ContextGenerator $contextGenerator)
2525
$this->contextGenerator = $contextGenerator;
2626
}
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Creates a new class to load Doctrine fixtures')

src/Command/MakeTwcForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ContextGenerator $contextGenerator)
2525
$this->contextGenerator = $contextGenerator;
2626
}
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Creates a new form class')

src/Command/MakeTwcMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(ContextGenerator $contextGenerator)
2424
$this->contextGenerator = $contextGenerator;
2525
}
2626

27-
protected function configure()
27+
protected function configure(): void
2828
{
2929
$this
3030
->setDescription('Creates a new message and handler')

src/Command/MakeTwcMessengerMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ContextGenerator $contextGenerator)
2525
$this->contextGenerator = $contextGenerator;
2626
}
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Creates a new messenger middleware')

src/Command/MakeTwcValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ContextGenerator $contextGenerator)
2525
$this->contextGenerator = $contextGenerator;
2626
}
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Creates a new validator and constraint class')

src/Command/MakeTwcVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ContextGenerator $contextGenerator)
2525
$this->contextGenerator = $contextGenerator;
2626
}
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Creates a new security voter class')

src/DependencyInjection/TwcMakerExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class TwcMakerExtension extends Extension
1414
{
15-
public function load(array $configs, ContainerBuilder $container)
15+
public function load(array $configs, ContainerBuilder $container): void
1616
{
1717
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
1818
$loader->load('services.yaml');

0 commit comments

Comments
 (0)