Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@
- 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
Expand All @@ -490,9 +490,8 @@

### DEPRECATION NOTE

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


<a name="2.0.0-RC1"></a>
Expand Down Expand Up @@ -543,7 +542,7 @@ the platform. E.g. ```ProductProjectionSearchRequest::of()->currency('EUR')->cou
```
$request = ProductProjectionSearchRequest::of()->markMatchingVariants(true);
```

* PHP minimum version is now 5.6
* 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:
Expand All @@ -554,7 +553,7 @@ the platform. E.g. ```ProductProjectionSearchRequest::of()->currency('EUR')->cou
- 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
Expand Down Expand Up @@ -860,53 +859,53 @@ There had been no changes
* Product: renamed the ProductSetSKUAction to ProductSetSKUNotStageableAction

Before:

```
ProductSetSKUAction::ofVariantId()
```

After:

```
ProductSetSKUNotStageableAction::ofVariantId() // old behavior action
ProductSetSkuAction::ofVariantId() // stageable action
```
* Product: fix type of price collections

Before:

```
ProductAddVariantAction::of()->setPrices(PriceCollection::of()->add(Price::of()))
```

After:

```
ProductAddVariantAction::of()->setPrices(PriceDraftCollection::of()->add(PriceDraft::of()))
```
* Customer: adjust customer email verification request to API changes

Before:

```
CustomerEmailConfirmRequest::ofIdVersionAndToken($id, $version, $token)
```

After:

```
CustomerEmailConfirmRequest::ofToken($token)
```
* Customer: adjust customer password change request to API changes

Before:

```
CustomerPasswordResetRequest::ofIdVersionTokenAndPassword($id, $version, $token, $newPassword)
```

After:

```
CustomerPasswordResetRequest::ofTokenAndPassword($token, $newPassword)
```
Expand Down Expand Up @@ -960,19 +959,19 @@ Facet, Filter, FilterRange and FilterRangeCollection in namespace Commercetools\

### BREAKING CHANGES
* Changed named constructors for type update actions

Before:

```
TypeAddLocalizedEnumValueAction::ofEnum(...)
TypeAddEnumValueAction::ofEnum(...)
TypeChangeEnumValueOrderAction::ofEnums(...)
TypeChangeLocalizedEnumValueOrderAction::ofEnums(...)
TypeChangeLabelAction::ofLabel(...)
```

After:

```
TypeAddLocalizedEnumValueAction::ofNameAndEnum(...)
TypeAddEnumValueAction::ofNameAndEnum(...)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# <img src="build/theme/resources/CT_cube_200px.png" width="40" align="center"></img> commercetools PHP SDK
# <img src="build/theme/resources/CT_cube_200px.png" width="40" align="center"></img> Composable Commerce PHP SDK

:warning: **This commercetools PHP SDK is in its Active Support mode currently, and is planned to be deprecated, please note the following dates.
:warning: **This Composable Commerce PHP SDK is in its Active Support mode currently, and is planned to be deprecated, please note the following dates.

| Active Support | Maintenance Support | End of Life |
| --------------------- | --------------------- | --------------------- |
Expand All @@ -10,7 +10,7 @@ We recommend to use our [PHP SDK V2](https://docs.commercetools.com/sdk/php-sdk#

[![Build Status](https://img.shields.io/travis/com/commercetools/commercetools-php-sdk/master.svg?style=flat-square)](https://travis-ci.com/commercetools/commercetools-php-sdk) [![Scrutinizer](https://img.shields.io/scrutinizer/g/commercetools/commercetools-php-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/commercetools/commercetools-php-sdk/) [![Scrutinizer](https://img.shields.io/scrutinizer/coverage/g/commercetools/commercetools-php-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/commercetools/commercetools-php-sdk/) [![Packagist](https://img.shields.io/packagist/v/commercetools/php-sdk.svg?style=flat-square)](https://packagist.org/packages/commercetools/php-sdk) [![Packagist](https://img.shields.io/packagist/dm/commercetools/php-sdk.svg?style=flat-square)](https://packagist.org/packages/commercetools/php-sdk)

The PHP SDK allows developers to build applications on the commercetools platform (technically speaking against our REST API) using PHP native interfaces, models and helpers instead of manually using the HTTP and JSON API.
The PHP SDK allows developers to integrate with Composable Commerce APIs using PHP native interfaces, models and helpers instead of manually using the HTTP and JSON API.

You gain lots of IDE Auto-Completion, type checks on a literal API, Warnings, Object Mapping, i18n support etc.. The Client manages the OAuth2 security tokens, provides caches and interfaces for concurrent and asynchronous API calls.

Expand Down Expand Up @@ -70,7 +70,7 @@ Please read the [Changelog](CHANGELOG.md) before updating in any case.

### Getting started

To get up and running, create a free test project ([EU located](https://mc.commercetools.com/login/new) or [US located](https://mc.commercetools.co/login/new)) on the commercetools platform. To generate your API credentials go to [EU Merchant Center](https://mc.commercetools.com/) or [US Merchant Center](https://mc.commercetools.co/) (Menu "Settings"->"Developer Settings"->"API Clients"->"Create New Api Client").
To get up and running, create a free test [Project](https://mc.commercetools.com/login/new) on Composable Commerce. You can create your first API Client in [The Merchant Center](https://mc.commercetools.com/) (Menu "Settings"->"Developer settings"->"Create new API client").
You need to select the template for the "Admin client".

```php
Expand Down Expand Up @@ -234,7 +234,7 @@ $client = ClientFactory::of()->createClient($config, $logger, $cache);

