From 4ebb4023a0ada9cdae8dd1b0ca85db96494d6c0f Mon Sep 17 00:00:00 2001 From: "Dmitriy.trt" Date: Tue, 31 Jan 2017 14:55:56 +0400 Subject: [PATCH 1/4] Don't fail on billing or shipping address not set Both billing and shipping addresses are nullable, but this template doesn't expect addresses not set. --- .../views/Order/Show/_addresses.html.twig | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Sylius/Bundle/AdminBundle/Resources/views/Order/Show/_addresses.html.twig b/src/Sylius/Bundle/AdminBundle/Resources/views/Order/Show/_addresses.html.twig index 434a139d835..7fd66e9eae4 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/views/Order/Show/_addresses.html.twig +++ b/src/Sylius/Bundle/AdminBundle/Resources/views/Order/Show/_addresses.html.twig @@ -1,14 +1,18 @@ -

- {{ 'sylius.ui.shipping_address'|trans }} -

-
- {% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.shippingAddress} %} -
-

+{% if order.shippingAddress is not null %} +

+ {{ 'sylius.ui.shipping_address'|trans }} +

+
+ {% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.shippingAddress} %} +
+{% endif %} +

{{ 'sylius.ui.billing_address'|trans }}

- {% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.billingAddress} %} + {% if order.billingAddress is not null %} + {% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.billingAddress} %} + {% endif %} {% endif %} -

- {{ 'sylius.ui.billing_address'|trans }} -

-
- {% if order.billingAddress is not null %} +{% if order.billingAddress is not null %} +

+ {{ 'sylius.ui.billing_address'|trans }} +

