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

Commit

Permalink
Merge release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Jun 2, 2017
1 parent 257e1fc commit 8dfa2ce
Show file tree
Hide file tree
Showing 964 changed files with 1,581 additions and 424 deletions.
85 changes: 85 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
<a name="2.0.0"></a>
# [2.0.0](https://github.com/commercetools/commercetools-php-sdk/compare/v1.7.0...v2.0.0) (2017-05-31)


### Bug Fixes

* **AssetDraft:** correct type for custom field object ([abc0afd](https://github.com/commercetools/commercetools-php-sdk/commit/abc0afd))
* **Collection:** fix iterator for unset elements of collections (#307) ([5687380](https://github.com/commercetools/commercetools-php-sdk/commit/5687380)), closes [#307](https://github.com/issues/307)
* **Customer:** fix create email token request with TTL ([8367ef6](https://github.com/commercetools/commercetools-php-sdk/commit/8367ef6))
* **ImageUpload:** fix product image upload ([445b2f4](https://github.com/commercetools/commercetools-php-sdk/commit/445b2f4))
* **ProductSuggest:** fix suggestion parameters ([d9652df](https://github.com/commercetools/commercetools-php-sdk/commit/d9652df)), closes [#310](https://github.com/commercetools/commercetools-php-sdk/issues/310)

### Code Refactoring

* **OAuth:** change scope of getCacheAdapter method ([c6b27ec](https://github.com/commercetools/commercetools-php-sdk/commit/c6b27ec))
* **ProductSearch:** disable markMatchingVariants by default ([41711a8](https://github.com/commercetools/commercetools-php-sdk/commit/41711a8))

### Features

* **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)
* **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)
* **Client:** add possibility for additional headers when executing request ([74c5a15](https://github.com/commercetools/commercetools-php-sdk/commit/74c5a15))
* **ShoppingList:** add SetDeleteDaysAfterLastModificationAction ([d31b839](https://github.com/commercetools/commercetools-php-sdk/commit/d31b839))
* **Subscription:** add getter for message to message subscription payload ([daa2558](https://github.com/commercetools/commercetools-php-sdk/commit/daa2558)), closes [#308](https://github.com/commercetools/commercetools-php-sdk/issues/308)


### BREAKING CHANGES

* PHP minimum version is now 5.6
* guzzle/log-subscriber has been removed as a dependency
* AssetDraft: AssetDraft requires CustomFieldObjectDraft instead of CustomFieldObject

Before:

```
$assetDraft = AssetDraft::of()->setCustom(CustomFieldObject::of());
```

After:

```
$assetDraft = AssetDraft::of()->setCustom(CustomFieldObjectDraft::of());
```
* OAuth: Manager::getCacheAdapter() method scope has been changed from public to protected
* ProductSearch: markMatchingVariants has been disabled by default

For performance reasons the markMatchingVariants flag has been disabled by default. In order to use markMatchingVariants feature please enable it explicit.

Before:
```
$request = ProductProjectionSearchRequest::of();
```

After:
```
$request = ProductProjectionSearchRequest::of()->markMatchingVariants(true);
```
* Token caching is now using [PSR-6](https://packagist.org/providers/psr/cache-implementation) or [PSR-16](https://packagist.org/providers/psr/simple-cache-implementation) cache adapters only.
Removed classes:
- AbstractCacheAdapter
- ApcCacheAdapter
- ApcuCacheAdapter
- CacheAdapterInterface
- DoctrineCacheAdapter
- NullCacheAdapter
- PhpRedisCacheAdapter

Use an appropiate PSR-6 or PRS-16 cache adapter as a replacement. The SDK uses the [cache\apcu-adapter](https://packagist.org/packages/cache/apcu-adapter) as default or if available the [cache\filesystem-adapter](https://packagist.org/packages/cache/filesystem-adapter)
* Deprecations have been removed
- FileRequest
- use FileUploadRequest
- CustomerChangeNameAction
- use CustomerSetFirstNameAction, CustomerSetLastNameAction, CustomerSetMiddleNameAction or CustomerSetTitleAction
- ProductSetSkuNotStageableAction
- use ProductSetSkuAction
* Context doesn't extend Pimple\Container anymore
* Pimple has been removed as a dependency

### DEPRECATION NOTE

The class ```Commercetools\Commons\Helper\PriceFinder``` has been deprecated. Please use the
[price selection](http://dev.commercetools.com/http-api-projects-products.html#price-selection) functionality of
the platform. E.g. ```ProductProjectionSearchRequest::of()->currency('EUR')->country('DE')```


<a name="2.0.0-RC1"></a>
# [2.0.0-RC1](https://github.com/commercetools/commercetools-php-sdk/compare/v1.7.0...v2.0.0-RC1) (2017-03-13)

Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The [PHP API documentation](http://commercetools.github.io/commercetools-php-sdk

### Install & Integrate the SDK into your Project

The SDK requires a PHP version of 5.4 or higher. The SDK tries to use the APC(u) as it's default cache. If you provide an own cache interface or a [PSR-6](https://packagist.org/providers/psr/cache-implementation) compliant cache adapter, APC(u) is not necessary. The [cache/filesystem-adapter](https://packagist.org/packages/cache/filesystem-adapter) is tried to be used if no APC(u) is installed. See also client [documentation](http://commercetools.github.io/commercetools-php-sdk/docs/master/class-Commercetools.Core.Client.html).
The SDK requires a PHP version of 5.6 or higher. The SDK tries to use the APC(u) as it's default cache. If you provide a [PSR-6](https://packagist.org/providers/psr/cache-implementation) or [PSR-16](https://packagist.org/providers/psr/simple-cache-implementation) compliant cache adapter, APC(u) is not necessary. The [cache/filesystem-adapter](https://packagist.org/packages/cache/filesystem-adapter) is tried to be used if no APC(u) is installed.

The curl extension is recommended but not strictly necessary because the SDK is using the [Guzzle library](https://github.com/guzzle/guzzle) library, which falls back to PHP stream wrappers if curl is not available.
The intl extension is required to directly output Money objects as a String.
Expand All @@ -39,11 +39,11 @@ The SDK supports Guzzle6 as well as Guzzle5 as HTTP client. For Guzzle6:
composer require guzzlehttp/guzzle ^6.0
```

When you want to use Guzzle5 you have to add additionally the log subscriber:
When you want to use Guzzle5 you have to ensure react/promise at minimum version 2.2:

```bash
composer require guzzlehttp/guzzle ^5.0
composer require guzzlehttp/log-subscriber ^1.0
composer require guzzlehttp/guzzle ^5.3.1
composer require react/promise ^2.2
```

After installing, you need to require Composer's autoloader if that's not yet the case:
Expand All @@ -54,7 +54,7 @@ require 'vendor/autoload.php';

If you don't use Composer, just [download a zip archive](https://github.com/commercetools/commercetools-php-sdk/archive/master.zip) of the latest release, manually integrate it and configure your own autoloader.

Until the 1.0.0 release M0, M1 etc. milestone releases can contain incompatible changes. From 1.0.0 on, the project will follow the [semantic versioning](http://semver.org) guidelines, i.e. everything but major version changes are backwards-compatible. This matches composer's default behavior.
The project follows the [semantic versioning](http://semver.org) guidelines, i.e. everything but major version changes are backwards-compatible. This matches composer's default behavior.

With composer just run `composer update commercetools/php-sdk` to update to compatible versions. Edit your `composer.json` file to update to incompatible versions.

Expand Down Expand Up @@ -101,7 +101,6 @@ foreach ($products as $product) {
echo $product->getName()->en . '<br/>';
}

?>
```

In real world, you will not put your API credentials directly into code but use a config file or your framework's config or dependency injection system for that.
Expand All @@ -127,11 +126,11 @@ php composer.phar update
```

### Linux preparations :
* install php 5.5+, xdebug and ant according to their distro's package system.
* install php 5.6+, xdebug and ant according to their distro's package system.
* make sure the curl, intl, mbstring and openssl extensions are activated in php.ini

### Windows preparations:
* [install php](http://windows.php.net/download/) 5.5+, i.e. extract ZIP and make add php.exe location to your PATH. Use WAMP etc. if you like, but plain PHP commandline is all you really need (you can test example code in the built-in webserver).
* [install php](http://windows.php.net/download/) 5.6+, i.e. extract ZIP and make add php.exe location to your PATH. Use WAMP etc. if you like, but plain PHP commandline is all you really need (you can test example code in the built-in webserver).
* enable the curl, intl, mbstring and openssl extenstions in php.ini
* make a working ant available in the PATH
* and [install composer](https://getcomposer.org/doc/00-intro.md#installation-windows).
Expand All @@ -158,9 +157,9 @@ You can use the `docroot` directory with the built-in PHP web server. Add to the

```yaml
parameters:
client_id: my client id
client_secret: my client secret
project: my project id
client_id: my client id
client_secret: my client secret
project: my project id
```
Then activate the php builtin web server
Expand Down
2 changes: 0 additions & 2 deletions build/apigen.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ templateConfig: build/theme/config.neon
accessLevels: [public]
extensions: [php]

deprecated: Yes
internal: No

download: No
php: No
noSourceCode: No
todo: No
tree: Yes
18 changes: 8 additions & 10 deletions build/theme/@layout.latte
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@
<meta charset="utf-8">
<meta name="robots" content="noindex" n:if="!$robots">

<title>CTP SDK {getenv('SDK_VERSION')}: {include title}{if 'overview' !== $active && $config->title}{/if}</title>
<title>CTP SDK {getenv('SDK_VERSION')}: {include title}{if 'overview' !== $active && $config->title} | {$config->title}{/if}</title>

<link rel="stylesheet" href="{='resources/bootstrap.min.css'|staticFile}">
<link rel="stylesheet" href="{='resources/style.css'|staticFile}">
<link n:if="$config->googleCseId" rel="search" type="application/opensearchdescription+xml" title="{$config->title}" href="{$config->baseUrl}/opensearch.xml">
<link rel="shortcut icon" type="image/png" href="{='resources/favicon.png'|staticFile}">
<script n:if="$config->googleAnalytics">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', {$config->googleAnalytics}]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
(function(i,s,o,g,r,a,m) { i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', {$config->googleAnalytics}, 'auto');
ga('send', 'pageview');
</script>
</head>

Expand Down
Loading

0 comments on commit 8dfa2ce

Please sign in to comment.