• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 20969151198

13 Jan 2026 07:07PM UTC coverage: 0.0% (-29.1%) from 29.095%
20969151198

Pull #7669

github

web-flow
Merge 872bbc755 into c8493bbe7
Pull Request #7669: ci - fix testMapPutAllowCreate

0 of 57775 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Symfony/Maker/MakeStateProcessor.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Symfony\Maker;
15

16
use Symfony\Bundle\MakerBundle\ConsoleStyle;
17
use Symfony\Bundle\MakerBundle\DependencyBuilder;
18
use Symfony\Bundle\MakerBundle\Generator;
19
use Symfony\Bundle\MakerBundle\InputConfiguration;
20
use Symfony\Bundle\MakerBundle\Maker\AbstractMaker;
21
use Symfony\Component\Console\Command\Command;
22
use Symfony\Component\Console\Input\InputArgument;
23
use Symfony\Component\Console\Input\InputInterface;
24
use Symfony\Component\Console\Input\InputOption;
25

26
final class MakeStateProcessor extends AbstractMaker
27
{
28
    public function __construct(private readonly string $namespacePrefix = '')
29
    {
30
    }
×
31

32
    /**
33
     * {@inheritdoc}
34
     */
35
    public static function getCommandName(): string
36
    {
37
        return 'make:state-processor';
×
38
    }
39

40
    /**
41
     * {@inheritdoc}
42
     */
43
    public static function getCommandDescription(): string
44
    {
45
        return 'Creates an API Platform state processor';
×
46
    }
47

48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function configureCommand(Command $command, InputConfiguration $inputConfig): void
52
    {
53
        $command
×
54
            ->addArgument('name', InputArgument::REQUIRED, 'Choose a class name for your state processor (e.g. <fg=yellow>AwesomeStateProcessor</>)')
×
55
            ->addOption('namespace-prefix', 'p', InputOption::VALUE_REQUIRED, 'Specify the namespace prefix to use for the state processor class', $this->namespacePrefix.'State')
×
56
            ->setHelp(file_get_contents(__DIR__.'/Resources/help/MakeStateProcessor.txt'));
×
57
    }
58

59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function configureDependencies(DependencyBuilder $dependencies): void
63
    {
64
    }
×
65

66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator): void
70
    {
71
        $stateProcessorClassNameDetails = $generator->createClassNameDetails(
×
72
            $input->getArgument('name'),
×
73
            trim($input->getOption('namespace-prefix'), '\\').'\\'
×
74
        );
×
75

76
        $generator->generateClass(
×
77
            $stateProcessorClassNameDetails->getFullName(),
×
78
            __DIR__.'/Resources/skeleton/StateProcessor.php.tpl'
×
79
        );
×
80
        $generator->writeChanges();
×
81

82
        $this->writeSuccessMessage($io);
×
83
        $io->text([
×
84
            'Next: Open your new state processor class and start customizing it.',
×
85
        ]);
×
86
    }
87
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc