From 597db95a1e5a3896e28aa3454c008a6dda4ce3e9 Mon Sep 17 00:00:00 2001 From: Magdalena Sadowska Date: Thu, 14 Mar 2019 15:32:05 +0100 Subject: [PATCH 1/7] [Docs] Roadmap --- docs/_themes/sylius_rtd_theme/layout.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_themes/sylius_rtd_theme/layout.html b/docs/_themes/sylius_rtd_theme/layout.html index 37fae958245..cf33ed22909 100644 --- a/docs/_themes/sylius_rtd_theme/layout.html +++ b/docs/_themes/sylius_rtd_theme/layout.html @@ -96,6 +96,7 @@
{{ toc }}
{% endif %} +
🔔 Roadmap
  From 41891aa49cdf20851d5fb19df61bd11ab1f12ce2 Mon Sep 17 00:00:00 2001 From: Magdalena Sadowska Date: Thu, 14 Mar 2019 15:38:57 +0100 Subject: [PATCH 2/7] [Docs] Roadmap in the Book --- docs/book/introduction/introduction.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/book/introduction/introduction.rst b/docs/book/introduction/introduction.rst index fc588cfca15..35e70d9dce6 100644 --- a/docs/book/introduction/introduction.rst +++ b/docs/book/introduction/introduction.rst @@ -45,6 +45,12 @@ E-Commerce Components for PHP If you use a different framework than Symfony, you are welcome to use Sylius components, which will make it much easier to implement a webshop with any PHP application and project. They provide you with default models, services and logic for all aspects of e-commerce, completely separated and ready to use. +Roadmap +------- + +Are you wondering about Sylius plans for the next releases? If so then you should follow our `Roadmap `_ on Github. +There you can contribute by conversation and votes on the most desired features and improvements. + Final Thoughts -------------- From 8aa1bb179e24958dc218c10b7f60990e1a738663 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 7 Nov 2018 00:30:03 +0100 Subject: [PATCH 3/7] [cs] remove unnecesary variables and if conditions --- .../ProvinceAddressConstraintValidator.php | 7 +------ .../FakeChannel/FakeChannelPersisterSpec.php | 10 +--------- .../Core/Payment/Provider/OrderPaymentProvider.php | 11 ++--------- src/Sylius/Component/Order/Model/Adjustment.php | 14 +------------- .../PromotionUsageLimitEligibilityChecker.php | 7 +------ .../Resource/Repository/InMemoryRepository.php | 4 +--- 6 files changed, 7 insertions(+), 46 deletions(-) diff --git a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php index c2da8a8c867..548e8afc04b 100644 --- a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php +++ b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php @@ -87,11 +87,6 @@ protected function isProvinceValid(AddressInterface $address): bool if (null === $province) { return false; } - - if ($country->hasProvince($province)) { - return true; - } - - return false; + return $country->hasProvince($province); } } diff --git a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php index 6e9e856eaa2..c7ef8c9cb0a 100644 --- a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php +++ b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php @@ -72,15 +72,7 @@ function it_persists_fake_channel_codes_in_a_cookie( $response->headers = $responseHeaderBag; $responseHeaderBag ->setCookie(Argument::that(function (Cookie $cookie) { - if ($cookie->getName() !== '_channel_code') { - return false; - } - - if ($cookie->getValue() !== 'fake_channel_code') { - return false; - } - - return true; + return $cookie->getName() === '_channel_code' && $cookie->getValue() == 'fake_channel_code'; })) ->shouldBeCalled() ; diff --git a/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php b/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php index 5b65caaf32b..41d2c360a06 100644 --- a/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php +++ b/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php @@ -76,22 +76,15 @@ private function getLastPayment(OrderInterface $order): ?PaymentInterface if (null !== $lastCancelledPayment) { return $lastCancelledPayment; } - - $lastFailedPayment = $order->getLastPayment(PaymentInterface::STATE_FAILED); - if (null !== $lastFailedPayment) { - return $lastFailedPayment; - } - - return null; + return $order->getLastPayment(PaymentInterface::STATE_FAILED); } private function getDefaultPaymentMethod(PaymentInterface $payment, OrderInterface $order): ?PaymentMethodInterface { try { $payment->setOrder($order); - $paymentMethod = $this->defaultPaymentMethodResolver->getDefaultPaymentMethod($payment); - return $paymentMethod; + return $this->defaultPaymentMethodResolver->getDefaultPaymentMethod($payment); } catch (UnresolvedDefaultPaymentMethodException $exception) { return null; } diff --git a/src/Sylius/Component/Order/Model/Adjustment.php b/src/Sylius/Component/Order/Model/Adjustment.php index e0dab26146b..f132f028949 100644 --- a/src/Sylius/Component/Order/Model/Adjustment.php +++ b/src/Sylius/Component/Order/Model/Adjustment.php @@ -67,19 +67,7 @@ public function getId() */ public function getAdjustable(): ?AdjustableInterface { - if (null !== $this->order) { - return $this->order; - } - - if (null !== $this->orderItem) { - return $this->orderItem; - } - - if (null !== $this->orderItemUnit) { - return $this->orderItemUnit; - } - - return null; + return $this->order ?? $this->orderItem ?? $this->orderItemUnit; } /** diff --git a/src/Sylius/Component/Promotion/Checker/Eligibility/PromotionUsageLimitEligibilityChecker.php b/src/Sylius/Component/Promotion/Checker/Eligibility/PromotionUsageLimitEligibilityChecker.php index 04e80ff3f19..29e3a8b4947 100644 --- a/src/Sylius/Component/Promotion/Checker/Eligibility/PromotionUsageLimitEligibilityChecker.php +++ b/src/Sylius/Component/Promotion/Checker/Eligibility/PromotionUsageLimitEligibilityChecker.php @@ -26,11 +26,6 @@ public function isEligible(PromotionSubjectInterface $promotionSubject, Promotio if (null === $usageLimit = $promotion->getUsageLimit()) { return true; } - - if ($promotion->getUsed() < $usageLimit) { - return true; - } - - return false; + return $promotion->getUsed() < $usageLimit; } } diff --git a/src/Sylius/Component/Resource/Repository/InMemoryRepository.php b/src/Sylius/Component/Resource/Repository/InMemoryRepository.php index 0599c9f0e80..3738a7fa123 100644 --- a/src/Sylius/Component/Resource/Repository/InMemoryRepository.php +++ b/src/Sylius/Component/Resource/Repository/InMemoryRepository.php @@ -115,9 +115,7 @@ public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $ $results = $this->applyOrder($results, $orderBy); } - $results = array_slice($results, $offset ?? 0, $limit); - - return $results; + return array_slice($results, $offset ?? 0, $limit); } /** From 5ac384cf9cbf1b54ea3a6c39ccd32ef63050936d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Thu, 14 Mar 2019 19:27:23 +0100 Subject: [PATCH 4/7] Update src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php Co-Authored-By: TomasVotruba --- .../spec/Context/FakeChannel/FakeChannelPersisterSpec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php index c7ef8c9cb0a..bc5755fba4a 100644 --- a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php +++ b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php @@ -72,7 +72,7 @@ function it_persists_fake_channel_codes_in_a_cookie( $response->headers = $responseHeaderBag; $responseHeaderBag ->setCookie(Argument::that(function (Cookie $cookie) { - return $cookie->getName() === '_channel_code' && $cookie->getValue() == 'fake_channel_code'; + return $cookie->getName() === '_channel_code' && $cookie->getValue() === 'fake_channel_code'; })) ->shouldBeCalled() ; From d0c03c21d1655c3666fcb42dcbc0a1b6283075f4 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Fri, 15 Mar 2019 12:45:12 +0100 Subject: [PATCH 5/7] Make PR template great again --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8da398dd32b..0613af17825 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,7 +9,7 @@ | License | MIT From bda78e0fe3c57a2faab6dadc502395569139f229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs?= Date: Sat, 16 Mar 2019 20:05:04 +0000 Subject: [PATCH 6/7] Updated config file location --- docs/cookbook/configuration/disabling-admin-notifications.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cookbook/configuration/disabling-admin-notifications.rst b/docs/cookbook/configuration/disabling-admin-notifications.rst index 210fcc2c25b..a708e8702db 100644 --- a/docs/cookbook/configuration/disabling-admin-notifications.rst +++ b/docs/cookbook/configuration/disabling-admin-notifications.rst @@ -9,7 +9,7 @@ This guide will instruct you how to disable this check & notification. How to disable notifications? ----------------------------- -Add the following configuration to ``app/config/config.yml``. +Add the following configuration to ``app/config/packages/_sylius.yaml``. .. code-block:: yaml From bc310628cc1c239cf4e54a737a5d389a20404ea4 Mon Sep 17 00:00:00 2001 From: Dmitry Chornobyl Date: Sun, 17 Mar 2019 17:11:32 +0200 Subject: [PATCH 7/7] [Resource] [Grid] deprecation warning fixed in service declaration --- .../config/services/integrations/doctrine/phpcr-odm.xml | 2 +- .../config/services/integrations/doctrine/mongodb-odm.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml b/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml index dbf4c63c24e..9abeb194633 100644 --- a/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml +++ b/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml @@ -18,7 +18,7 @@ - The "sylius.grid_driver.doctrine.phpcrodm" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. + The "%service_id%" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. diff --git a/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml b/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml index 90caff7b37c..00358412272 100644 --- a/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml +++ b/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml @@ -22,13 +22,13 @@ - The "sylius.event_subscriber.odm_mapped_super_class" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. + The "%service_id%" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. - The "sylius.event_subscriber.odm_repository_class" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. + The "%service_id%" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.