Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MadelineProto stops working after upgrading to 7.2 #59051

Open
@Zausenec

Description

@Zausenec

Symfony version(s) affected

7.2

Description

Application using danog/MadelineProto stops working in 7.2 with exception

Symfony\Component\ErrorHandler\Error\ClassNotFoundError
Attempted to load class "AbstractAPI" from namespace "danog\MadelineProto".
Did you forget a "use" statement for "danog\MadelineProto\Namespace\AbstractAPI"?

Looks like the problem in 01eb32c

How to reproduce

symfony new reproduce
cd reproduce
composer req danog/madelineproto

create file src/Handler.php

<?php

namespace App;

use danog\MadelineProto\SimpleEventHandler;
use Symfony\Component\DependencyInjection\Attribute\Exclude;

#[Exclude]
class Handler extends SimpleEventHandler
{
}

And file src/ReproduceCommand.php

<?php

namespace App;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[AsCommand(name: 'reproduce')]
class ReproduceCommand extends Command
{
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        Handler::startAndLoop('session');
    }
}

run new command:

php bin/console reproduce -vvv

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions