Skip to content

Commit

Permalink
Merge branch 'shop_user_is_encoder_aware' of github.com:kortwotze/Syl…
Browse files Browse the repository at this point in the history
…ius into shop_user_is_encoder_aware
  • Loading branch information
Peter Ukena committed Dec 18, 2018
2 parents 9d70a66 + 42a2562 commit da0877f
Show file tree
Hide file tree
Showing 36 changed files with 1,200 additions and 52 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG-1.2.md
@@ -1,5 +1,27 @@
# CHANGELOG FOR `1.2.X`

## v1.2.13 (2018-12-17)

#### TL;DR

- Fixed compatibility issues with Symfony 4.1.18 and 4.1.19 ([#10020](https://github.com/Sylius/Sylius/issues/10020), [#10038](https://github.com/Sylius/Sylius/issues/10038))

#### Details

- [#9837](https://github.com/Sylius/Sylius/issues/9837) Repaired shipping method fixture ([@JakobTolkemit](https://github.com/JakobTolkemit))
- [#9919](https://github.com/Sylius/Sylius/issues/9919) Fix for promotion of 100 percent with coupon ([@laurent35240](https://github.com/laurent35240))
- [#9975](https://github.com/Sylius/Sylius/issues/9975) Ignore locale request restriction for profiler and it's toolbar ([@Peteck](https://github.com/Peteck))
- [#9985](https://github.com/Sylius/Sylius/issues/9985) Add missing code and calculator mandatory field on tax rate documenation ([@Soullivaneuh](https://github.com/Soullivaneuh))
- [#9997](https://github.com/Sylius/Sylius/issues/9997) Fix typo cookbook about emails ([@Konafets](https://github.com/Konafets))
- [#9998](https://github.com/Sylius/Sylius/issues/9998) Improve the ShippingBundle doc ([@Konafets](https://github.com/Konafets))
- [#10011](https://github.com/Sylius/Sylius/issues/10011) [Kernel] Move WebServerBundle to dev/test environment ([@GSadee](https://github.com/GSadee))
- [#10012](https://github.com/Sylius/Sylius/issues/10012) Fixed incorrect Behat MinkExtension key in the docs ([@jzawadzki](https://github.com/jzawadzki))
- [#10016](https://github.com/Sylius/Sylius/issues/10016) Column 'position' cannot be null ([@zspine](https://github.com/zspine))
- [#10020](https://github.com/Sylius/Sylius/issues/10020) [HotFix][BuildFix] Use old PhpMatcherDumper to avoid trailing slash problems ([@Zales0123](https://github.com/Zales0123))
- [#10023](https://github.com/Sylius/Sylius/issues/10023) Remove billingAddress and shippingAddress ([@Konafets](https://github.com/Konafets))
- [#10029](https://github.com/Sylius/Sylius/issues/10029) Fix type annotation for $addToCartCommand ([@daniellienert](https://github.com/daniellienert))
- [#10038](https://github.com/Sylius/Sylius/issues/10038) Fix the build on 1.3 by more flexible router overriding ([@pamil](https://github.com/pamil))

## v1.2.12 (2018-11-28)

#### TL;DR
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG-1.3.md
@@ -1,5 +1,33 @@
# CHANGELOG FOR `1.3.X`

## v1.3.6 (2018-12-17)

#### TL;DR

- Fixed compatibility issues with Symfony 4.1.18 and 4.1.19 ([#10020](https://github.com/Sylius/Sylius/issues/10020), [#10038](https://github.com/Sylius/Sylius/issues/10038))

#### Details

- [#9837](https://github.com/Sylius/Sylius/issues/9837) Repaired shipping method fixture ([@JakobTolkemit](https://github.com/JakobTolkemit))
- [#9893](https://github.com/Sylius/Sylius/issues/9893) Correcting the documentation about how to customise forms templates ([@Konafets](https://github.com/Konafets))
- [#9919](https://github.com/Sylius/Sylius/issues/9919) #9858 Fix for promotion of 100 percent with coupon ([@laurent35240](https://github.com/laurent35240))
- [#9975](https://github.com/Sylius/Sylius/issues/9975) Ignore locale request restriction for profiler and it's toolbar ([@Peteck](https://github.com/Peteck))
- [#9979](https://github.com/Sylius/Sylius/issues/9979) Update book/installation docs with correct config folder ([@dakorpar](https://github.com/dakorpar))
- [#9985](https://github.com/Sylius/Sylius/issues/9985) Add missing code and calculator mandatory field on tax rate documenation ([@Soullivaneuh](https://github.com/Soullivaneuh))
- [#9995](https://github.com/Sylius/Sylius/issues/9995) Remove `AppBundle` from docs. ([@Konafets](https://github.com/Konafets))
- [#9997](https://github.com/Sylius/Sylius/issues/9997) Fix typo cookbook about emails ([@Konafets](https://github.com/Konafets))
- [#9998](https://github.com/Sylius/Sylius/issues/9998) Improve the ShippingBundle doc ([@Konafets](https://github.com/Konafets))
- [#10004](https://github.com/Sylius/Sylius/issues/10004) [Console] Add command for showing available Sylius plugins ([@GSadee](https://github.com/GSadee))
- [#10011](https://github.com/Sylius/Sylius/issues/10011) [Kernel] Move WebServerBundle to dev/test environment ([@GSadee](https://github.com/GSadee))
- [#10012](https://github.com/Sylius/Sylius/issues/10012) Fixed incorrect Behat MinkExtension key in the docs ([@jzawadzki](https://github.com/jzawadzki))
- [#10016](https://github.com/Sylius/Sylius/issues/10016) Column 'position' cannot be null ([@zspine](https://github.com/zspine))
- [#10018](https://github.com/Sylius/Sylius/issues/10018) [docs] fix config directory path and added info for orm mappings in customization/model ([@dakorpar](https://github.com/dakorpar))
- [#10020](https://github.com/Sylius/Sylius/issues/10020) [HotFix][BuildFix] Use old PhpMatcherDumper to avoid trailing slash problems ([@Zales0123](https://github.com/Zales0123))
- [#10023](https://github.com/Sylius/Sylius/issues/10023) Remove billingAddress and shippingAddress ([@Konafets](https://github.com/Konafets))
- [#10025](https://github.com/Sylius/Sylius/issues/10025) [Console] Fix RBAC url ([@GSadee](https://github.com/GSadee))
- [#10029](https://github.com/Sylius/Sylius/issues/10029) Fix type annotation for $addToCartCommand ([@daniellienert](https://github.com/daniellienert))
- [#10038](https://github.com/Sylius/Sylius/issues/10038) Fix the build on 1.3 by more flexible router overriding ([@pamil](https://github.com/pamil))

## v1.3.5 (2018-11-28)

#### TL;DR
Expand Down
4 changes: 4 additions & 0 deletions UPGRADE-2.0.md
Expand Up @@ -35,3 +35,7 @@

* `sylius.mongodb_odm.repository.class`
* `sylius.phpcr_odm.repository.class`

* The following configuration options were removed:

* `sylius.mailer.templates`
3 changes: 1 addition & 2 deletions docs/book/customers/customer_and_shopuser.rst
Expand Up @@ -28,8 +28,7 @@ As usual, use a factory. The only required field for the Customer entity is ``em
$this->container->get('sylius.repository.customer')->add($customer);
The Customer entity can of course hold other information besides an email, it can be for instance
``billingAddress`` and ``shippingAddress``, ``firstName``, ``lastName`` or ``birthday``.
The Customer entity can of course hold other information besides an email, it can be for instance ``firstName``, ``lastName`` or ``birthday``.

.. note::

Expand Down
Expand Up @@ -78,12 +78,16 @@ Finally, you have to create appropriate tax rates for each of categories.
$clothingTaxRate = $taxRateFactory->createNew();
$clothingTaxRate->setCategory($clothingTaxCategory);
$clothingTaxRate->setName('Clothing Tax');
$clothingTaxRate->setCode('CT');
$clothingTaxRate->setAmount(0.08);
$clothingTaxRate->setCalculator('default');
$foodTaxRate = $taxRateFactory->createNew();
$foodTaxRate->setCategory($foodTaxCategory);
$foodTaxRate->setName('Food');
$foodTaxRate->setCode('F');
$foodTaxRate->setAmount(0.12);
$foodTaxRate->setCalculator('default');
$taxRateManager->persist($clothingTaxRate);
$taxRateManager->persist($foodTaxRate);
Expand Down
Expand Up @@ -63,6 +63,7 @@ Configure doctrine extensions which are used in the taxonomy bundle:
default:
tree: true
sluggable: true
sortable: true
Updating database schema
------------------------
Expand Down
74 changes: 50 additions & 24 deletions docs/components_and_bundles/components/Shipping/basic_usage.rst
Expand Up @@ -9,6 +9,8 @@ In all examples is used an exemplary class implementing **ShippableInterface**,
<?php
declare(strict_types=1);
use Sylius\Component\Shipping\Model\ShippableInterface;
use Sylius\Component\Shipping\Model\ShippingCategoryInterface;
Expand All @@ -20,96 +22,121 @@ In all examples is used an exemplary class implementing **ShippableInterface**,
private $category;
/**
* @var int
* @var float
*/
private $weight;
/**
* @var int
* @var float
*/
private $volume;
/**
* @var int
* @var float
*/
private $width;
/**
* @var int
* @var float
*/
private $height;
/**
* @var int
* @var float
*/
private $depth;
/**
* {@inheritdoc}
*/
public function getShippingWeight()
public function getShippingWeight(): float
{
return $this->weight;
}
/**
* @param int $weight
* {@inheritdoc}
*/
public function setShippingWeight($weight)
public function setShippingWeight(float $weight): void
{
$this->weight = $weight;
}
/**
* {@inheritdoc}
*/
public function getShippingVolume()
public function getShippingVolume(): float
{
return $this->volume;
}
/**
* @param int $volume
*/
public function setShippingVolume($volume)
public function setShippingVolume(float $volume)
{
$this->volume = $volume;
}
/**
* {@inheritdoc}
*/
public function getShippingWidth()
public function getShippingWidth(): float
{
// TODO: Implement getShippingWidth() method.
return $this->width;
}
/**
* {@inheritdoc}
*/
public function getShippingHeight()
public function setShippingWidth(float $width)
{
// TODO: Implement getShippingHeight() method.
$this->width = $width;
}
/**
* {@inheritdoc}
*/
public function getShippingDepth()
public function getShippingHeight(): float
{
// TODO: Implement getShippingDepth() method.
return $this->height;
}
/**
* {@inheritdoc}
*/
public function getShippingCategory()
public function setShippingHeight(float $height)
{
$this->height = $height;
}
/**
* {@inheritdoc}
*/
public function getShippingDepth(): float
{
return $this->depth;
}
/**
* {@inheritdoc}
*/
public function setShippingDepth(float $depth)
{
$this->depth = $depth;
}
/**
* {@inheritdoc}
*/
public function getShippingCategory(): ShippingCategoryInterface
{
return $this->category;
}
/**
* @param ShippingCategoryInterface $category
* {@inheritdoc}
*/
public function setShippingCategory(ShippingCategoryInterface $category)
{
Expand All @@ -126,7 +153,7 @@ methods respectively. The name is mutable, so you can change them by calling and
Shipping Method
---------------

Every shipping method has three identifiers, an ID code and name. You can access those by calling ``->getId()``, ``->gerCode()`` and ``->getName()``
Every shipping method has three identifiers, an ID code and name. You can access those by calling ``->getId()``, ``->getCode()`` and ``->getName()``
methods respectively. The name is mutable, so you can change them by calling ``->setName('FedEx')`` on the shipping method instance.

Setting Shipping Category
Expand Down Expand Up @@ -154,8 +181,7 @@ Every shipping method can have shipping category. You can simply set or unset it
Shipping Method Translation
---------------------------

**ShippingMethodTranslation** allows shipping method's name translation according to given locales. To see how to use translation
please go to :ref:`component_resource_translations_usage`.
**ShippingMethodTranslation** allows shipping method's name translation according to given locales. To see how to use translation please go to :ref:`component_resource_translations_usage`.


Shipment Item
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/code/bdd.rst
Expand Up @@ -105,7 +105,7 @@ Additionally, copy ``behat.yml.dist`` to ``behat.yml``, edit base_url parameter
default:
...
extensions:
Behat\MinkExtension\Extension:
Behat\MinkExtension:
...
base_url: http://sylius-test.local/app_test.php/
Expand Down Expand Up @@ -133,7 +133,7 @@ Configure behat for Selenium:
default:
...
extensions:
Behat\MinkExtension\Extension:
Behat\MinkExtension:
default_session: selenium2
browser_name: firefox
base_url: http://sylius-test.local/app_test.php
Expand Down
Expand Up @@ -70,7 +70,7 @@ The above compiler pass needs to be added to your bundle in the ``App/AppBundle.
}
}
That's it, we have removed the definition of the listner that is responsible for sending the order confirmation email.
That's it, we have removed the definition of the listener that is responsible for sending the order confirmation email.

Learn more
----------
Expand Down
14 changes: 12 additions & 2 deletions docs/customization/model.rst
Expand Up @@ -77,7 +77,7 @@ Assuming that you would want to add another field on the model - for instance a
**2.** Next define your entity's mapping.

The file should be placed in ``App/Resources/config/doctrine/Country.orm.yml``
The file should be placed in ``config/doctrine/Country.orm.yml``

.. code-block:: yaml
Expand Down Expand Up @@ -197,7 +197,7 @@ Just like for regular models you can also check the class of translatable models

**2.** Next define your entity's mapping.

The file should be placed in ``App/Resources/config/doctrine/ShippingMethod.orm.yml``
The file should be placed in ``config/doctrine/ShippingMethod.orm.yml``

.. code-block:: yaml
Expand All @@ -209,6 +209,16 @@ The file should be placed in ``App/Resources/config/doctrine/ShippingMethod.orm.
type: string
nullable: true
If you're using yaml config like in this example make sure you change configuration in ``config/packages/doctrine.yml`` so it reads mappings from yaml files

.. code-block:: yaml
orm:
mappings:
App:
type: yml
dir: '%kernel.project_dir%/config/doctrine'
**3.** Finally you'll need to override the model's class in the ``config/_sylius.yaml``.

Under the ``sylius_*`` where ``*`` is the name of the bundle of the model you are customizing,
Expand Down
9 changes: 9 additions & 0 deletions features/cli/showing_available_plugins.feature
@@ -0,0 +1,9 @@
@showing_available_plugins @cli
Feature: Showing available Sylius plugins
In order to be aware of available plugins
As a Developer
I want to be informed about available plugins

Scenario: Showing available Sylius plugins
When I run show available plugins command
Then I should see output "Available official Sylius Plugins" with listed plugins
3 changes: 3 additions & 0 deletions phpstan.neon
Expand Up @@ -23,6 +23,9 @@ parameters:
- '**MongoDB**'
- '**ODM**'

# Temporary PhpMatcherDumper class
- 'src/Sylius/Bundle/CoreBundle/Routing/Matcher/Dumper/PhpMatcherDumper.php'

ignoreErrors:
# Magic calls
- '/Call to an undefined static method Webmozart\\Assert\\Assert::all/'
Expand Down

0 comments on commit da0877f

Please sign in to comment.