Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[make:entity] remove PhpCompatUtil constructor argument #1452

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/Maker/MakeEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use Symfony\Bundle\MakerBundle\Util\ClassSource\Model\ClassProperty;
use Symfony\Bundle\MakerBundle\Util\ClassSourceManipulator;
use Symfony\Bundle\MakerBundle\Util\CliOutputHelper;
use Symfony\Bundle\MakerBundle\Util\PhpCompatUtil;
use Symfony\Bundle\MakerBundle\Validator;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
Expand All @@ -48,15 +47,13 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface
{
private Generator $generator;
private EntityClassGenerator $entityClassGenerator;
private PhpCompatUtil $phpCompatUtil;

public function __construct(
private FileManager $fileManager,
private DoctrineHelper $doctrineHelper,
?string $projectDirectory = null,
?Generator $generator = null,
?EntityClassGenerator $entityClassGenerator = null,
?PhpCompatUtil $phpCompatUtil = null,
) {
if (null !== $projectDirectory) {
@trigger_error('The $projectDirectory constructor argument is no longer used since 1.41.0', \E_USER_DEPRECATED);
Expand All @@ -75,13 +72,6 @@ public function __construct(
} else {
$this->entityClassGenerator = $entityClassGenerator;
}

if (null === $phpCompatUtil) {
@trigger_error(sprintf('Passing a "%s" instance as 6th argument is mandatory since version 1.41.0', PhpCompatUtil::class), \E_USER_DEPRECATED);
$this->phpCompatUtil = new PhpCompatUtil($this->fileManager);
} else {
$this->phpCompatUtil = $phpCompatUtil;
}
}

public static function getCommandName(): string
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/makers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<argument>null</argument>
<argument type="service" id="maker.generator" />
<argument type="service" id="maker.entity_class_generator" />
<argument type="service" id="maker.php_compat_util" />
<tag name="maker.command" />
</service>

Expand Down
Loading