HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/payments-gateway/vendor/doctrine/doctrine-bundle/src/Command/Proxy/OrmProxyCommand.php
<?php

namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy;

use Doctrine\ORM\Tools\Console\EntityManagerProvider;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

use function trigger_deprecation;

/**
 * @internal
 * @deprecated
 */
trait OrmProxyCommand
{
    public function __construct(
        private readonly EntityManagerProvider|null $entityManagerProvider = null,
    ) {
        parent::__construct($entityManagerProvider);

        trigger_deprecation(
            'doctrine/doctrine-bundle',
            '2.8',
            'Class "%s" is deprecated. Use "%s" instead.',
            self::class,
            parent::class,
        );
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        if (! $this->entityManagerProvider) {
            /* @phpstan-ignore argument.type (ORM < 3 specific) */
            DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));
        }

        return parent::execute($input, $output);
    }
}