#### Middlewares

Adding middlewares to the clients for platform as well for the authentication can be done using the config
Adding middlewares to the clients for Composable Commerce as well for the authentication can be done using the config
by setting client options.

For using a custom HandlerStack
Expand Down Expand Up @@ -344,7 +344,7 @@ $response = $client->execute($request);
$project = $request->mapFromResponse($response);
var_dump($project->toArray());
```

## Improve & Contribute to the SDK project

### Mac OS X preparations:
Expand Down Expand Up @@ -419,7 +419,7 @@ Now you can enable at Preferences > Editor > Inspections > PHP the "PHP code sni

### Running integration tests

For running the integration tests you need an empty commercetools project and have to create an API client using the commercetools Merchant Center with the scopes:
For running the integration tests you need an empty Project and have to create an API client using the commercetools Merchant Center with the scopes:
```
manage_project
view_orders
Expand Down
2 changes: 1 addition & 1 deletion build/theme/@layout.latte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="{='resources/ct-logo.svg'|staticFile}" id="navbar-logo" alt="commercetools platform PHP SDK">{if $config->title}{$config->title} {getenv('SDK_VERSION')}{else}Overview{/if}</a>
<a href="index.html" class="navbar-brand"><img src="{='resources/ct-logo.svg'|staticFile}" id="navbar-logo" alt="Composable Commerce PHP SDK">{if $config->title}{$config->title} {getenv('SDK_VERSION')}{else}Overview{/if}</a>
</div>
<div class="collapse navbar-collapse">

Expand Down
2 changes: 1 addition & 1 deletion docroot/factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
?>
<html>
<head>
<title>Commercetools PHP SDK example</title>
<title>Composable Commerce PHP SDK example</title>
</head>
<body>
<form method="POST" action=".">
Expand Down
2 changes: 1 addition & 1 deletion docroot/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
?>
<html>
<head>
<title>Commercetools PHP SDK example</title>
<title>Composable Commerce PHP SDK example</title>
</head>
<body>
<form method="POST" action=".">
Expand Down
6 changes: 3 additions & 3 deletions docroot/myapp.yml.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
client_id: Your Commercetools client ID
client_secret: Your Commercetools client secret
project: Your Commercetools project key
client_id: Your Composable Commerce client ID
client_secret: Your Composable Commerce client secret
project: Your Composable Commerce project key
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "commercetools-php-sdk-changelog",
"version": "2.19.0",
"description": "commercetools PHP SDK changelog generator package description",
"description": "Composable Commerce PHP SDK changelog generator package description",
"homepage": "https://github.com/commercetools/commercetools-php-sdk",
"bugs": "https://github.com/commercetools/commercetools-php-sdk/issues",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/Commons/Helper/PriceFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Commercetools\Core\Model\CustomerGroup\CustomerGroupReference;

/**
* @deprecated Please use the price selection functionality of the platform
* @deprecated Please use the price selection functionality of Composable Commerce
* @link http://docs.commercetools.com/http-api-projects-products.html#price-selection
*/
class PriceFinder
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use function GuzzleHttp\Psr7\stream_for;

/**
* The client for communicating with the commercetools platform
* The client for communicating with Composable Commerce
*
* @description
* ## Instantiation
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Client/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
use Psr\SimpleCache\CacheInterface;

/**
* The factory to create a Client for communicating with the commercetools platform
* The factory to create a Client for communicating with Composable Commerce
*
* @description
* This factory will create a Guzzle HTTP Client preconfigured for talking to the commercetools platform
* This factory will create a Guzzle HTTP Client preconfigured for talking to Composable Commerce
*
* ## Instantiation
*
Expand Down Expand Up @@ -137,7 +137,7 @@
*
* ## Middlewares
*
* Adding middlewares to the clients for platform as well for the authentication can be done using the config
* Adding middlewares to the clients for Composable Commerce as well for the authentication can be done using the config
* by setting client options.
*
* ### Using a HandlerStack
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Error/ConcurrentModificationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Exeption for response with status code 409
* @package Commercetools\Core\Error
* @description
* When trying to update a resource with a version which differs from the version stored at the commercetools
* platform the API will respond with status code 409.
* When trying to update a resource with a version which differs from the version stored on Composable Commerce,
* the API will respond with status code 409.
*/
class ConcurrentModificationException extends ClientErrorException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Error/ServiceUnavailableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Exception for response with status code 503
* @package Commercetools\Core\Error
* @description
* The commercetools platform is currently not available
* Composable Commerce is currently not available
*/
class ServiceUnavailableException extends ServerErrorException
{
Expand Down
8 changes: 4 additions & 4 deletions src/Core/Request/Orders/Command/OrderAddDeliveryAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function ofDeliveryItems(DeliveryItemCollection $items, $context =
}

/**
* @deprecated not supported by platform - will be removed in 3.0
* @deprecated not supported by Composable Commerce - will be removed in 3.0
* @return null
*/
public function getMeasurements()
Expand All @@ -71,7 +71,7 @@ public function getMeasurements()
}

/**
* @deprecated not supported by platform - will be removed in 3.0
* @deprecated not supported by Composable Commerce - will be removed in 3.0
* @return OrderAddDeliveryAction
*/
public function setMeasurements()
Expand All @@ -80,7 +80,7 @@ public function setMeasurements()
}

/**
* @deprecated not supported by platform - will be removed in 3.0
* @deprecated not supported by Composable Commerce - will be removed in 3.0
* @return null
*/
public function getTrackingData()
Expand All @@ -89,7 +89,7 @@ public function getTrackingData()
}

/**
* @deprecated not supported by platform - will be removed in 3.0
* @deprecated not supported by Composable Commerce - will be removed in 3.0
* @return OrderAddDeliveryAction
*/
public function setTrackingData()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(array $data = [], $context = null)
}

/**
* @deprecated not supported by platform - will be removed in 3.0
* @deprecated not supported by Composable Commerce - will be removed in 3.0
* @return null
*/
public function getStaged()
Expand All @@ -47,7 +47,7 @@ public function getStaged()
}

/**
* @deprecated not supported by platform - will be removed in 3.0
* @deprecated not supported by Composable Commerce - will be removed in 3.0
* @return ProductSetTaxCategoryAction
*/
public function setStaged()
Expand Down
6 changes: 3 additions & 3 deletions tests/myapp.yml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
client_id: Your Commercetools client ID
client_secret: Your Commercetools client secret
project: Your Commercetools project key
client_id: Your Composable Commerce client ID
client_secret: Your Composable Commerce client secret
project: Your Composable Commerce Project key
oauth_url: https://auth.europe-west1.gcp.commercetools.com
api_url: https://api.europe-west1.gcp.commercetools.com
enableCorrelationId: 1