mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Maintenance] Remove FOS Restbundle (#17025)
| Q | A |-----------------|----- | Branch? | 2.0 | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Related tickets | n/a | License | MIT <!-- - Bug fixes must be submitted against the 1.13 branch - Features and deprecations must be submitted against the 1.14 branch - Features, removing deprecations and BC breaks must be submitted against the 2.0 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html -->
This commit is contained in:
commit
e06428cce2
94 changed files with 84 additions and 421 deletions
|
|
@ -47,7 +47,6 @@
|
|||
"enshrined/svg-sanitize": "^0.16",
|
||||
"fakerphp/faker": "^1.10",
|
||||
"friendsofphp/proxy-manager-lts": "^1.0.7",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"gedmo/doctrine-extensions": "^3.2",
|
||||
"guzzlehttp/guzzle": "^6.5 || ^7.0",
|
||||
"guzzlehttp/psr7": "^2.5",
|
||||
|
|
@ -82,7 +81,7 @@
|
|||
"sylius/mailer": "^2.0",
|
||||
"sylius/mailer-bundle": "^2.0 || ^2.1@alpha",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"sylius/resource-bundle": "^1.11 || ^1.12@alpha",
|
||||
"sylius/theme-bundle": "^2.3",
|
||||
"sylius/twig-hooks": "~0.3.0",
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ return [
|
|||
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
|
||||
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
|
||||
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
|
||||
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
|
||||
Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
|
||||
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
|
||||
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
fos_rest:
|
||||
exception: true
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
xml: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/api/v1/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
|
||||
- { path: '^/', stop: true }
|
||||
|
|
@ -82,6 +82,12 @@ security:
|
|||
enable_csrf: true
|
||||
csrf_parameter: _csrf_shop_security_token
|
||||
csrf_token_id: shop_authenticate
|
||||
json_login:
|
||||
check_path: sylius_shop_json_login_check
|
||||
username_path: _username
|
||||
password_path: _password
|
||||
success_handler: sylius.authentication.success_handler
|
||||
failure_handler: sylius.authentication.failure_handler
|
||||
remember_me:
|
||||
secret: "%env(APP_SECRET)%"
|
||||
name: APP_SHOP_REMEMBER_ME
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
fos_rest:
|
||||
exception:
|
||||
debug: true
|
||||
|
|
@ -42,7 +42,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
// ...
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
|
||||
new Sylius\Bundle\InventoryBundle\SyliusInventoryBundle(),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
{
|
||||
$bundles = array(
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ Don't worry, everything was automatically installed via Composer.
|
|||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
|
|
|
|||
|
|
@ -226,15 +226,6 @@ The part that has to be removed from this file is shown below:
|
|||
|
||||
# - { path: "%sylius.security.api_regex%/.*", role: ROLE_API_ACCESS }
|
||||
|
||||
**5.** Remove fos_rest config from ``config/packages/fos_rest.yaml``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
fos_rest:
|
||||
format_listener:
|
||||
rules:
|
||||
# - { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } # remove or leave this line commented
|
||||
|
||||
**Done!** There is no API in Sylius now, just admin and shop.
|
||||
|
||||
Learn more
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
"doctrine/data-fixtures": "^1.4",
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ return [
|
|||
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
|
||||
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
|
||||
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
|
||||
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
|
||||
Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
|
||||
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
|
||||
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sylius\Bundle\ApiBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
final readonly class FlattenExceptionNormalizerDecoratorCompilerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
if (!$container->hasDefinition('fos_rest.serializer.flatten_exception_normalizer')) {
|
||||
$container->removeDefinition(FlattenExceptionNormalizer::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\ApiBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer;
|
||||
use Sylius\Bundle\ApiBundle\Serializer\HydraErrorNormalizer;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
|
@ -35,9 +34,5 @@ final readonly class LegacyErrorHandlingCompilerPass implements CompilerPassInte
|
|||
if ($container->hasDefinition(HydraErrorNormalizer::class)) {
|
||||
$container->removeDefinition(HydraErrorNormalizer::class);
|
||||
}
|
||||
|
||||
if ($container->hasDefinition(FlattenExceptionNormalizer::class)) {
|
||||
$container->removeDefinition(FlattenExceptionNormalizer::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,12 +90,6 @@
|
|||
<tag name="serializer.normalizer" priority="64" />
|
||||
</service>
|
||||
|
||||
<service id="Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer" decorates="fos_rest.serializer.flatten_exception_normalizer">
|
||||
<argument type="service" id="Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer.inner" />
|
||||
<argument type="service" id="request_stack" />
|
||||
<argument>%sylius.security.new_api_route%</argument>
|
||||
</service>
|
||||
|
||||
<service id="sylius_api.normalizer.shipping_method" class="Sylius\Bundle\ApiBundle\Serializer\Normalizer\ShippingMethodNormalizer">
|
||||
<argument type="service" id="sylius.section_resolver.uri_based_section_resolver" />
|
||||
<argument type="service" id="sylius.repository.order" />
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sylius\Bundle\ApiBundle\Serializer;
|
||||
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
final readonly class FlattenExceptionNormalizer implements NormalizerInterface
|
||||
{
|
||||
public function __construct(
|
||||
private NormalizerInterface $decorated,
|
||||
private RequestStack $requestStack,
|
||||
private string $newApiRoute,
|
||||
) {
|
||||
}
|
||||
|
||||
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
$request = $this->requestStack->getMainRequest();
|
||||
if (null === $request) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (str_starts_with($request->getPathInfo(), $this->newApiRoute)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->decorated->supportsNormalization($data, $format, $context);
|
||||
}
|
||||
|
||||
public function normalize(mixed $object, ?string $format = null, array $context = []): array
|
||||
{
|
||||
return $this->decorated->normalize($object, $format, $context);
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
return ['object' => true];
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\ApiBundle;
|
||||
|
||||
use Sylius\Bundle\ApiBundle\DependencyInjection\Compiler\FlattenExceptionNormalizerDecoratorCompilerPass;
|
||||
use Sylius\Bundle\ApiBundle\DependencyInjection\Compiler\LegacyErrorHandlingCompilerPass;
|
||||
use Sylius\Bundle\ApiBundle\DependencyInjection\Compiler\XmlResourceExtractorCompilerPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
|
@ -23,7 +22,6 @@ final class SyliusApiBundle extends Bundle
|
|||
{
|
||||
public function build(ContainerBuilder $container): void
|
||||
{
|
||||
$container->addCompilerPass(new FlattenExceptionNormalizerDecoratorCompilerPass());
|
||||
$container->addCompilerPass(new LegacyErrorHandlingCompilerPass());
|
||||
$container->addCompilerPass(new XmlResourceExtractorCompilerPass());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sylius\Bundle\ApiBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
|
||||
use Sylius\Bundle\ApiBundle\DependencyInjection\Compiler\FlattenExceptionNormalizerDecoratorCompilerPass;
|
||||
use Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
final class FlattenExceptionNormalizerDecoratorCompilerPassTest extends AbstractCompilerPassTestCase
|
||||
{
|
||||
/** @test */
|
||||
public function it_doesnt_remove_decoration_when_decorated_service_exists(): void
|
||||
{
|
||||
$this->setDefinition(FlattenExceptionNormalizer::class, new Definition());
|
||||
$this->setDefinition('fos_rest.serializer.flatten_exception_normalizer', new Definition());
|
||||
|
||||
$this->compile();
|
||||
|
||||
$this->assertContainerBuilderHasService(FlattenExceptionNormalizer::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_removes_decoration_when_decorated_service_doesnt_exist(): void
|
||||
{
|
||||
$this->setDefinition(FlattenExceptionNormalizer::class, new Definition());
|
||||
|
||||
$this->compile();
|
||||
|
||||
$this->assertContainerBuilderNotHasService(FlattenExceptionNormalizer::class);
|
||||
}
|
||||
|
||||
protected function registerCompilerPass(ContainerBuilder $container): void
|
||||
{
|
||||
$container->addCompilerPass(new FlattenExceptionNormalizerDecoratorCompilerPass());
|
||||
}
|
||||
}
|
||||
|
|
@ -15,7 +15,6 @@ namespace Sylius\Bundle\ApiBundle\Tests\DependencyInjection\Compiler;
|
|||
|
||||
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
|
||||
use Sylius\Bundle\ApiBundle\DependencyInjection\Compiler\LegacyErrorHandlingCompilerPass;
|
||||
use Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer;
|
||||
use Sylius\Bundle\ApiBundle\Serializer\HydraErrorNormalizer;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
|
@ -27,12 +26,10 @@ final class LegacyErrorHandlingCompilerPassTest extends AbstractCompilerPassTest
|
|||
{
|
||||
$this->setParameter('sylius_api.legacy_error_handling', false);
|
||||
$this->setDefinition(HydraErrorNormalizer::class, new Definition());
|
||||
$this->setDefinition(FlattenExceptionNormalizer::class, new Definition());
|
||||
|
||||
$this->compile();
|
||||
|
||||
$this->assertContainerBuilderHasService(HydraErrorNormalizer::class);
|
||||
$this->assertContainerBuilderHasService(FlattenExceptionNormalizer::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
|
|
@ -40,12 +37,10 @@ final class LegacyErrorHandlingCompilerPassTest extends AbstractCompilerPassTest
|
|||
{
|
||||
$this->setParameter('sylius_api.legacy_error_handling', true);
|
||||
$this->setDefinition(HydraErrorNormalizer::class, new Definition());
|
||||
$this->setDefinition(FlattenExceptionNormalizer::class, new Definition());
|
||||
|
||||
$this->compile();
|
||||
|
||||
$this->assertContainerBuilderNotHasService(HydraErrorNormalizer::class);
|
||||
$this->assertContainerBuilderNotHasService(FlattenExceptionNormalizer::class);
|
||||
}
|
||||
|
||||
protected function registerCompilerPass(ContainerBuilder $container): void
|
||||
|
|
|
|||
|
|
@ -1,78 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace spec\Sylius\Bundle\ApiBundle\Serializer;
|
||||
|
||||
use PhpSpec\ObjectBehavior;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
final class FlattenExceptionNormalizerSpec extends ObjectBehavior
|
||||
{
|
||||
function it_decorates_normalize_method(
|
||||
NormalizerInterface $normalizer,
|
||||
RequestStack $requestStack,
|
||||
): void {
|
||||
$this->beConstructedWith($normalizer, $requestStack, '/api/v1');
|
||||
|
||||
$normalizer->normalize('data', 'format', ['context'])->willReturn([])->shouldBeCalled();
|
||||
|
||||
$this->normalize('data', 'format', ['context']);
|
||||
}
|
||||
|
||||
function it_doesnt_support_normalization_when_path_starts_with_new_api_route(
|
||||
NormalizerInterface $normalizer,
|
||||
RequestStack $requestStack,
|
||||
Request $request,
|
||||
): void {
|
||||
$this->beConstructedWith($normalizer, $requestStack, '/api/v2');
|
||||
|
||||
$request->getPathInfo()->willReturn('/api/v2/products');
|
||||
|
||||
$requestStack->getMainRequest()->willReturn($request);
|
||||
|
||||
$normalizer->supportsNormalization('data', 'format', ['context'])->shouldNotBeCalled();
|
||||
|
||||
$this->supportsNormalization('data', 'format', ['context']);
|
||||
}
|
||||
|
||||
function it_supports_normalization_when_path_doesnt_start_with_new_api_route(
|
||||
NormalizerInterface $normalizer,
|
||||
RequestStack $requestStack,
|
||||
Request $request,
|
||||
): void {
|
||||
$this->beConstructedWith($normalizer, $requestStack, '/api/v2');
|
||||
|
||||
$request->getPathInfo()->willReturn('/api/v1/products');
|
||||
|
||||
$requestStack->getMainRequest()->willReturn($request);
|
||||
|
||||
$normalizer->supportsNormalization('data', 'format', ['context'])->shouldBeCalled()->willReturn(true);
|
||||
|
||||
$this->supportsNormalization('data', 'format', ['context'])->shouldReturn(true);
|
||||
}
|
||||
|
||||
function it_doesnt_support_normalization_when_no_request_is_available(
|
||||
NormalizerInterface $normalizer,
|
||||
RequestStack $requestStack,
|
||||
): void {
|
||||
$this->beConstructedWith($normalizer, $requestStack, '/api/v2');
|
||||
|
||||
$requestStack->getMainRequest()->willReturn(null);
|
||||
|
||||
$normalizer->supportsNormalization('data', 'format', ['context'])->shouldNotBeCalled();
|
||||
|
||||
$this->supportsNormalization('data', 'format', ['context']);
|
||||
}
|
||||
}
|
||||
|
|
@ -36,7 +36,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -29,12 +29,3 @@ doctrine:
|
|||
entity_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
|
||||
fos_rest:
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/', priorities: ['json'], fallback_format: json, prefer_extension: true }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\CoreBundle\Controller;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
use Sylius\Bundle\OrderBundle\Controller\OrderController as BaseOrderController;
|
||||
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
||||
use Sylius\Component\Order\SyliusCartEvents;
|
||||
|
|
@ -46,7 +45,7 @@ class OrderController extends BaseOrderController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($cart));
|
||||
return $this->createRestView($configuration, $cart);
|
||||
}
|
||||
|
||||
$form = $this->resourceFormFactory->create($configuration, $cart);
|
||||
|
|
|
|||
|
|
@ -29,11 +29,13 @@ class ProductTaxonController extends ResourceController
|
|||
{
|
||||
public function updateProductTaxonsPositionsAction(Request $request): Response
|
||||
{
|
||||
$data = json_decode($request->getContent(), true);
|
||||
|
||||
$configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
|
||||
$this->validateCsrfProtection($request, $configuration);
|
||||
$this->validateCsrfProtection($data['_csrf_token'] ?? [], $configuration);
|
||||
$this->isGrantedOr403($configuration, ResourceActions::UPDATE);
|
||||
|
||||
$productTaxonsPositions = $request->request->all('productTaxons');
|
||||
$productTaxonsPositions = $data['productTaxons'] ?? [];
|
||||
$productTaxonsPositions = array_combine(
|
||||
array_column($productTaxonsPositions, 'id'),
|
||||
array_column($productTaxonsPositions, 'position'),
|
||||
|
|
@ -98,9 +100,9 @@ class ProductTaxonController extends ResourceController
|
|||
return $this->repository->count(['taxon' => $productTaxon->getTaxon()]) - 1;
|
||||
}
|
||||
|
||||
private function validateCsrfProtection(Request $request, RequestConfiguration $configuration): void
|
||||
private function validateCsrfProtection(string $csrfToken, RequestConfiguration $configuration): void
|
||||
{
|
||||
if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid('update-product-taxon-position', (string) $request->request->get('_csrf_token'))) {
|
||||
if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid('update-product-taxon-position', $csrfToken)) {
|
||||
throw new HttpException(Response::HTTP_FORBIDDEN, 'Invalid csrf token.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,11 +28,13 @@ class ProductVariantController extends ResourceController
|
|||
*/
|
||||
public function updatePositionsAction(Request $request): Response
|
||||
{
|
||||
$data = json_decode($request->getContent(), true);
|
||||
|
||||
$configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
|
||||
$this->isGrantedOr403($configuration, ResourceActions::UPDATE);
|
||||
$productVariantsToUpdate = $request->request->all('productVariants');
|
||||
$productVariantsToUpdate = $data['productVariants'] ?? [];
|
||||
|
||||
if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid('update-product-variant-position', (string) $request->request->get('_csrf_token'))) {
|
||||
if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid('update-product-variant-position', $data['_csrf_token'] ?? '')) {
|
||||
throw new HttpException(Response::HTTP_FORBIDDEN, 'Invalid csrf token.');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofphp/proxy-manager-lts": "^1.0.7",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\OrderBundle\Controller;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
||||
use Sylius\Component\Order\Context\CartContextInterface;
|
||||
use Sylius\Component\Order\Model\OrderInterface;
|
||||
|
|
@ -47,7 +46,7 @@ class OrderController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($cart));
|
||||
return $this->createRestView($configuration, $cart);
|
||||
}
|
||||
|
||||
$form = $this->resourceFormFactory->create($configuration, $cart);
|
||||
|
|
@ -94,7 +93,7 @@ class OrderController extends ResourceController
|
|||
$this->manager->flush();
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create(null, Response::HTTP_NO_CONTENT));
|
||||
return $this->createRestView($configuration, null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
$this->flashHelper->addSuccessFlash($configuration, ResourceActions::UPDATE, $resource);
|
||||
|
|
@ -108,7 +107,7 @@ class OrderController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($form, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $form, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
|
|
@ -122,7 +121,7 @@ class OrderController extends ResourceController
|
|||
);
|
||||
}
|
||||
|
||||
protected function addFlash(string $type, $message): void
|
||||
protected function addFlash(string $type, mixed $message): void
|
||||
{
|
||||
/** @var SessionInterface $session */
|
||||
$session = $this->get('request_stack')->getSession();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -29,12 +29,3 @@ doctrine:
|
|||
entity_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
|
||||
fos_rest:
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/', priorities: ['json'], fallback_format: json, prefer_extension: true }
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"mockery/mockery": "^1.4",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\PromotionBundle\Controller;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
use Sylius\Bundle\PromotionBundle\Form\Type\PromotionCouponGeneratorInstructionType;
|
||||
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
||||
use Sylius\Component\Promotion\Generator\PromotionCouponGeneratorInterface;
|
||||
|
|
@ -49,7 +48,7 @@ class PromotionCouponController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($form));
|
||||
return $this->createRestView($configuration, $form);
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ class AppKernel extends Kernel
|
|||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -30,15 +30,6 @@ doctrine:
|
|||
default:
|
||||
auto_mapping: true
|
||||
|
||||
fos_rest:
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/', priorities: ['json'], fallback_format: json, prefer_extension: true }
|
||||
|
||||
security:
|
||||
providers:
|
||||
sylius_admin_user_provider:
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -29,12 +29,3 @@ doctrine:
|
|||
entity_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
|
||||
fos_rest:
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/', priorities: ['json'], fallback_format: json, prefer_extension: true }
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@ sylius_shop_login_check:
|
|||
methods: [POST]
|
||||
defaults:
|
||||
_controller: sylius.controller.security::checkAction
|
||||
|
||||
sylius_shop_json_login_check:
|
||||
path: /json-login-check
|
||||
methods: [POST]
|
||||
defaults:
|
||||
_controller: sylius.controller.security::jsonLoginCheck
|
||||
|
||||
sylius_shop_logout:
|
||||
path: /logout
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% set form = hookable_metadata.context.form %}
|
||||
|
||||
{% if form.customer is defined %}
|
||||
<div {{ stimulus_controller('api-login', {url: path('sylius_shop_login_check')} ) }}>
|
||||
<div {{ stimulus_controller('api-login', {url: path('sylius_shop_json_login_check')} ) }}>
|
||||
<div class="d-none">
|
||||
<div class="alert alert-danger" data-api-login-target="errorPrototype"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -29,12 +29,3 @@ doctrine:
|
|||
entity_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
|
||||
fos_rest:
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/', priorities: ['json'], fallback_format: json, prefer_extension: true }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AppKernel extends Kernel
|
|||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"doctrine/orm": "^2.13",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
|
|
|
|||
|
|
@ -14,18 +14,19 @@ declare(strict_types=1);
|
|||
namespace Sylius\Bundle\UserBundle\Controller;
|
||||
|
||||
use Sylius\Bundle\UserBundle\Form\Type\UserLoginType;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||
use Twig\Environment;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
class SecurityController extends AbstractController
|
||||
readonly class SecurityController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly AuthenticationUtils $authenticationUtils,
|
||||
private readonly FormFactoryInterface $formFactory,
|
||||
private AuthenticationUtils $authenticationUtils,
|
||||
private FormFactoryInterface $formFactory,
|
||||
private Environment $twig,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -46,11 +47,16 @@ class SecurityController extends AbstractController
|
|||
|
||||
$form = $this->formFactory->createNamed('', $formType);
|
||||
|
||||
return $this->render($template, [
|
||||
'form' => $form->createView(),
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
]);
|
||||
return new Response(
|
||||
$this->twig->render(
|
||||
$template,
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -61,6 +67,14 @@ class SecurityController extends AbstractController
|
|||
throw new \RuntimeException('You must configure the check path to be handled by the firewall.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Login check action. This action should never be called.
|
||||
*/
|
||||
public function jsonLoginCheck(): Response
|
||||
{
|
||||
throw new \RuntimeException('You must configure the check path to be handled by the firewall.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout action. This action should never be called.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\UserBundle\Controller;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration;
|
||||
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
||||
use Sylius\Bundle\UserBundle\Form\Model\ChangePassword;
|
||||
|
|
@ -56,7 +55,7 @@ class UserController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($form, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $form, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
return new Response($this->container->get('twig')->render(
|
||||
|
|
@ -105,7 +104,7 @@ class UserController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($form, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $form, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
return new Response($this->container->get('twig')->render(
|
||||
|
|
@ -128,7 +127,7 @@ class UserController extends ResourceController
|
|||
$user = $this->repository->findOneBy(['emailVerificationToken' => $token]);
|
||||
if (null === $user) {
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($configuration, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $configuration, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$this->addTranslatedFlash('error', 'sylius.user.verify_email_by_invalid_token');
|
||||
|
|
@ -148,7 +147,7 @@ class UserController extends ResourceController
|
|||
$eventDispatcher->dispatch(new GenericEvent($user), UserEvents::POST_EMAIL_VERIFICATION);
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($user));
|
||||
return $this->createRestView($configuration, $user);
|
||||
}
|
||||
|
||||
$flashMessage = $this->getSyliusAttribute($request, 'flash', 'sylius.user.verify_email');
|
||||
|
|
@ -165,7 +164,7 @@ class UserController extends ResourceController
|
|||
$user = $this->getUser();
|
||||
if (null === $user) {
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($configuration, Response::HTTP_UNAUTHORIZED));
|
||||
return $this->createRestView($configuration, $configuration, Response::HTTP_UNAUTHORIZED);
|
||||
}
|
||||
|
||||
$this->addTranslatedFlash('notice', 'sylius.user.verify_no_user');
|
||||
|
|
@ -175,7 +174,7 @@ class UserController extends ResourceController
|
|||
|
||||
if (null !== $user->getVerifiedAt()) {
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($configuration, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $configuration, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$this->addTranslatedFlash('notice', 'sylius.user.verify_verified_email');
|
||||
|
|
@ -193,7 +192,7 @@ class UserController extends ResourceController
|
|||
$eventDispatcher->dispatch(new GenericEvent($user), UserEvents::REQUEST_VERIFICATION_TOKEN);
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create(null, Response::HTTP_NO_CONTENT));
|
||||
return $this->createRestView($configuration, null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
$this->addTranslatedFlash('success', 'sylius.user.verify_email_request');
|
||||
|
|
@ -225,7 +224,7 @@ class UserController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create(null, Response::HTTP_NO_CONTENT));
|
||||
$this->createRestView($configuration, null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
$this->addTranslatedFlash('success', 'sylius.user.reset_password_request');
|
||||
|
|
@ -244,7 +243,7 @@ class UserController extends ResourceController
|
|||
}
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($form, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $form, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
return new Response($this->container->get('twig')->render(
|
||||
|
|
@ -284,7 +283,7 @@ class UserController extends ResourceController
|
|||
$this->manager->flush();
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create($user, Response::HTTP_BAD_REQUEST));
|
||||
return $this->createRestView($configuration, $user, Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$this->addTranslatedFlash('error', 'sylius.user.expire_password_reset_token');
|
||||
|
|
@ -331,7 +330,7 @@ class UserController extends ResourceController
|
|||
$dispatcher->dispatch(new GenericEvent($user), UserEvents::POST_PASSWORD_RESET);
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create(null, Response::HTTP_NO_CONTENT));
|
||||
return $this->createRestView($configuration, null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
$redirectRouteName = $this->getSyliusAttribute($request, 'redirect', null);
|
||||
|
|
@ -357,7 +356,7 @@ class UserController extends ResourceController
|
|||
$dispatcher->dispatch(new GenericEvent($user), UserEvents::POST_PASSWORD_CHANGE);
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
return $this->viewHandler->handle($configuration, View::create(null, Response::HTTP_NO_CONTENT));
|
||||
return $this->createRestView($configuration, null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
$redirectRouteName = $this->getSyliusAttribute($request, 'redirect', null);
|
||||
|
|
@ -381,7 +380,7 @@ class UserController extends ResourceController
|
|||
return null;
|
||||
}
|
||||
|
||||
private function getSyliusAttribute(Request $request, string $attribute, $default = null)
|
||||
private function getSyliusAttribute(Request $request, string $attribute, $default = null): mixed
|
||||
{
|
||||
$attributes = $request->attributes->get('_sylius', []);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,9 +47,7 @@
|
|||
<service id="sylius.controller.user_security" class="Sylius\Bundle\UserBundle\Controller\SecurityController">
|
||||
<argument type="service" id="security.authentication_utils" />
|
||||
<argument type="service" id="form.factory" />
|
||||
<call method="setContainer">
|
||||
<argument type="service" id="service_container" />
|
||||
</call>
|
||||
<argument type="service" id="twig" />
|
||||
</service>
|
||||
|
||||
<!-- Utils -->
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ class AppKernel extends Kernel
|
|||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
||||
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
|
|
|
|||
|
|
@ -34,15 +34,6 @@ doctrine:
|
|||
default:
|
||||
auto_mapping: true
|
||||
|
||||
fos_rest:
|
||||
view:
|
||||
formats:
|
||||
json: true
|
||||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/', priorities: ['json'], fallback_format: json, prefer_extension: true }
|
||||
|
||||
security:
|
||||
providers:
|
||||
sylius_admin_user_provider:
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.3.1",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"hwi/oauth-bundle": "^1.1 || ^2.0@beta",
|
||||
"jms/serializer-bundle": "^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/intl": "^6.4.0 || ^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"php": "^8.2",
|
||||
"doctrine/collections": "^1.6",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/validator": "^6.4.0 || ^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/form": "^6.4.1 || ^7.1",
|
||||
"symfony/http-foundation": "^6.4.0 || ^7.1",
|
||||
"laminas/laminas-stdlib": "^3.3.1"
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
"sylius/product": "^2.0",
|
||||
"sylius/promotion": "^2.0",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"sylius/review": "^2.0",
|
||||
"sylius/shipping": "^2.0",
|
||||
"sylius/state-machine-abstraction": "^2.0",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/intl": "^6.4.0 || ^7.1",
|
||||
"laminas/laminas-stdlib": "^3.3.1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"doctrine/collections": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha"
|
||||
"sylius/resource": "^1.12@alpha"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^7.2"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"webmozart/assert": "^1.9"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/intl": "^6.4.0 || ^7.1",
|
||||
"laminas/laminas-stdlib": "^3.3.1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"webmozart/assert": "^1.9",
|
||||
"laminas/laminas-stdlib": "^3.3.1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha"
|
||||
"sylius/resource": "^1.12@alpha"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^7.2"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
"php": "^8.2",
|
||||
"behat/transliterator": "^1.3",
|
||||
"sylius/attribute": "^2.0",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/polyfill-iconv": "^1.28",
|
||||
"webmozart/assert": "^1.9"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"php": "^8.2",
|
||||
"doctrine/orm": "^2.13",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha"
|
||||
"sylius/resource": "^1.12@alpha"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^7.2"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"doctrine/collections": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha"
|
||||
"sylius/resource": "^1.12@alpha"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^7.2"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/options-resolver": "^6.4.0 || ^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"sylius/registry": "^1.6",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/clock": "^6.4.0 || ^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"behat/transliterator": "^1.3",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"webmozart/assert": "^1.9"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
"php": "^8.2",
|
||||
"doctrine/collections": "^1.6",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"sylius/resource": "^1.11 || ^1.12@alpha",
|
||||
"sylius/resource": "^1.12@alpha",
|
||||
"symfony/polyfill-mbstring": "^1.28",
|
||||
"symfony/security-core": "^6.4.0 || ^7.1"
|
||||
},
|
||||
|
|
|
|||
12
symfony.lock
12
symfony.lock
|
|
@ -173,15 +173,6 @@
|
|||
"friendsofphp/proxy-manager-lts": {
|
||||
"version": "v1.0.2"
|
||||
},
|
||||
"friendsofsymfony/rest-bundle": {
|
||||
"version": "2.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "master",
|
||||
"version": "2.2",
|
||||
"ref": "cad41ef93d6150067ae2bb3c7fd729492dff6f0a"
|
||||
}
|
||||
},
|
||||
"gedmo/doctrine-extensions": {
|
||||
"version": "v2.4.42"
|
||||
},
|
||||
|
|
@ -985,9 +976,6 @@
|
|||
"webmozart/assert": {
|
||||
"version": "1.9.1"
|
||||
},
|
||||
"willdurand/jsonp-callback-validator": {
|
||||
"version": "v1.1.0"
|
||||
},
|
||||
"willdurand/negotiation": {
|
||||
"version": "v2.3.1"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue