Skip to content

Commit

Permalink
Add upgrade docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Jul 4, 2018
1 parent c96b040 commit d3b87c7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/upgrades/upgrade_100_200.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
Upgrading from 1.0.0 to 2.0.0
=============================

eZ Platform Site API introduces a slight breaking change to ``ContentView`` value object, hence the
bump to version 2.0.

- Site API ``ContentView`` view object does not extend from eZ Platform ``ContentView`` value object
any more to allow implementation of custom view providers. Class signature did not change,
however, since all required interfaces are now implemented directly on Site API ``ContentView``
value object.

- Also, ``Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentValueView`` interface does not contain
``getSiteLocation`` method any more. It is moved to a new interface, ``LocationValueView``, in the
same namespace. If you used this method in your code, make sure to check for this new interface.
This was done to keep in line on how eZ kernel uses its ``ContentView`` value object and its
interfaces.
20 changes: 20 additions & 0 deletions docs/upgrades/upgrade_230_240.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
Upgrading from 2.3.0 to 2.4.0
=============================

Controllers that extend from ``Netgen\Bundle\EzPlatformSiteApiBundle\Controller\Controller`` and are
registered inside dependency injection container should set two setter injection ``calls``:

.. code-block:: yaml
app.demo.controller.demo_controller:
class: Acme\Bundle\DemoBundle\Controller\DemoController
calls:
- [setContainer, ['@service_container']]
- [setSite, ['@netgen.ezplatform_site.site']]
Or if you want to avoid setter calls, just set ``parent`` service:

.. code-block:: yaml
app.demo.controller.demo_controller:
parent: netgen.ezplatform_site.controller.base
class: Acme\Bundle\DemoBundle\Controller\DemoController

0 comments on commit d3b87c7

Please sign in to comment.