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.
> WARNING: As of now, this is a pre-release partial implementation.
5
-
> See the [Milestone Plan](https://github.com/sphereio/sphere-php-sdk/milestones?direction=desc&sort=completeness&state=open) for details of what's planned. We love feedback and [Issue reports](https://github.com/sphereio/sphere-php-sdk/issues?q=is%3Aopen+is%3Aissue+sort%3Acreated-asc)!
4
+
> STATUS: technically robust beta version, but we do not yet guarantee API compatibility until the 1.0.0 release. Please take your time to thoroughly test the upcoming RC (Milestone 4) release.
5
+
> 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)!
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. Users gain lots of IDE Auto-Completion and type checks on a literal API.
9
+
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..
10
10
It also manages the OAuth2 security, provides caches and an interface for concurrent and asynchronous API calls.
11
11
12
12
The SDK is licensed under the permissive [MIT License](LICENSE). Don't hesitate to [contribute](#contribute)!
13
13
14
-
## Install / Integrate into your Project
14
+
## Install & Integrate the SDK into your Project
15
15
16
16
The SDK requires a PHP version of 5.4 or higher with the apc(u) PHP extension for its default cache. If you provide an own Cache interface, apc(u) is not necessary. 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.
Next, run the Composer command to install the latest version of the SDK:
26
26
27
27
```bash
28
-
composer require sphere/php-sdk
28
+
composer require sphere/php-sdk dev-master
29
29
```
30
30
31
31
After installing, you need to require Composer's autoloader if that's not yet the case:
@@ -34,7 +34,7 @@ After installing, you need to require Composer's autoloader if that's not yet th
34
34
require 'vendor/autoload.php';
35
35
```
36
36
37
-
If you don't use Composer, just [download a zip archive](archive/master.zip) of the latest release, manually integrate it and configure your own autoloader.
37
+
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.
38
38
39
39
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.
40
40
@@ -44,6 +44,8 @@ Please read the [Changelog](CHANGELOG.md) before updating in any case.
44
44
45
45
## Use the SDK
46
46
47
+
The [PHP API documentation](http://sphereio.github.io/sphere-php-sdk/docs/master) provides all the details you need in a searchable form.
48
+
47
49
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").
* show result (would be a view layer in real world)
77
+
*/
78
+
header('Content-Type: text/html; charset=utf-8');
79
+
73
80
foreach ($products as $product) {
74
81
echo $product->getName()->en . '<br/>';
75
82
}
@@ -79,9 +86,7 @@ foreach ($products as $product) {
79
86
80
87
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.
81
88
82
-
The [API documentation](http://sphereio.github.io/sphere-php-sdk/docs/master) provides all the details you need in a searchable form.
83
-
84
-
## Develop and Improve
89
+
## Improve & Contribute to the SDK project
85
90
86
91
prepare your development environment (if necessary).
87
92
@@ -93,6 +98,7 @@ brew tap homebrew/dupes
93
98
brew tap homebrew/versions
94
99
brew tap homebrew/homebrew-php
95
100
brew install php55
101
+
brew install php55-intl
96
102
brew install php55-apcu
97
103
brew install php55-xdebug
98
104
brew install ant
@@ -144,7 +150,7 @@ To enable code style checks directly in phpStorm you have to configure the path
144
150
Now you can enable at Preferences > Editor > Inspections > PHP the "PHP code sniffer validation" with PSR-2 standard. Change the severity if needed.
145
151
146
152
147
-
## <aname="contribute"></a>Contribute
153
+
###<aname="contribute"></a>Contribute
148
154
149
155
On bigger effort changes, please open a GitHub [issue](issues) and ask if you can help or get help with your idea. For typos and documentation improvements just make a pull request.
0 commit comments