final protected function execute(InputInterface $input, OutputInterface $output): int
    {
        @trigger_error('Using the AbstractLockedCommand has been deprecated and will no longer work in Contao 5.0. Use the lock service instead.', E_USER_DEPRECATED);

        $store = new FlockStore($this->getTempDir());
        $factory = new Factory($store);
        $lock = $factory->createLock($this->getName());

        if (!$lock->acquire()) {
            $output->writeln('The command is already running in another process.');

            return 1;
        }

        if (($errorCode = $this->executeLocked($input, $output)) > 0) {
            $lock->release();

            return $errorCode;
        }

        $lock->release();

        return 0;
    }
final protected function execute(InputInterface $input, OutputInterface $output): int
    {
        @trigger_error('Using the AbstractLockedCommand has been deprecated and will no longer work in Contao 5.0. Use the lock service instead.', E_USER_DEPRECATED);

        $store = new FlockStore($this->getTempDir());
        $factory = new Factory($store);
        $lock = $factory->createLock($this->getName());

        if (!$lock->acquire()) {
            $output->writeln('The command is already running in another process.');

            return 1;
        }

        if (($errorCode = $this->executeLocked($input, $output)) > 0) {
            $lock->release();

            return $errorCode;
        }

        $lock->release();

        return 0;
    }
{@inheritdoc}