Skip to content

Commit

Permalink
Change Base product attribute, remove unnecessary configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tbuczen committed Dec 29, 2021
1 parent 0306d26 commit 798ad45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
15 changes: 6 additions & 9 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
alias: BitBag\SyliusGraphqlPlugin
```
4. In _sylius.yaml add mappings for promotion and product attribute so graphql can see them properly
4. In _sylius.yaml add mappings for product attribute and taxonomy repository so graphql can see them properly
```yml
sylius_attribute:
Expand All @@ -80,14 +80,11 @@
classes:
model: BitBag\SyliusGraphqlPlugin\Model\ProductAttributeValue
sylius_promotion:
resources:
promotion_coupon:
classes:
model: Sylius\Component\Promotion\Model\PromotionCoupon
promotion:
classes:
model: Sylius\Component\Core\Model\Promotion
sylius_taxonomy:
resources:
taxon:
classes:
repository: BitBag\SyliusGraphqlPlugin\Doctrine\Repository\TaxonRepository
```
5. Import routing in routes.yaml
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ProductAttributeValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace BitBag\SyliusGraphqlPlugin\Model;

use Sylius\Component\Attribute\Model\AttributeInterface;
use Sylius\Component\Product\Model\ProductAttributeValue as BaseAttributeValue;
use Sylius\Component\Attribute\Model\AttributeValue as BaseAttributeValue;
use Webmozart\Assert\Assert;

class ProductAttributeValue extends BaseAttributeValue
Expand Down
11 changes: 1 addition & 10 deletions tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@ sylius_attribute:
subject: Sylius\Component\Core\Model\Product
attribute_value:
classes:
model: BitBag\SyliusGraphqlPlugin\Model\ProductAttributeValue

sylius_promotion:
resources:
promotion_coupon:
classes:
model: Sylius\Component\Core\Model\PromotionCoupon
promotion:
classes:
model: Sylius\Component\Core\Model\Promotion
model: BitBag\SyliusGraphqlPlugin\Model\ProductAttributeValue

sylius_taxonomy:
resources:
Expand Down

0 comments on commit 798ad45

Please sign in to comment.