mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Upgrade ResourceBundle and GridBundle
This commit is contained in:
parent
ff7f60b5ad
commit
3e0e14003c
8 changed files with 48 additions and 23 deletions
|
|
@ -3,12 +3,6 @@
|
|||
This document explains why certain conflicts were added to `composer.json` and
|
||||
refereneces related issues.
|
||||
|
||||
- `doctrine/inflector:^1.4`:
|
||||
|
||||
Inflector 1.4 changes pluralization of `taxon` from `taxons` (used in Sylius) to `taxa`.
|
||||
|
||||
References: https://github.com/doctrine/inflector/issues/147
|
||||
|
||||
- `symfony/doctrine-bridge:4.4.16`:
|
||||
|
||||
This version of Doctrine Bridge introduces a bug that causes an issue related to `ChannelPricing` mapping.
|
||||
|
|
|
|||
|
|
@ -24,20 +24,22 @@
|
|||
"ext-fileinfo": "*",
|
||||
"ext-gd": "*",
|
||||
"api-platform/core": "^2.5",
|
||||
"babdev/pagerfanta-bundle": "^2.5",
|
||||
"behat/transliterator": "^1.3",
|
||||
"doctrine/collections": "^1.6",
|
||||
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
|
||||
"doctrine/doctrine-cache-bundle": "^1.4",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.0",
|
||||
"doctrine/inflector": "^1.4 || ^2.0",
|
||||
"doctrine/migrations": "^3.0",
|
||||
"doctrine/orm": "^2.7",
|
||||
"egulias/email-validator": "^2.1",
|
||||
"fakerphp/faker": "^1.9",
|
||||
"friendsofphp/proxy-manager-lts": "^1.0",
|
||||
"friendsofsymfony/oauth-server-bundle": "^1.6",
|
||||
"friendsofsymfony/rest-bundle": "^2.7",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"gedmo/doctrine-extensions": "^2.4.12",
|
||||
"jms/serializer-bundle": "^2.4",
|
||||
"jms/serializer-bundle": "^3.5",
|
||||
"knplabs/gaufrette": "^0.8",
|
||||
"knplabs/knp-gaufrette-bundle": "^0.7",
|
||||
"knplabs/knp-menu": "^3.1",
|
||||
|
|
@ -55,13 +57,13 @@
|
|||
"sylius-labs/association-hydrator": "^1.1",
|
||||
"sylius-labs/doctrine-migrations-extra-bundle": "^0.1.3",
|
||||
"sylius/fixtures-bundle": "^1.6.1",
|
||||
"sylius/grid": "^1.7.5",
|
||||
"sylius/grid-bundle": "^1.7.5",
|
||||
"sylius/grid": "dev-master",
|
||||
"sylius/grid-bundle": "dev-master",
|
||||
"sylius/mailer": "^1.5",
|
||||
"sylius/mailer-bundle": "^1.5",
|
||||
"sylius/registry": "^1.5",
|
||||
"sylius/resource": "1.6.*",
|
||||
"sylius/resource-bundle": "1.6.*",
|
||||
"sylius/resource": "dev-master",
|
||||
"sylius/resource-bundle": "dev-master",
|
||||
"sylius/theme-bundle": "^1.5",
|
||||
"symfony/asset": "^4.4",
|
||||
"symfony/config": "^4.4",
|
||||
|
|
@ -105,10 +107,9 @@
|
|||
"twig/intl-extra": "^2.12",
|
||||
"twig/twig": "^2.12",
|
||||
"webmozart/assert": "^1.9",
|
||||
"white-october/pagerfanta-bundle": "^1.3",
|
||||
"willdurand/hateoas": "^2.12",
|
||||
"willdurand/hateoas-bundle": "^1.4",
|
||||
"winzou/state-machine-bundle": "^0.3",
|
||||
"willdurand/hateoas": "^3.0",
|
||||
"willdurand/hateoas-bundle": "^2.0",
|
||||
"winzou/state-machine-bundle": "^0.5",
|
||||
"zendframework/zend-hydrator": "^2.4",
|
||||
"zendframework/zend-stdlib": "^3.2"
|
||||
},
|
||||
|
|
@ -155,7 +156,6 @@
|
|||
"sylius/user-bundle": "self.version"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/inflector": "^1.4",
|
||||
"symfony/doctrine-bridge": "4.4.16",
|
||||
"symfony/polyfill-mbstring": "1.22.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ return [
|
|||
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
|
||||
Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true],
|
||||
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
|
||||
WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true],
|
||||
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true],
|
||||
Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
jms_serializer:
|
||||
visitors:
|
||||
json:
|
||||
json_serialization:
|
||||
options:
|
||||
- JSON_PRETTY_PRINT
|
||||
- JSON_UNESCAPED_SLASHES
|
||||
- JSON_PRESERVE_ZERO_FRACTION
|
||||
json_deserialization:
|
||||
options:
|
||||
- JSON_PRETTY_PRINT
|
||||
- JSON_UNESCAPED_SLASHES
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
jms_serializer:
|
||||
visitors:
|
||||
xml:
|
||||
xml_serialization:
|
||||
format_output: '%kernel.debug%'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
jms_serializer:
|
||||
visitors:
|
||||
json:
|
||||
json_serialization:
|
||||
options:
|
||||
- JSON_UNESCAPED_SLASHES
|
||||
- JSON_PRESERVE_ZERO_FRACTION
|
||||
json_deserialization:
|
||||
options:
|
||||
- JSON_UNESCAPED_SLASHES
|
||||
- JSON_PRESERVE_ZERO_FRACTION
|
||||
|
|
|
|||
|
|
@ -46,9 +46,8 @@
|
|||
<tag name="kernel.event_listener" event="sylius.order_item.pre_delete" method="recalculateOrderOnDelete" />
|
||||
</service>
|
||||
|
||||
<service id="jms_serializer.serialized_name_annotation_strategy" class="%jms_serializer.serialized_name_annotation_strategy.class%" public="false">
|
||||
<service id="jms_serializer.serialized_name_annotation_strategy" class="JMS\Serializer\Naming\SerializedNameAnnotationStrategy" public="false">
|
||||
<argument type="service" id="jms_serializer.identical_property_naming_strategy" />
|
||||
</service>
|
||||
<service id="jms_serializer.identical_property_naming_strategy" class="JMS\Serializer\Naming\IdenticalPropertyNamingStrategy" public="false" />
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\CoreBundle;
|
||||
|
||||
use Doctrine\Inflector\InflectorFactory;
|
||||
use Doctrine\Inflector\Rules\Patterns;
|
||||
use Doctrine\Inflector\Rules\Ruleset;
|
||||
use Doctrine\Inflector\Rules\Substitution;
|
||||
use Doctrine\Inflector\Rules\Substitutions;
|
||||
use Doctrine\Inflector\Rules\Transformations;
|
||||
use Doctrine\Inflector\Rules\Word;
|
||||
use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\BackwardsCompatibility\ResolveShopUserTargetEntityPass;
|
||||
use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\IgnoreAnnotationsPass;
|
||||
use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\LazyCacheWarmupPass;
|
||||
|
|
@ -22,6 +29,7 @@ use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterUriBasedSectio
|
|||
use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\TranslatableEntityLocalePass;
|
||||
use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
|
||||
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
|
||||
use Sylius\Component\Resource\Metadata\Metadata;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
final class SyliusCoreBundle extends AbstractResourceBundle
|
||||
|
|
@ -33,6 +41,21 @@ final class SyliusCoreBundle extends AbstractResourceBundle
|
|||
];
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
$factory = InflectorFactory::create();
|
||||
$factory->withPluralRules(new Ruleset(
|
||||
new Transformations(),
|
||||
new Patterns(),
|
||||
new Substitutions(new Substitution(new Word('taxon'), new Word('taxons')))
|
||||
));
|
||||
$inflector = $factory->build();
|
||||
|
||||
Metadata::setInflector($inflector);
|
||||
}
|
||||
|
||||
public function build(ContainerBuilder $container): void
|
||||
{
|
||||
parent::build($container);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue