-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Replace parent BeVariant and Product with $parent and a union …
…type Relates: #611
- Loading branch information
Showing
9 changed files
with
94 additions
and
157 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
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
33 changes: 33 additions & 0 deletions
33
Documentation/Changelog/10.0/Breaking-611-ChangePhpDependency.rst
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. include:: ../../Includes.rst.txt | ||
|
||
================================================= | ||
Breaking: #611 - Change BeVariant Parent Handling | ||
================================================= | ||
|
||
See `Issue 611 <https://github.com/extcode/cart/issues/611>`__ | ||
|
||
Description | ||
=========== | ||
|
||
Previously, a `BeVariant` had either another `BeVariant` or a `Product` as its parent element. These were passed in the | ||
constructor method. | ||
|
||
Thanks to PHP's union types, this can now be resolved. A `BeVariant` now has a `$parent` that is either of type | ||
`BeVariant` or of type `Product`. | ||
|
||
The individual methods have been adapted accordingly and it is checked of which class `$parent` is an instance. In some | ||
cases, the case differentiation could be omitted completely. | ||
|
||
Affected Installations | ||
====================== | ||
|
||
All product extensions that use their own `BeVariant` in the products are affected. The provided extensions | ||
extcode/cart-products and extcode/cart-events will be adapted accordingly. | ||
|
||
Migration | ||
========= | ||
|
||
If a custom product extension is used, the constructor must be adapted accordingly. Furthermore, a few | ||
methods in `BeVariant` have been replaced or their behavior adapted. | ||
|
||
.. index:: API |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. include:: ../../Includes.rst.txt | ||
|
||
10.0 Changes | ||
============ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 1 | ||
|
||
Breaking | ||
-------- | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:titlesonly: | ||
:glob: | ||
|
||
Breaking-* |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ ChangeLog | |
:maxdepth: 5 | ||
:titlesonly: | ||
|
||
10.0/Index | ||
9.3/Index | ||
9.1/Index | ||
9.0/Index | ||
|
Oops, something went wrong.