You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
> STATUS: Release Candidate 1. We have done all planned breaking changes and ask you to really use this API thoroughly now, especially the API design and object structure. Thank you very much!
5
-
>
6
-
> See the [Milestone Plan](https://github.com/sphereio/sphere-php-sdk/milestones?direction=desc&sort=completeness&state=open) for details of what's planned in detail. We love feedback and [Issue reports](https://github.com/sphereio/sphere-php-sdk/issues?q=is%3Aopen+is%3Aissue+sort%3Acreated-asc)!
3
+
> STATUS: Release Candidate 1. We have done all planned breaking changes and ask you to really use this API thoroughly now, especially the API design and object structure. Thank you very much!
4
+
>
5
+
> See the [Milestone Plan](https://github.com/sphereio/commercetools-php-sdk/milestones?direction=desc&sort=completeness&state=open) for details of what's planned in detail. We love feedback and [Issue reports](https://github.com/sphereio/commercetools-php-sdk/issues?q=is%3Aopen+is%3Aissue+sort%3Acreated-asc)!
6
+
> Up-to-Date planning status can be found on this [Waffle Board](https://waffle.io/sphereio/commercetools-php-sdk)
The PHP SDK allows developers to build applications on the SPHERE.IO REST API 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..
11
-
It also manages the OAuth2 security, provides caches and an interface for concurrent and asynchronous API calls.
10
+
The PHP SDK allows developers to build applications on the commercetools platform (technically speaking against the SPHERE.IO REST API) using PHP native interfaces, models and helpers instead of manually using the HTTP and JSON API.
11
+
12
+
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.
12
13
13
14
The SDK is licensed under the permissive [MIT License](LICENSE). Don't hesitate to [contribute](#contribute)!
14
15
15
16
16
17
## Using the SDK
17
18
18
-
The [PHP API documentation](http://sphereio.github.io/sphere-php-sdk/docs/master) provides all the details you need in a searchable form (link points to latest stable release).
19
+
The [PHP API documentation](http://sphereio.github.io/commercetools-php-sdk/docs/master) provides all the details you need in a searchable form (link points to latest stable release).
19
20
20
21
### Install & Integrate the SDK into your Project
21
22
@@ -36,13 +37,26 @@ Next, run the Composer command to install the latest version of the SDK:
36
37
composer require sphere/php-sdk dev-master
37
38
```
38
39
40
+
The SDK supports Guzzle6 as well as Guzzle5 as HTTP client. For Guzzle6:
41
+
42
+
```bash
43
+
composer require guzzlehttp/guzzle ^6.0
44
+
```
45
+
46
+
When you want to use Guzzle5 you have to add additionally the log subscriber:
47
+
48
+
```bash
49
+
composer require guzzlehttp/guzzle ^5.0
50
+
composer require guzzlehttp/log-subscriber ^1.0
51
+
```
52
+
39
53
After installing, you need to require Composer's autoloader if that's not yet the case:
40
54
41
55
```php
42
56
require 'vendor/autoload.php';
43
57
```
44
58
45
-
If you don't use Composer, just [download a zip archive](https://github.com/sphereio/sphere-php-sdk/archive/master.zip) of the latest release, manually integrate it and configure your own autoloader.
59
+
If you don't use Composer, just [download a zip archive](https://github.com/sphereio/commercetools-php-sdk/archive/master.zip) of the latest release, manually integrate it and configure your own autoloader.
46
60
47
61
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.
48
62
@@ -52,15 +66,15 @@ Please read the [Changelog](CHANGELOG.md) before updating in any case.
52
66
53
67
### Getting started
54
68
55
-
To get up and running, [create a free test project](http://admin.sphere.io)to get a SPHERE project with API credentials (Menu "Developers"->"API Clients").
69
+
To get up and running, [create a free test project](http://admin.sphere.io)on the commercetools platform with API credentials (Menu "Developers"->"API Clients").
56
70
57
71
```php
58
72
<?php
59
73
60
74
require '../vendor/autoload.php';
61
75
62
-
use Sphere\Core\Request\Products\ProductProjectionSearchRequest;
63
-
use Sphere\Core\Client;
76
+
use Commercetools\Core\Request\Products\ProductProjectionSearchRequest;
77
+
use Commercetools\Core\Client;
64
78
65
79
$config = [
66
80
'client_id' => 'my client id',
@@ -114,22 +128,22 @@ php composer.phar update
114
128
```
115
129
116
130
### Linux preparations :
117
-
* install php 5.4+, apc(u), xdebug and ant according to their distro's package system.
131
+
* install php 5.4+, apc(u), xdebug and ant according to their distro's package system.
118
132
* make sure the curl, intl, mbstring, apcu and openssl extensions are activated in php.ini
119
133
120
134
### Windows preparations:
121
135
*[install php](http://windows.php.net/download/) 5.4+, 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).
122
136
* enable the curl, intl, mbstring and openssl extenstions in php.ini
123
137
*[install apcu](http://robert-rusu.blogspot.de/2014/06/install-apcu-on-windows.html) OR a redis extension and server
124
-
* make a working ant available in the PATH
125
-
* and [install composer](https://getcomposer.org/doc/00-intro.md#installation-windows).
138
+
* make a working ant available in the PATH
139
+
* and [install composer](https://getcomposer.org/doc/00-intro.md#installation-windows).
126
140
127
141
### Start working:
128
142
129
143
Clone the develop branch of the repository (we're using the [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) branching model, so master is for releases only):
Please follow the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style, ideally via your IDE settings (see below for phpStorm instructions).
@@ -145,7 +159,7 @@ ant
145
159
You can use the `docroot` directory with the built-in PHP web server. Add to the docroot directory a file called "myapp.ini". Add following content and setup with your API credentials:
0 commit comments