-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from tomkalon/OP-375
Op 375 - Upgrade Sylius version to 1.13
- Loading branch information
Showing
129 changed files
with
794 additions
and
729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,23 +21,23 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ["8.0"] | ||
php: ["8.0", "8.1", "8.2"] | ||
symfony: ["^5.4", "^6.0"] | ||
sylius: ["~1.11.0", "~1.12.0"] | ||
sylius: ["~1.12.0", "~1.13.0"] | ||
node: ["14.x"] | ||
mysql: ["5.7", "8.0"] | ||
|
||
exclude: | ||
- sylius: ~1.11.0 | ||
symfony: ^6.0 | ||
- sylius: "~1.13.0" | ||
php: "8.0" | ||
|
||
env: | ||
APP_ENV: test | ||
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}" | ||
|
||
steps: | ||
- | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- | ||
name: Setup PHP | ||
|
@@ -50,7 +50,7 @@ jobs: | |
|
||
- | ||
name: Setup Node | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ matrix.node }}" | ||
|
||
|
@@ -181,7 +181,7 @@ jobs: | |
path: etc/build/ | ||
if-no-files-found: ignore | ||
|
||
- | ||
- | ||
name: Failed build Slack notification | ||
uses: rtCamp/action-slack-notify@v2 | ||
if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -27,16 +28,16 @@ final class CatalogNormalizer implements ContextAwareNormalizerInterface, Normal | |
private $productResolver; | ||
|
||
public function __construct( | ||
ProductsInsideCatalogResolverInterface $productResolver | ||
ProductsInsideCatalogResolverInterface $productResolver, | ||
) { | ||
$this->productResolver = $productResolver; | ||
} | ||
|
||
public function normalize( | ||
$object, | ||
?string $format = null, | ||
array $context = [] | ||
):array { | ||
array $context = [], | ||
): array { | ||
Assert::isInstanceOf($object, CatalogInterface::class); | ||
Assert::keyNotExists($context, self::ALREADY_CALLED); | ||
|
||
|
@@ -56,7 +57,7 @@ public function normalize( | |
public function supportsNormalization( | ||
$data, | ||
?string $format = null, | ||
array $context = [] | ||
array $context = [], | ||
): bool { | ||
if (isset($context[self::ALREADY_CALLED])) { | ||
return false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -24,7 +25,7 @@ abstract class AbstractRule implements RuleInterface | |
protected function addRule( | ||
string $connectingRules, | ||
QueryBuilder $queryBuilder, | ||
$rule | ||
$rule, | ||
): void { | ||
switch ($connectingRules) { | ||
case RuleInterface::AND: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -31,7 +32,7 @@ public function __construct(LocaleContextInterface $localeContext) | |
public function modifyQueryBuilder( | ||
array $configuration, | ||
QueryBuilder $queryBuilder, | ||
string $connectingRules | ||
string $connectingRules, | ||
): void { | ||
/** @var AttributeInterface $attribute */ | ||
$attribute = $configuration['attribute']; | ||
|
@@ -48,7 +49,7 @@ public function modifyQueryBuilder( | |
private function buildRule( | ||
QueryBuilder $queryBuilder, | ||
AttributeInterface $attribute, | ||
string $value | ||
string $value, | ||
): Andx { | ||
$valueFieldName = self::PRODUCT_ATTRIBUTES_ALIAS . '.' . $this->getAttributeStorageFieldName($attribute->getType()); | ||
|
||
|
@@ -73,9 +74,9 @@ private function buildRule( | |
self::SELECT_ATTRIBUTE_PATTERN, | ||
$this->getValueHashKey( | ||
$attribute->getConfiguration(), | ||
$value | ||
) | ||
) | ||
$value, | ||
), | ||
), | ||
) | ||
; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -31,7 +32,7 @@ public function __construct(ChannelContextInterface $channelContext) | |
public function modifyQueryBuilder( | ||
array $configuration, | ||
QueryBuilder $queryBuilder, | ||
string $connectingRules | ||
string $connectingRules, | ||
): void { | ||
$priceParameter = $this->generateParameterName(); | ||
$channelCodeParameter = $this->generateParameterName(); | ||
|
@@ -42,7 +43,7 @@ public function modifyQueryBuilder( | |
$this->addRule( | ||
$connectingRules, | ||
$queryBuilder, | ||
$this->createFromFromOperator($configuration['operator'], $queryBuilder, $channelCodeParameter, $priceParameter) | ||
$this->createFromFromOperator($configuration['operator'], $queryBuilder, $channelCodeParameter, $priceParameter), | ||
); | ||
|
||
$queryBuilder | ||
|
@@ -60,7 +61,7 @@ private function anyVariantRule( | |
QueryBuilder $queryBuilder, | ||
string $channelCodeParameter, | ||
string $subqueryOperator, | ||
string $priceParameter | ||
string $priceParameter, | ||
): Func { | ||
$productVariantAlias = sprintf('pv%d', $this->i++); | ||
$channelPricingAlias = sprintf('cp%d', $this->i++); | ||
|
@@ -81,7 +82,7 @@ private function allVariantsRule( | |
QueryBuilder $queryBuilder, | ||
string $channelCodeParameter, | ||
string $subqueryOperator, | ||
string $priceParameter | ||
string $priceParameter, | ||
): Func { | ||
$productVariantAlias = sprintf('pv%d', $this->i++); | ||
$channelPricingAlias = sprintf('cp%d', $this->i++); | ||
|
@@ -102,7 +103,7 @@ private function createFromFromOperator( | |
string $operator, | ||
QueryBuilder $queryBuilder, | ||
string $channelCodeParameter, | ||
string $priceParameter | ||
string $priceParameter, | ||
): Func { | ||
switch ($operator) { | ||
case PriceConfigurationType::OPERATOR_ALL_GT: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -29,7 +30,7 @@ final class ProductCodeLike extends AbstractRule implements RuleInterface | |
public function modifyQueryBuilder( | ||
array $configuration, | ||
QueryBuilder $queryBuilder, | ||
string $connectingRules | ||
string $connectingRules, | ||
): void { | ||
$parameterName = $this->generateParameterName(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -27,7 +28,7 @@ public function __construct(LocaleContextInterface $localeContext) | |
public function modifyQueryBuilder( | ||
array $configuration, | ||
QueryBuilder $queryBuilder, | ||
string $connectingRules | ||
string $connectingRules, | ||
): void { | ||
$parameterName = 'configurationName' . $this->i; | ||
$locale = $this->localeContext->getLocaleCode(); | ||
|
Oops, something went wrong.