Files
archived-mongodb-odm/src/Tools/Console/Command/Schema/AbstractCommandCompatibility.php
Jérôme Tamarelle 257a0a2ab0 Symfony 8.0 support (#2791)
* Symfony 8.0 support
* Use symfony/flex for version constraint in CI
2025-10-28 12:48:23 +01:00

31 lines
651 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\ODM\MongoDB\Tools\Console\Command\Schema;
use ReflectionMethod;
use Symfony\Component\Console\Command\Command;
// Symfony 8
if ((new ReflectionMethod(Command::class, 'configure'))->hasReturnType()) {
/** @internal */
trait AbstractCommandCompatibility
{
protected function configure(): void
{
$this->configureCommonOptions();
}
}
} else {
/** @internal */
trait AbstractCommandCompatibility
{
/** @return void */
protected function configure()
{
$this->configureCommonOptions();
}
}
}