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

Commit

Permalink
Merge branch 'release/v2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed May 31, 2018
2 parents ae5df40 + b911bea commit 18b32f7
Show file tree
Hide file tree
Showing 163 changed files with 14,093 additions and 58 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ myapp.ini
requests.log
env.list
humbug.*
/cache
cache/commercetools_io_access_token*
src/cache/
github_deploy_key
node_modules
23 changes: 20 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ php:
- 7.0
- 5.6
- 7.1
- 7.2
- hhvm
- nightly
env:
Expand All @@ -24,6 +25,7 @@ before_install:
- chmod 600 github_deploy_key
- eval $(ssh-agent -s)
- ssh-add github_deploy_key
- rm github_deploy_key
- PHP=$TRAVIS_PHP_VERSION
- if [ $PHP != 'hhvm' ] ; then echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
before_script:
Expand All @@ -33,13 +35,28 @@ before_script:
- if [ $GUZZLE == '5' ] ; then composer update -o --prefer-dist --prefer-lowest; fi
- if [ $GUZZLE != '5' ] ; then composer install -o --prefer-dist; fi
script:
- ant phpcs-ci
- if [ $PHP == '7.1' ] && [ $GUZZLE == '6' ]; then ant phpcs-ci; fi
- if [ $GUZZLE == '5' ] || [ $PHP == '5.6' ] || [ $PHP == 'hhvm' ] ; then vendor/bin/phpunit -c phpunit5.xml.dist --testsuite=unit; fi
- if [ $GUZZLE == '6' ] && [ $PHP != '5.6' ] ; then vendor/bin/phpunit --testsuite=unit; fi
- if [ $PHP == '7.0' ] && [ $GUZZLE == '6' ] && [ $TRAVIS_PULL_REQUEST == 'false' ]; then vendor/bin/phpunit --testsuite=integration; fi
- ant behat
after_success:
- if [ $PHP == '7.1' ] && [ $GUZZLE == '6' ] ; then ./push-docs-to-gh-pages.sh; fi
before_deploy:
- if [ $(phpenv version-name) = "7.1" ] ; then ant apigen; fi
deploy:
- provider: script
skip_cleanup: true
script: ./push-docs-to-gh-pages.sh
on:
branch: master
condition: $GUZZLE = '6'
php: 7.1
- provider: script
skip_cleanup: true
script: ./push-docs-to-gh-pages.sh
on:
tags: true
condition: $GUZZLE = '6'
php: 7.1
notifications:
hipchat:
rooms:
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
<a name="2.4.0"></a>
# [2.4.0](https://github.com/commercetools/commercetools-php-sdk/compare/v2.3.0...v2.4.0) (2018-05-31)


### Bug Fixes

* **Guzzle5Adapter:** fix applying client options to guzzle5 http client ([e735afd](https://github.com/commercetools/commercetools-php-sdk/commit/e735afd))


### Features

* **Attribute:** enhance getting attribute by name from attributes collection ([5d6ef10](https://github.com/commercetools/commercetools-php-sdk/commit/5d6ef10))
* **Builder:** add request and update actions builder DSL ([3a55e6d](https://github.com/commercetools/commercetools-php-sdk/commit/3a55e6d))
* **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)
* **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)
* **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)
* **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)
* **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)
* **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)



<a name="2.3.0"></a>
# [2.3.0](https://github.com/commercetools/commercetools-php-sdk/compare/v2.2.1...v2.3.0) (2018-03-13)

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To get up and running, [create a free test project](http://admin.sphere.io) on t

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

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

$client = Client::ofConfig($config);
$products = $client->execute($search)->toObject();
Expand Down
9 changes: 6 additions & 3 deletions docroot/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Commercetools\Core;

use Cache\Adapter\Filesystem\FilesystemCachePool;
use Commercetools\Core\Builder\Request\RequestBuilder;
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Monolog\Handler\StreamHandler;
Expand All @@ -31,8 +32,9 @@
if (isset($_POST['search'])) {
$search = $_POST['search'];
}
$request = ProductProjectionSearchRequest::of($config->getContext())
->addParam('text.' . current($config->getContext()->getLanguages()), $search);
$request = RequestBuilder::of()->productProjections()->search()
->addParam('text.' . current($config->getContext()->getLanguages()), $search)
->setContext($config->getContext());

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

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

$products = $client->execute($request)->toObject();
$response = $client->execute($request);
$products = $request->mapFromResponse($response);

/**
* @var ProductProjectionCollection $products
Expand Down
Binary file modified github_deploy_key.enc
Binary file not shown.
Loading

0 comments on commit 18b32f7

Please sign in to comment.