Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 44676fc

Browse files
author
Jens Schulze
committed
Merge branch 'release/v2.1.0'
2 parents 8dfa2ce + 4877bfa commit 44676fc

File tree

55 files changed

+1374
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1374
-46
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ script:
3737
- if [ $PHP == '7.0' ] && [ $GUZZLE == '6' ] ; then vendor/bin/phpunit --testsuite=integration; fi
3838
- ant behat
3939
after_success:
40-
- if [ $PHP == '5.6' ] && [ $GUZZLE == '6' ] ; then ./push-docs-to-gh-pages.sh; fi
40+
- if [ $PHP == '7.1' ] && [ $GUZZLE == '6' ] ; then ./push-docs-to-gh-pages.sh; fi
4141
notifications:
4242
hipchat:
4343
rooms:

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
<a name="2.1.0"></a>
2+
# [2.1.0](https://github.com/commercetools/commercetools-php-sdk/compare/v2.0.0...v2.1.0) (2017-07-06)
3+
4+
5+
### Features
6+
7+
* **Cart:** support external price for line items ([3a9d972](https://github.com/commercetools/commercetools-php-sdk/commit/3a9d972)), closes [#322](https://github.com/commercetools/commercetools-php-sdk/issues/322)
8+
* **CartDiscount:** support free gift line item ([ad58116](https://github.com/commercetools/commercetools-php-sdk/commit/ad58116)), closes [#325](https://github.com/commercetools/commercetools-php-sdk/issues/325)
9+
* **Category:** support category key functionality ([d2b63dd](https://github.com/commercetools/commercetools-php-sdk/commit/d2b63dd)), closes [#326](https://github.com/commercetools/commercetools-php-sdk/issues/326)
10+
* **Customer:** add get customer by email token request ([8de3b30](https://github.com/commercetools/commercetools-php-sdk/commit/8de3b30))
11+
* **Customer:** add salutation to customer ([c1c65fd](https://github.com/commercetools/commercetools-php-sdk/commit/c1c65fd)), closes [#324](https://github.com/commercetools/commercetools-php-sdk/issues/324)
12+
* **Messages:** add OrderPaymentStateChanged message ([6afb611](https://github.com/commercetools/commercetools-php-sdk/commit/6afb611)), closes [#312](https://github.com/commercetools/commercetools-php-sdk/issues/312)
13+
* **Messages:** add PaymentStatusInterfaceCodeSet message ([c5e0531](https://github.com/commercetools/commercetools-php-sdk/commit/c5e0531)), closes [#313](https://github.com/commercetools/commercetools-php-sdk/issues/313)
14+
* **Messages:** add ProductImageAdded message ([0e14d97](https://github.com/commercetools/commercetools-php-sdk/commit/0e14d97)), closes [#314](https://github.com/commercetools/commercetools-php-sdk/issues/314)
15+
* **Payment:** support key for payments ([1f40cef](https://github.com/commercetools/commercetools-php-sdk/commit/1f40cef)), closes [#315](https://github.com/commercetools/commercetools-php-sdk/issues/315)
16+
* **ProductType:** add change inputHint update action ([af666f6](https://github.com/commercetools/commercetools-php-sdk/commit/af666f6)), closes [#323](https://github.com/commercetools/commercetools-php-sdk/issues/323)
17+
* **ShippingMethod:** add isMatching flag to shipping rates ([c6b4328](https://github.com/commercetools/commercetools-php-sdk/commit/c6b4328))
18+
19+
120
<a name="2.0.0"></a>
221
# [2.0.0](https://github.com/commercetools/commercetools-php-sdk/compare/v1.7.0...v2.0.0) (2017-05-31)
322

@@ -17,6 +36,7 @@
1736

1837
### Features
1938

39+
* **Product:** support tiered pricing ([93802cd](https://github.com/commercetools/commercetools-php-sdk/commit/93802cd)), closes [#303](https://github.com/commercetools/commercetools-php-sdk/issues/303)
2040
* **Cache:** support PSR-16 cache implementations ([c3ceac7](https://github.com/commercetools/commercetools-php-sdk/commit/c3ceac7)), closes [#297](https://github.com/commercetools/commercetools-php-sdk/issues/297)
2141
* **Client:** add logLevel configuration option ([8aa457a](https://github.com/commercetools/commercetools-php-sdk/commit/8aa457a)), closes [#300](https://github.com/commercetools/commercetools-php-sdk/issues/300)
2242
* **Client:** add possibility for additional headers when executing request ([74c5a15](https://github.com/commercetools/commercetools-php-sdk/commit/74c5a15))

build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
<exec executable="php" dir="${basedir}" failonerror="true">
209209
<arg value="${basedir}/apigen.phar"/>
210210
<arg value="generate"/>
211+
<arg value="--debug"/>
211212
<arg value="--config"/>
212213
<arg path="${basedir}/build/apigen.neon"/>
213214
</exec>

features/request/Customer/CustomerPasswordChange.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: I want to change the customer's password
1414
Scenario: Get customer by password token
1515
Given a "customer" is identified by the token "tokenValue"
1616
Given i want to fetch a "Customer" by token
17-
Then the path should be "customers?token=tokenValue"
17+
Then the path should be "customers/password-token=tokenValue"
1818
And the method should be "GET"
1919

2020
Scenario: Reset customers password

tools/package.json renamed to package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "commercetools-php-sdk-changelog",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "commercetools PHP SDK changelog generator package description",
55
"homepage": "https://github.com/commercetools/commercetools-php-sdk",
66
"bugs": "https://github.com/commercetools/commercetools-php-sdk/issues",

push-docs-to-gh-pages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
# to be called as "after_success: - ./push-docs-to-gh-pages.sh" in .travis.yml
1010

1111
export SDK_VERSION=$TRAVIS_BRANCH;
12-
if [ $(phpenv version-name) = "5.6" ] ; then ant apigen; fi
12+
if [ $(phpenv version-name) = "7.1" ] ; then ant apigen; fi
1313

14-
if [ "$TRAVIS_REPO_SLUG" == "commercetools/commercetools-php-sdk" ] && [ $(phpenv version-name) = "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ( [ "$TRAVIS_BRANCH" == "master" ] || [ "$TRAVIS_BRANCH" == `git describe --tags --always HEAD` ] ); then
14+
if [ "$TRAVIS_REPO_SLUG" == "commercetools/commercetools-php-sdk" ] && [ $(phpenv version-name) = "7.1" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ( [ "$TRAVIS_BRANCH" == "master" ] || [ "$TRAVIS_BRANCH" == `git describe --tags --always HEAD` ] ); then
1515
echo -e "Publishing documentation to gh-pages branch ...\n"
1616

1717
cp -R build/docs $HOME/phpdoc-current

src/Core/AbstractHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
abstract class AbstractHttpClient
1616
{
17-
const VERSION = '2.0.0';
17+
const VERSION = '2.1.0';
1818

1919
/**
2020
* @var AdapterInterface

src/Core/Helper/Annotate/AnnotationGenerator.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ protected function getJsonObjects(\RegexIterator $phpFiles)
6161
$jsonObjects = [];
6262
foreach ($phpFiles as $phpFile) {
6363
$class = $this->getClassName($phpFile->getRealPath());
64+
if (strpos($class, 'Core\\Helper') > 0) {
65+
continue;
66+
}
6467

6568
if (!empty($class)) {
6669
if (in_array(JsonObject::class, class_parents($class))) {
@@ -77,6 +80,9 @@ protected function getCollectionObjects(\RegexIterator $phpFiles)
7780
$collectionObjects = [];
7881
foreach ($phpFiles as $phpFile) {
7982
$class = $this->getClassName($phpFile->getRealPath());
83+
if (strpos($class, 'Core\\Helper') > 0) {
84+
continue;
85+
}
8086

8187
if (!empty($class)) {
8288
if (in_array(Collection::class, class_parents($class))) {
@@ -93,6 +99,9 @@ protected function getRequestObjects(\RegexIterator $phpFiles)
9399
$requestObjects = [];
94100
foreach ($phpFiles as $phpFile) {
95101
$class = $this->getClassName($phpFile->getRealPath());
102+
if (strpos($class, 'Core\\Helper') > 0) {
103+
continue;
104+
}
96105

97106
if (!empty($class)) {
98107
if (in_array(AbstractApiRequest::class, class_parents($class))) {

src/Core/Model/Cart/Cart.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
namespace Commercetools\Core\Model\Cart;
77

8+
use Commercetools\Core\Model\CartDiscount\CartDiscountReferenceCollection;
89
use Commercetools\Core\Model\Common\Address;
910
use Commercetools\Core\Model\Common\LocaleTrait;
1011
use Commercetools\Core\Model\Common\Resource;
@@ -68,6 +69,8 @@
6869
* @method Cart setTaxRoundingMode(string $taxRoundingMode = null)
6970
* @method int getDeleteDaysAfterLastModification()
7071
* @method Cart setDeleteDaysAfterLastModification(int $deleteDaysAfterLastModification = null)
72+
* @method CartDiscountReferenceCollection getRefusedGifts()
73+
* @method Cart setRefusedGifts(CartDiscountReferenceCollection $refusedGifts = null)
7174
* @method CartReference getReference()
7275
*/
7376
class Cart extends Resource
@@ -114,7 +117,8 @@ public function fieldDefinitions()
114117
'anonymousId' => [static::TYPE => 'string'],
115118
'locale' => [static::TYPE => 'string'],
116119
'taxRoundingMode' => [static::TYPE => 'string'],
117-
'deleteDaysAfterLastModification' => [static::TYPE => 'int']
120+
'deleteDaysAfterLastModification' => [static::TYPE => 'int'],
121+
'refusedGifts' => [static::TYPE => CartDiscountReferenceCollection::class],
118122
];
119123
}
120124

src/Core/Model/Cart/LineItem.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,17 @@
5353
* @method LineItem setPriceMode(string $priceMode = null)
5454
* @method ProductTypeReference getProductType()
5555
* @method LineItem setProductType(ProductTypeReference $productType = null)
56+
* @method string getLineItemMode()
57+
* @method LineItem setLineItemMode(string $lineItemMode = null)
5658
*/
5759
class LineItem extends JsonObject
5860
{
5961
const PRICE_MODE_PLATFORM = 'Platform';
6062
const PRICE_MODE_EXTERNAL_TOTAL = 'ExternalTotal';
63+
const PRICE_MODE_EXTERNAL_PRICE = 'ExternalPrice';
64+
65+
const LINE_ITEM_MODE_STANDARD = 'Standard';
66+
const LINE_ITEM_MODE_GIFT_LINE_ITEM = 'GiftLineItem';
6167

6268
public function fieldDefinitions()
6369
{
@@ -80,7 +86,8 @@ public function fieldDefinitions()
8086
static::TYPE => DiscountedPricePerQuantityCollection::class
8187
],
8288
'priceMode' => [static::TYPE => 'string'],
83-
'productType' => [static::TYPE => ProductTypeReference::class]
89+
'lineItemMode' => [static::TYPE => 'string'],
90+
'productType' => [static::TYPE => ProductTypeReference::class],
8491
];
8592
}
8693

0 commit comments

Comments
 (0)