| @@ -1,6 +1,6 @@ | |||||
| { | { | ||||
| "name": "spt/spt-bundle-core", | |||||
| "version": "1.0.0", | |||||
| "name": "spt/bundle-core", | |||||
| "version": "1.0.2", | |||||
| "type": "symfony-bundle", | "type": "symfony-bundle", | ||||
| "description": "Core bundle for basic functionality", | "description": "Core bundle for basic functionality", | ||||
| "require": { | "require": { | ||||
| @@ -12,7 +12,7 @@ | |||||
| }, | }, | ||||
| "autoload": { | "autoload": { | ||||
| "psr-4": { | "psr-4": { | ||||
| "Spt\\SptCoreBundle\\": "src/" | |||||
| "Spt\\CoreBundle\\": "src/" | |||||
| } | } | ||||
| }, | }, | ||||
| "authors": [ | "authors": [ | ||||
| @@ -0,0 +1,5 @@ | |||||
| spt_core_bundle.routes: | |||||
| prefix: 'spt-core' | |||||
| type: annotation | |||||
| resource: '../src/Controller/' | |||||
| @@ -6,28 +6,8 @@ services: | |||||
| autowire: true | autowire: true | ||||
| autoconfigure: true | autoconfigure: true | ||||
| Spt\SptCoreBundle\Controller\SecurityController: ~ | |||||
| # makes classes in src/ available to be used as services | |||||
| # this creates a service per class whose id is the fully-qualified class name | |||||
| Spt\SptCoreBundle\: | |||||
| resource: '../src/' | |||||
| exclude: | |||||
| - '../src/DependencyInjection/' | |||||
| - '../src/Entity/' | |||||
| - '../src/Kernel.php' | |||||
| - '../src/Tests/' | |||||
| # controllers are imported separately to make sure services can be injected | # controllers are imported separately to make sure services can be injected | ||||
| # as action arguments even if you don't extend any base controller class | # as action arguments even if you don't extend any base controller class | ||||
| Spt\SptCoreBundle\Controller\: | |||||
| Spt\CoreBundle\Controller\: | |||||
| resource: '../src/Controller/' | resource: '../src/Controller/' | ||||
| tags: ['controller.service_arguments'] | |||||
| Spt\SptCoreBundle\Command\: | |||||
| resource: '../src/Command/' | |||||
| autowire: true | |||||
| autoconfigure: true | |||||
| arguments: [ '@doctrine.orm.entity_manager', '@service_container' ] | |||||
| tags: | |||||
| - { name: 'console.command' } | |||||
| tags: [ 'controller.service_arguments' ] | |||||
| @@ -5,10 +5,10 @@ | |||||
| */ | */ | ||||
| namespace Spt\SptCoreBundle\Controller; | |||||
| namespace Spt\CoreBundle\Controller; | |||||
| use Spt\SptCoreBundle\Entity\User; | |||||
| use Spt\CoreBundle\Entity\User; | |||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Bundle\SecurityBundle\Security; | use Symfony\Bundle\SecurityBundle\Security; | ||||
| use Symfony\Component\HttpFoundation\JsonResponse; | use Symfony\Component\HttpFoundation\JsonResponse; | ||||
| @@ -19,7 +19,7 @@ use Symfony\Component\Security\Http\Attribute\CurrentUser; | |||||
| class ApiLoginController extends AbstractController | class ApiLoginController extends AbstractController | ||||
| { | { | ||||
| #[Route('/api/login', name: 'spt_core_api_login', methods: ['POST'])] | |||||
| #[Route('api/login', name: 'spt_core_api_login', methods: ['POST'])] | |||||
| public function index(Request $request): JsonResponse | public function index(Request $request): JsonResponse | ||||
| { | { | ||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| @@ -5,10 +5,10 @@ | |||||
| */ | */ | ||||
| namespace Spt\SptCoreBundle\Controller; | |||||
| namespace Spt\CoreBundle\Controller; | |||||
| use Spt\SptCoreBundle\Entity\User; | |||||
| use Spt\CoreBundle\Entity\User; | |||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\HttpFoundation\JsonResponse; | use Symfony\Component\HttpFoundation\JsonResponse; | ||||
| use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; | use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; | ||||
| @@ -1,6 +1,6 @@ | |||||
| <?php | <?php | ||||
| namespace Spt\SptCoreBundle\Controller; | |||||
| namespace Spt\CoreBundle\Controller; | |||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\HttpFoundation\JsonResponse; | use Symfony\Component\HttpFoundation\JsonResponse; | ||||
| @@ -5,7 +5,7 @@ | |||||
| */ | */ | ||||
| namespace Spt\SptCoreBundle\DependencyInjections; | |||||
| namespace Spt\CoreBundle\DependencyInjections; | |||||
| use Exception; | use Exception; | ||||
| @@ -1,6 +1,6 @@ | |||||
| <?php | <?php | ||||
| namespace Spt\SptCoreBundle\Entity; | |||||
| namespace Spt\CoreBundle\Entity; | |||||
| use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
| use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; | use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; | ||||
| @@ -5,9 +5,9 @@ | |||||
| * @date 18.10.23 | * @date 18.10.23 | ||||
| */ | */ | ||||
| namespace Spt\SptCoreBundle; | |||||
| namespace Spt\CoreBundle; | |||||
| use Spt\SptCoreBundle\DependencyInjections\SptCoreExtension; | |||||
| use Spt\CoreBundle\DependencyInjections\SptCoreExtension; | |||||
| use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; | use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; | ||||
| use Symfony\Component\HttpKernel\Bundle\AbstractBundle; | use Symfony\Component\HttpKernel\Bundle\AbstractBundle; | ||||
| use function dirname; | use function dirname; | ||||