diff --git a/src/TelegramBot/Command/ButtonDeleteCommand.php b/src/Command/ButtonDeleteCommand.php similarity index 95% rename from src/TelegramBot/Command/ButtonDeleteCommand.php rename to src/Command/ButtonDeleteCommand.php index e289543..0285500 100644 --- a/src/TelegramBot/Command/ButtonDeleteCommand.php +++ b/src/Command/ButtonDeleteCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Command; +namespace Luzrain\TelegramBotBundle\Command; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Exception\TelegramApiException; diff --git a/src/TelegramBot/Command/ButtonUpdateCommand.php b/src/Command/ButtonUpdateCommand.php similarity index 92% rename from src/TelegramBot/Command/ButtonUpdateCommand.php rename to src/Command/ButtonUpdateCommand.php index 22d3e15..223ab98 100644 --- a/src/TelegramBot/Command/ButtonUpdateCommand.php +++ b/src/Command/ButtonUpdateCommand.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Command; +namespace Luzrain\TelegramBotBundle\Command; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Exception\TelegramApiException; use Luzrain\TelegramBotApi\Method; use Luzrain\TelegramBotApi\Type; -use Luzrain\TelegramBotBundle\TelegramBot\CommandMetadataProvider; +use Luzrain\TelegramBotBundle\CommandMetadataProvider; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -23,7 +23,7 @@ public function __construct( private CommandMetadataProvider $commandMetadataProvider, callable|null $descriptionProcessor, ) { - $this->descriptionProcessor = $descriptionProcessor ? $descriptionProcessor(...) : static fn (string $str) => $str; + $this->descriptionProcessor = $descriptionProcessor ? $descriptionProcessor(...) : static fn(string $str) => $str; parent::__construct(); } diff --git a/src/TelegramBot/Command/PolllingStartCommand.php b/src/Command/PolllingStartCommand.php similarity index 94% rename from src/TelegramBot/Command/PolllingStartCommand.php rename to src/Command/PolllingStartCommand.php index eb6af98..a1c168a 100644 --- a/src/TelegramBot/Command/PolllingStartCommand.php +++ b/src/Command/PolllingStartCommand.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Command; +namespace Luzrain\TelegramBotBundle\Command; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Exception\TelegramApiException; -use Luzrain\TelegramBotBundle\TelegramBot\LongPollingService; -use Luzrain\TelegramBotBundle\TelegramBot\UpdateHandler; +use Luzrain\TelegramBotBundle\LongPollingService; +use Luzrain\TelegramBotBundle\UpdateHandler; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/src/TelegramBot/Command/WebhookDeleteCommand.php b/src/Command/WebhookDeleteCommand.php similarity index 95% rename from src/TelegramBot/Command/WebhookDeleteCommand.php rename to src/Command/WebhookDeleteCommand.php index 7b210ff..db09a99 100644 --- a/src/TelegramBot/Command/WebhookDeleteCommand.php +++ b/src/Command/WebhookDeleteCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Command; +namespace Luzrain\TelegramBotBundle\Command; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Exception\TelegramApiException; diff --git a/src/TelegramBot/Command/WebhookInfoCommand.php b/src/Command/WebhookInfoCommand.php similarity index 96% rename from src/TelegramBot/Command/WebhookInfoCommand.php rename to src/Command/WebhookInfoCommand.php index 1fd8827..695ad6f 100644 --- a/src/TelegramBot/Command/WebhookInfoCommand.php +++ b/src/Command/WebhookInfoCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Command; +namespace Luzrain\TelegramBotBundle\Command; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Exception\TelegramApiException; diff --git a/src/TelegramBot/Command/WebhookUpdateCommand.php b/src/Command/WebhookUpdateCommand.php similarity index 98% rename from src/TelegramBot/Command/WebhookUpdateCommand.php rename to src/Command/WebhookUpdateCommand.php index 5759a42..f1f74a2 100644 --- a/src/TelegramBot/Command/WebhookUpdateCommand.php +++ b/src/Command/WebhookUpdateCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Command; +namespace Luzrain\TelegramBotBundle\Command; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Exception\TelegramApiException; diff --git a/src/TelegramBot/CommandMetadataProvider.php b/src/CommandMetadataProvider.php similarity index 96% rename from src/TelegramBot/CommandMetadataProvider.php rename to src/CommandMetadataProvider.php index 9f0a0a9..935ba98 100644 --- a/src/TelegramBot/CommandMetadataProvider.php +++ b/src/CommandMetadataProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot; +namespace Luzrain\TelegramBotBundle; use Luzrain\TelegramBotBundle\Attribute\OnCommand; diff --git a/src/TelegramBot/LongPollingService.php b/src/LongPollingService.php similarity index 97% rename from src/TelegramBot/LongPollingService.php rename to src/LongPollingService.php index 5d7e8a1..24bb531 100644 --- a/src/TelegramBot/LongPollingService.php +++ b/src/LongPollingService.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot; +namespace Luzrain\TelegramBotBundle; use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\Method\GetUpdates; diff --git a/src/TelegramBot/TelegramCommand.php b/src/TelegramCommand.php similarity index 96% rename from src/TelegramBot/TelegramCommand.php rename to src/TelegramCommand.php index 75486aa..c04b2d5 100644 --- a/src/TelegramBot/TelegramCommand.php +++ b/src/TelegramCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot; +namespace Luzrain\TelegramBotBundle; use Luzrain\TelegramBotApi\EventCallbackReturn; use Luzrain\TelegramBotApi\Method; diff --git a/src/TelegramBot/UpdateHandler.php b/src/UpdateHandler.php similarity index 98% rename from src/TelegramBot/UpdateHandler.php rename to src/UpdateHandler.php index f387be4..8d6064b 100644 --- a/src/TelegramBot/UpdateHandler.php +++ b/src/UpdateHandler.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot; +namespace Luzrain\TelegramBotBundle; use Luzrain\TelegramBotApi\ClientApi; use Luzrain\TelegramBotApi\Event; diff --git a/src/TelegramBot/Controller/WebHookController.php b/src/WebHookController.php similarity index 92% rename from src/TelegramBot/Controller/WebHookController.php rename to src/WebHookController.php index b3fa76c..c23da31 100644 --- a/src/TelegramBot/Controller/WebHookController.php +++ b/src/WebHookController.php @@ -2,11 +2,10 @@ declare(strict_types=1); -namespace Luzrain\TelegramBotBundle\TelegramBot\Controller; +namespace Luzrain\TelegramBotBundle; use Luzrain\TelegramBotApi\Exception\TelegramTypeException; use Luzrain\TelegramBotApi\Type\Update; -use Luzrain\TelegramBotBundle\TelegramBot\UpdateHandler; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/config/compilerpass.php b/src/config/compilerpass.php index f90f247..49bb6cc 100644 --- a/src/config/compilerpass.php +++ b/src/config/compilerpass.php @@ -2,8 +2,8 @@ declare(strict_types=1); -use Luzrain\TelegramBotBundle\TelegramBot\CommandMetadataProvider; -use Luzrain\TelegramBotBundle\TelegramBot\UpdateHandler; +use Luzrain\TelegramBotBundle\CommandMetadataProvider; +use Luzrain\TelegramBotBundle\UpdateHandler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; diff --git a/src/config/services.php b/src/config/services.php index 49007da..b6bc8a3 100644 --- a/src/config/services.php +++ b/src/config/services.php @@ -7,14 +7,14 @@ use Luzrain\TelegramBotBundle\Attribute\OnCallback; use Luzrain\TelegramBotBundle\Attribute\OnCommand; use Luzrain\TelegramBotBundle\Attribute\OnEvent; -use Luzrain\TelegramBotBundle\TelegramBot\Command\ButtonDeleteCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\ButtonUpdateCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\PolllingStartCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\WebhookDeleteCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\WebhookInfoCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\WebhookUpdateCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Controller\WebHookController; -use Luzrain\TelegramBotBundle\TelegramBot\LongPollingService; +use Luzrain\TelegramBotBundle\Command\ButtonDeleteCommand; +use Luzrain\TelegramBotBundle\Command\ButtonUpdateCommand; +use Luzrain\TelegramBotBundle\Command\PolllingStartCommand; +use Luzrain\TelegramBotBundle\Command\WebhookDeleteCommand; +use Luzrain\TelegramBotBundle\Command\WebhookInfoCommand; +use Luzrain\TelegramBotBundle\Command\WebhookUpdateCommand; +use Luzrain\TelegramBotBundle\LongPollingService; +use Luzrain\TelegramBotBundle\WebHookController; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/tests/CommandMetadataProviderTest.php b/tests/CommandMetadataProviderTest.php index 8b9f3db..ca65d09 100644 --- a/tests/CommandMetadataProviderTest.php +++ b/tests/CommandMetadataProviderTest.php @@ -5,7 +5,7 @@ namespace Luzrain\TelegramBotBundle\Test; use Luzrain\TelegramBotBundle\Attribute\OnCommand; -use Luzrain\TelegramBotBundle\TelegramBot\CommandMetadataProvider; +use Luzrain\TelegramBotBundle\CommandMetadataProvider; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; final class CommandMetadataProviderTest extends KernelTestCase diff --git a/tests/Controller/AnyUpdateController.php b/tests/Controller/AnyUpdateController.php index dad6c44..f3ddbaf 100644 --- a/tests/Controller/AnyUpdateController.php +++ b/tests/Controller/AnyUpdateController.php @@ -6,7 +6,7 @@ use Luzrain\TelegramBotApi\Event; use Luzrain\TelegramBotBundle\Attribute\OnEvent; -use Luzrain\TelegramBotBundle\TelegramBot\TelegramCommand; +use Luzrain\TelegramBotBundle\TelegramCommand; use Luzrain\TelegramBotBundle\Test\Helper\ControllerTestHelper; final class AnyUpdateController extends TelegramCommand diff --git a/tests/Controller/CallbackCommandController.php b/tests/Controller/CallbackCommandController.php index 6fcbb6d..d966c9a 100644 --- a/tests/Controller/CallbackCommandController.php +++ b/tests/Controller/CallbackCommandController.php @@ -6,7 +6,7 @@ use Luzrain\TelegramBotApi\Method; use Luzrain\TelegramBotBundle\Attribute\OnCallback; -use Luzrain\TelegramBotBundle\TelegramBot\TelegramCommand; +use Luzrain\TelegramBotBundle\TelegramCommand; use Luzrain\TelegramBotBundle\Test\Helper\ControllerTestHelper; final class CallbackCommandController extends TelegramCommand diff --git a/tests/Controller/MessageController.php b/tests/Controller/MessageController.php index 4f320b2..b9525de 100644 --- a/tests/Controller/MessageController.php +++ b/tests/Controller/MessageController.php @@ -8,7 +8,7 @@ use Luzrain\TelegramBotApi\Method; use Luzrain\TelegramBotApi\Type; use Luzrain\TelegramBotBundle\Attribute\OnEvent; -use Luzrain\TelegramBotBundle\TelegramBot\TelegramCommand; +use Luzrain\TelegramBotBundle\TelegramCommand; use Luzrain\TelegramBotBundle\Test\Helper\ControllerTestHelper; final class MessageController extends TelegramCommand diff --git a/tests/Controller/StartCommandController.php b/tests/Controller/StartCommandController.php index 527a646..b2fc1d2 100644 --- a/tests/Controller/StartCommandController.php +++ b/tests/Controller/StartCommandController.php @@ -6,7 +6,7 @@ use Luzrain\TelegramBotApi\Method; use Luzrain\TelegramBotBundle\Attribute\OnCommand; -use Luzrain\TelegramBotBundle\TelegramBot\TelegramCommand; +use Luzrain\TelegramBotBundle\TelegramCommand; use Luzrain\TelegramBotBundle\Test\Helper\ControllerTestHelper; final class StartCommandController extends TelegramCommand diff --git a/tests/Controller/TestCommandController.php b/tests/Controller/TestCommandController.php index 7f5bc64..f5195bc 100644 --- a/tests/Controller/TestCommandController.php +++ b/tests/Controller/TestCommandController.php @@ -6,7 +6,7 @@ use Luzrain\TelegramBotApi\Method; use Luzrain\TelegramBotBundle\Attribute\OnCommand; -use Luzrain\TelegramBotBundle\TelegramBot\TelegramCommand; +use Luzrain\TelegramBotBundle\TelegramCommand; use Luzrain\TelegramBotBundle\Test\Helper\ControllerTestHelper; final class TestCommandController extends TelegramCommand diff --git a/tests/ServicesAutowiringTest.php b/tests/ServicesAutowiringTest.php index 21be29b..63957f4 100644 --- a/tests/ServicesAutowiringTest.php +++ b/tests/ServicesAutowiringTest.php @@ -6,16 +6,16 @@ use Luzrain\TelegramBotApi\BotApi; use Luzrain\TelegramBotApi\ClientApi; -use Luzrain\TelegramBotBundle\TelegramBot\Command\ButtonDeleteCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\ButtonUpdateCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\PolllingStartCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\WebhookDeleteCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\WebhookInfoCommand; -use Luzrain\TelegramBotBundle\TelegramBot\Command\WebhookUpdateCommand; -use Luzrain\TelegramBotBundle\TelegramBot\CommandMetadataProvider; -use Luzrain\TelegramBotBundle\TelegramBot\Controller\WebHookController; -use Luzrain\TelegramBotBundle\TelegramBot\LongPollingService; -use Luzrain\TelegramBotBundle\TelegramBot\UpdateHandler; +use Luzrain\TelegramBotBundle\Command\ButtonDeleteCommand; +use Luzrain\TelegramBotBundle\Command\ButtonUpdateCommand; +use Luzrain\TelegramBotBundle\Command\PolllingStartCommand; +use Luzrain\TelegramBotBundle\Command\WebhookDeleteCommand; +use Luzrain\TelegramBotBundle\Command\WebhookInfoCommand; +use Luzrain\TelegramBotBundle\Command\WebhookUpdateCommand; +use Luzrain\TelegramBotBundle\CommandMetadataProvider; +use Luzrain\TelegramBotBundle\LongPollingService; +use Luzrain\TelegramBotBundle\UpdateHandler; +use Luzrain\TelegramBotBundle\WebHookController; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\StreamFactoryInterface; diff --git a/tests/UpdateHandlerTest.php b/tests/UpdateHandlerTest.php index 5c084df..72549fc 100644 --- a/tests/UpdateHandlerTest.php +++ b/tests/UpdateHandlerTest.php @@ -6,8 +6,8 @@ use Luzrain\TelegramBotApi\Method; use Luzrain\TelegramBotApi\Type\Update; -use Luzrain\TelegramBotBundle\TelegramBot\UpdateHandler; use Luzrain\TelegramBotBundle\Test\Helper\ControllerTestHelper; +use Luzrain\TelegramBotBundle\UpdateHandler; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; final class UpdateHandlerTest extends KernelTestCase