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

Commit 18b32f7

Browse files
author
Jens Schulze
committed
Merge branch 'release/v2.4.0'
2 parents ae5df40 + b911bea commit 18b32f7

File tree

163 files changed

+14093
-58
lines changed

Some content is hidden

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

163 files changed

+14093
-58
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ myapp.ini
1515
requests.log
1616
env.list
1717
humbug.*
18-
/cache
18+
cache/commercetools_io_access_token*
19+
src/cache/
20+
github_deploy_key
21+
node_modules

.travis.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ php:
55
- 7.0
66
- 5.6
77
- 7.1
8+
- 7.2
89
- hhvm
910
- nightly
1011
env:
@@ -24,6 +25,7 @@ before_install:
2425
- chmod 600 github_deploy_key
2526
- eval $(ssh-agent -s)
2627
- ssh-add github_deploy_key
28+
- rm github_deploy_key
2729
- PHP=$TRAVIS_PHP_VERSION
2830
- if [ $PHP != 'hhvm' ] ; then echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
2931
before_script:
@@ -33,13 +35,28 @@ before_script:
3335
- if [ $GUZZLE == '5' ] ; then composer update -o --prefer-dist --prefer-lowest; fi
3436
- if [ $GUZZLE != '5' ] ; then composer install -o --prefer-dist; fi
3537
script:
36-
- ant phpcs-ci
38+
- if [ $PHP == '7.1' ] && [ $GUZZLE == '6' ]; then ant phpcs-ci; fi
3739
- if [ $GUZZLE == '5' ] || [ $PHP == '5.6' ] || [ $PHP == 'hhvm' ] ; then vendor/bin/phpunit -c phpunit5.xml.dist --testsuite=unit; fi
3840
- if [ $GUZZLE == '6' ] && [ $PHP != '5.6' ] ; then vendor/bin/phpunit --testsuite=unit; fi
3941
- if [ $PHP == '7.0' ] && [ $GUZZLE == '6' ] && [ $TRAVIS_PULL_REQUEST == 'false' ]; then vendor/bin/phpunit --testsuite=integration; fi
4042
- ant behat
41-
after_success:
42-
- if [ $PHP == '7.1' ] && [ $GUZZLE == '6' ] ; then ./push-docs-to-gh-pages.sh; fi
43+
before_deploy:
44+
- if [ $(phpenv version-name) = "7.1" ] ; then ant apigen; fi
45+
deploy:
46+
- provider: script
47+
skip_cleanup: true
48+
script: ./push-docs-to-gh-pages.sh
49+
on:
50+
branch: master
51+
condition: $GUZZLE = '6'
52+
php: 7.1
53+
- provider: script
54+
skip_cleanup: true
55+
script: ./push-docs-to-gh-pages.sh
56+
on:
57+
tags: true
58+
condition: $GUZZLE = '6'
59+
php: 7.1
4360
notifications:
4461
hipchat:
4562
rooms:

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
<a name="2.4.0"></a>
2+
# [2.4.0](https://github.com/commercetools/commercetools-php-sdk/compare/v2.3.0...v2.4.0) (2018-05-31)
3+
4+
5+
### Bug Fixes
6+
7+
* **Guzzle5Adapter:** fix applying client options to guzzle5 http client ([e735afd](https://github.com/commercetools/commercetools-php-sdk/commit/e735afd))
8+
9+
10+
### Features
11+
12+
* **Attribute:** enhance getting attribute by name from attributes collection ([5d6ef10](https://github.com/commercetools/commercetools-php-sdk/commit/5d6ef10))
13+
* **Builder:** add request and update actions builder DSL ([3a55e6d](https://github.com/commercetools/commercetools-php-sdk/commit/3a55e6d))
14+
* **Cart:** Support cart replication ([52d9448](https://github.com/commercetools/commercetools-php-sdk/commit/52d9448)), closes [#392](https://github.com/commercetools/commercetools-php-sdk/issues/392)
15+
* **CartDiscount:** support MultiBuyDiscount on custom line items ([f53d0b5](https://github.com/commercetools/commercetools-php-sdk/commit/f53d0b5)), closes [#389](https://github.com/commercetools/commercetools-php-sdk/issues/389)
16+
* **Message:** add customer messages ([2f8c91d](https://github.com/commercetools/commercetools-php-sdk/commit/2f8c91d)), closes [#391](https://github.com/commercetools/commercetools-php-sdk/issues/391)
17+
* **OAuthManager:** add configuration options for internal HTTP client ([5746c4a](https://github.com/commercetools/commercetools-php-sdk/commit/5746c4a)), closes [#395](https://github.com/commercetools/commercetools-php-sdk/issues/395)
18+
* **ProductType:** support product type changeAttributeName & changeEnumKey ([#397](https://github.com/commercetools/commercetools-php-sdk/issues/397)) ([8994315](https://github.com/commercetools/commercetools-php-sdk/commit/8994315)), closes [#393](https://github.com/commercetools/commercetools-php-sdk/issues/393)
19+
* **ProductType:** support product type removeEnumValues update action ([2bf3e13](https://github.com/commercetools/commercetools-php-sdk/commit/2bf3e13)), closes [#388](https://github.com/commercetools/commercetools-php-sdk/issues/388)
20+
21+
22+
123
<a name="2.3.0"></a>
224
# [2.3.0](https://github.com/commercetools/commercetools-php-sdk/compare/v2.2.1...v2.3.0) (2018-03-13)
325

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ To get up and running, [create a free test project](http://admin.sphere.io) on t
6969

7070
require '../vendor/autoload.php';
7171

72-
use Commercetools\Core\Request\Products\ProductProjectionSearchRequest;
72+
use Commercetools\Core\Builder\Request\RequestBuilder;
7373
use Commercetools\Core\Client;
7474
use Commercetools\Core\Config;
7575
use Commercetools\Core\Model\Common\Context;
@@ -87,7 +87,8 @@ $config = Config::fromArray($config)->setContext($context);
8787
* execute the request and get the PHP Object
8888
* (the client can and should be re-used)
8989
*/
90-
$search = ProductProjectionSearchRequest::of()->addParam('text.en', 'red');
90+
$search = RequestBuilder::of()->productProjections()->search()
91+
->addParam('text.en', 'red');
9192

9293
$client = Client::ofConfig($config);
9394
$products = $client->execute($search)->toObject();

docroot/index.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Commercetools\Core;
77

88
use Cache\Adapter\Filesystem\FilesystemCachePool;
9+
use Commercetools\Core\Builder\Request\RequestBuilder;
910
use League\Flysystem\Adapter\Local;
1011
use League\Flysystem\Filesystem;
1112
use Monolog\Handler\StreamHandler;
@@ -31,8 +32,9 @@
3132
if (isset($_POST['search'])) {
3233
$search = $_POST['search'];
3334
}
34-
$request = ProductProjectionSearchRequest::of($config->getContext())
35-
->addParam('text.' . current($config->getContext()->getLanguages()), $search);
35+
$request = RequestBuilder::of()->productProjections()->search()
36+
->addParam('text.' . current($config->getContext()->getLanguages()), $search)
37+
->setContext($config->getContext());
3638

3739
$log = new Logger('name');
3840
$log->pushHandler(new StreamHandler('./requests.log'));
@@ -43,7 +45,8 @@
4345

4446
$client = Client::ofConfigCacheAndLogger($config, $cache, $log);
4547

46-
$products = $client->execute($request)->toObject();
48+
$response = $client->execute($request);
49+
$products = $request->mapFromResponse($response);
4750

4851
/**
4952
* @var ProductProjectionCollection $products

github_deploy_key.enc

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)