+
{% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.billingAddress} %} - {% endif %} - +{% endif %} + diff --git a/src/Sylius/Bundle/UiBundle/Resources/translations/messages.en.yml b/src/Sylius/Bundle/UiBundle/Resources/translations/messages.en.yml index f81ac99b31e..670d74fe1f9 100644 --- a/src/Sylius/Bundle/UiBundle/Resources/translations/messages.en.yml +++ b/src/Sylius/Bundle/UiBundle/Resources/translations/messages.en.yml @@ -246,6 +246,7 @@ sylius: display: 'Display' edit: 'Edit' edit_admin_user: 'Edit administrator' + edit_addresses: 'Edit addresses' edit_association_type: 'Edit Association type' edit_channel: 'Edit channel' edit_country: 'Edit country' From 1552fe2a1b6ded86f0ef3114d639b71d4be2404f Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Tue, 12 Feb 2019 09:56:07 +0100 Subject: [PATCH 3/4] Test order with no shipping address --- ...ing_order_without_shipping_address.feature | 25 +++++++++++++++++++ .../Behat/Context/Setup/ProductContext.php | 13 ++++++++++ .../Ui/Admin/ManagingOrdersContext.php | 8 ++++++ .../Behat/Page/Admin/Order/ShowPage.php | 11 ++++++++ .../Page/Admin/Order/ShowPageInterface.php | 2 ++ 5 files changed, 59 insertions(+) create mode 100644 features/order/managing_orders/seeing_order_without_shipping_address.feature diff --git a/features/order/managing_orders/seeing_order_without_shipping_address.feature b/features/order/managing_orders/seeing_order_without_shipping_address.feature new file mode 100644 index 00000000000..d3beac62d86 --- /dev/null +++ b/features/order/managing_orders/seeing_order_without_shipping_address.feature @@ -0,0 +1,25 @@ +@managing_orders +Feature: Seeing an order without shipping address + In order to see details of a specific order which does not have to be shipped + As an Administrator + I want to be able to view basic information about an order + + Background: + Given the store operates on a single channel in "United States" + And the store has a product "Angel E-book" + And this product does not require shipping + And the store ships everywhere for free + And the store allows paying with "Cash on Delivery" + And there is a customer "lucy@teamlucifer.com" that placed an order "#00000666" + And the customer bought a single "Angel E-book" + And the customer set the billing address as "Mike Ross", "350 5th Ave", "10118", "New York", "United States" + And the customer chose "Cash on Delivery" payment + And I am logged in as an administrator + + @ui + Scenario: Seeing basic information about an order + When I view the summary of the order "#00000666" + Then it should have been placed by the customer "lucy@teamlucifer.com" + And it should be billed to "Mike Ross", "350 5th Ave", "10118", "New York", "United States" + And it should be paid with "Cash on Delivery" + And it should have no shipping address set diff --git a/src/Sylius/Behat/Context/Setup/ProductContext.php b/src/Sylius/Behat/Context/Setup/ProductContext.php index 647e11b9787..068e504f603 100644 --- a/src/Sylius/Behat/Context/Setup/ProductContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductContext.php @@ -741,6 +741,19 @@ public function theProductWasRenamedTo(ProductInterface $product, string $produc $this->objectManager->flush(); } + /** + * @Given /^(this product) does not require shipping$/ + */ + public function thisProductDoesNotRequireShipping(ProductInterface $product): void + { + /** @var ProductVariantInterface $variant */ + foreach ($product->getVariants() as $variant) { + $variant->setShippingRequired(false); + } + + $this->objectManager->flush(); + } + private function getPriceFromString(string $price): int { return (int) round((float) str_replace(['€', '£', '$'], '', $price) * 100, 2); diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php index 6eec36f3f1c..3712ff42b94 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php @@ -247,6 +247,14 @@ public function itShouldBeBilledTo( Assert::true($this->showPage->hasBillingAddress($customerName, $street, $postcode, $city, $countryName)); } + /** + * @Then it should have no shipping address set + */ + public function itShouldHaveNoShippingAddressSet(): void + { + Assert::false($this->showPage->hasShippingAddressVisible()); + } + /** * @Then it should be shipped via the :shippingMethodName shipping method */ diff --git a/src/Sylius/Behat/Page/Admin/Order/ShowPage.php b/src/Sylius/Behat/Page/Admin/Order/ShowPage.php index 50844b6f2e3..9de9cc41c45 100644 --- a/src/Sylius/Behat/Page/Admin/Order/ShowPage.php +++ b/src/Sylius/Behat/Page/Admin/Order/ShowPage.php @@ -51,6 +51,17 @@ public function hasShippingAddress(string $customerName, string $street, string return $this->hasAddress($shippingAddressText, $customerName, $street, $postcode, $city, $countryName); } + public function hasShippingAddressVisible(): bool + { + try { + $this->getElement('shipping_address'); + } catch (ElementNotFoundException $exception) { + return false; + } + + return true; + } + public function hasBillingAddress(string $customerName, string $street, string $postcode, string $city, string $countryName): bool { $billingAddressText = $this->getElement('billing_address')->getText(); diff --git a/src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php b/src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php index e9bd32ebd42..80d03c8bc3c 100644 --- a/src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php @@ -22,6 +22,8 @@ public function hasCustomer(string $customerName): bool; public function hasShippingAddress(string $customerName, string $street, string $postcode, string $city, string $countryName): bool; + public function hasShippingAddressVisible(): bool; + public function hasBillingAddress(string $customerName, string $street, string $postcode, string $city, string $countryName): bool; public function hasShipment(string $shippingMethodName): bool; From bed796b4307b556160794956f7eb03d5a318d028 Mon Sep 17 00:00:00 2001 From: Kamil Kokot Date: Tue, 12 Feb 2019 19:13:53 +0100 Subject: [PATCH 4/4] Improve release process docs --- .../organization/release-process.rst | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/docs/contributing/organization/release-process.rst b/docs/contributing/organization/release-process.rst index 80db3906f16..b942ea44612 100644 --- a/docs/contributing/organization/release-process.rst +++ b/docs/contributing/organization/release-process.rst @@ -7,29 +7,26 @@ code & documentation hosted on the main ``Sylius/Sylius`` `Git repository`_). Sylius manages its releases through a *time-based model* and follows the `Semantic Versioning`_ strategy: -* A new Sylius minor version (e.g. 1.1, 1.2, etc.) comes out every *four months* -* A new Sylius patch version (e.g. 1.0.1, 1.0.2, etc.) comes out every *two weeks* +* A new Sylius minor version (e.g. 1.1, 1.2, etc.) comes out *at least every four months*. +* A new Sylius patch version (e.g. 1.0.1, 1.0.2, etc.) comes out *at least every three weeks*. Development ----------- -The full development period for any minor version lasts four months and -is divided into two phases: +The full development period for any minor version is divided into two phases: -* **Development**: *Three months* to add new features and to enhance existing - ones; +* **Development**: *First 5/6 of the time intended for the release* to add new features and to enhance existing ones. -* **Stabilization**: *One month* to fix bugs, prepare the release, and wait - for the whole Sylius ecosystem (third-party libraries, plugins, and - projects using Sylius) to catch up. +* **Stabilization**: *Last 1/6 of the time intended for the release* to fix bugs, prepare the release, and wait + for the whole Sylius ecosystem (third-party libraries, plugins, and projects using Sylius) to catch up. -During the development period, any new feature can be reverted if it won't be -finished in time or if it won't be stable enough to be included in the coming release. +During both periods, any new feature can be reverted if it won't be +finished in time or won't be stable enough to be included in the coming release. Maintenance ----------- -Each Sylius version is maintained for a fixed period of time. +Each minor Sylius version is maintained for a fixed period of time after its release. This maintenance is divided into: * *Bug fixes and security fixes*: During this period, being *eight months* long, @@ -40,6 +37,35 @@ This maintenance is divided into: only security related issues can be fixed. The end of this period is referenced as being the *end of life* of a release. +Past Releases +------------- + ++---------+--------------------+--------------------+--------------------+-----------------------+ +| Version | Release date | End of maintenance | End of life | Status | ++=========+====================+====================+====================+=======================+ +| 1.0 | Sep 13, 2017 | May 13, 2018 | Jan 13, 2019 | Not supported | ++---------+--------------------+--------------------+--------------------+-----------------------+ +| 1.1 | Feb 12, 2018 | Oct 12, 2018 | Jun 12, 2019 | Security support only | ++---------+--------------------+--------------------+--------------------+-----------------------+ +| 1.2 | Jun 13, 2018 | Feb 13, 2019 | Oct 13, 2019 | Security support only | ++---------+--------------------+--------------------+--------------------+-----------------------+ +| 1.3 | Oct 1, 2018 | Jun 1, 2019 | Feb 1, 2020 | Fully supported | ++---------+--------------------+--------------------+--------------------+-----------------------+ +| 1.4 | Feb 4, 2019 | Oct 4, 2019 | Jun 4, 2020 | Fully supported | ++---------+--------------------+--------------------+--------------------+-----------------------+ + +Future Releases +--------------- + ++---------+----------------------+------------------------+--------------------+ +| Version | Development starts | Stabilization starts | Release date | ++=========+======================+========================+====================+ +| 1.5 | Early Feb 2019 | Mid Apr 2019 | Late Apr 2019 | ++---------+----------------------+------------------------+--------------------+ +| 1.6 | Early May 2019 | Mid Aug 2019 | Late Aug 2019 | ++---------+----------------------+------------------------+--------------------+ + + Backward Compatibility ----------------------