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

Commit e0c17c7

Browse files
author
ct-jensschulze
committed
Merge pull request #138 from sphereio/organisation_change
Namespace change to commercetools
2 parents 61fb856 + 971cfbf commit e0c17c7

File tree

672 files changed

+4036
-4014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

672 files changed

+4036
-4014
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# <img src="build/theme/resources/CT_cube_200px.png" width="40" align="center"></img> commercetools PHP SDK
22

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-
>
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+
>
55
> 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)!
66
> Up-to-Date planning status can be found on this [Waffle Board](https://waffle.io/sphereio/sphere-php-sdk)
77
88
[![Build Status](https://img.shields.io/travis/sphereio/sphere-php-sdk/master.svg?style=flat-square)](https://travis-ci.org/sphereio/sphere-php-sdk) [![Scrutinizer](https://img.shields.io/scrutinizer/g/sphereio/sphere-php-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/sphereio/sphere-php-sdk/) [![Scrutinizer](https://img.shields.io/scrutinizer/coverage/g/sphereio/sphere-php-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/sphereio/sphere-php-sdk/) [![Packagist](https://img.shields.io/packagist/v/sphere/php-sdk.svg?style=flat-square)](https://packagist.org/packages/sphere/php-sdk) [![Packagist](https://img.shields.io/packagist/dm/sphere/php-sdk.svg?style=flat-square)](https://packagist.org/packages/sphere/php-sdk)
99

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.
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.
1111

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+
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.
1313

1414
The SDK is licensed under the permissive [MIT License](LICENSE). Don't hesitate to [contribute](#contribute)!
1515

@@ -73,8 +73,8 @@ To get up and running, [create a free test project](http://admin.sphere.io) on t
7373

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

76-
use Sphere\Core\Request\Products\ProductProjectionSearchRequest;
77-
use Sphere\Core\Client;
76+
use Commercetools\Core\Request\Products\ProductProjectionSearchRequest;
77+
use Commercetools\Core\Client;
7878

7979
$config = [
8080
'client_id' => 'my client id',
@@ -128,15 +128,15 @@ php composer.phar update
128128
```
129129

130130
### Linux preparations :
131-
* 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.
132132
* make sure the curl, intl, mbstring, apcu and openssl extensions are activated in php.ini
133133

134134
### Windows preparations:
135135
* [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).
136136
* enable the curl, intl, mbstring and openssl extenstions in php.ini
137137
* [install apcu](http://robert-rusu.blogspot.de/2014/06/install-apcu-on-windows.html) OR a redis extension and server
138-
* make a working ant available in the PATH
139-
* 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).
140140

141141
### Start working:
142142

@@ -159,7 +159,7 @@ ant
159159
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:
160160

161161
```ini
162-
[sphere]
162+
[commercetools]
163163
client_id = 'my client id'
164164
client_secret = 'my client secret'
165165
project = 'my project id'

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="sphere-php-sdk" default="build">
2+
<project name="commercetools-php-sdk" default="build">
33
<!-- By default, we assume all tools to be on the $PATH -->
44
<property name="toolsdir" value="vendor/bin/"/>
55

build/theme/overview.latte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<div class="element-list container-fluid">
1414
<div class="row">
1515
<div class="col-md-3">
16-
<a class="btn btn-default btn-lg btn-block lead" href="class-Sphere.Core.Client.html" role="button">Client</a>
16+
<a class="btn btn-default btn-lg btn-block lead" href="class-Commercetools.Core.Client.html" role="button">Client</a>
1717
</div>
1818
<div class="col-md-3">
19-
<a class="btn btn-default btn-lg btn-block lead" href="class-Sphere.Core.Config.html" role="button">Config</a>
19+
<a class="btn btn-default btn-lg btn-block lead" href="class-Commercetools.Core.Config.html" role="button">Config</a>
2020
</div>
2121
<div class="col-md-3">
22-
<a class="btn btn-default btn-lg btn-block lead" href="class-Sphere.Core.Model.Common.Context.html" role="button">Context</a>
22+
<a class="btn btn-default btn-lg btn-block lead" href="class-Commercetools.Core.Model.Common.Context.html" role="button">Context</a>
2323
</div>
2424
</div>
2525
</div>

composer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "sphere/php-sdk",
2+
"name": "commercetools/php-sdk",
33
"license": "MIT",
44
"type": "project",
55
"description": "The commercetools PHP SDK \n The official PHP Interface to the commercetools eCommerce API",
@@ -12,12 +12,12 @@
1212
},
1313
"autoload": {
1414
"psr-4": {
15-
"Sphere\\Core\\": "src/"
15+
"Commercetools\\Core\\": "src/"
1616
}
1717
},
1818
"autoload-dev": {
1919
"psr-4": {
20-
"Sphere\\Core\\": [
20+
"Commercetools\\Core\\": [
2121
"tests/unit/",
2222
"tests/integration/"
2323
]
@@ -45,7 +45,5 @@
4545
"behat/behat": "^3.0",
4646
"phpspec/prophecy-phpunit": "^1.0",
4747
"phpunit/phpcov": "*"
48-
},
49-
"suggest": {
5048
}
5149
}

docroot/annotations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* @author @ct-jensschulze <[email protected]>
44
*/
55

6-
namespace Sphere\Core;
6+
namespace Commercetools\Core;
77

8-
use Sphere\Core\Helper\Annotate\AnnotationGenerator;
8+
use Commercetools\Core\Helper\Annotate\AnnotationGenerator;
99

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

docroot/index.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
* @author @ct-jensschulze <[email protected]>
44
* @created: 04.02.15, 13:31
55
*/
6-
namespace Sphere\Core;
6+
namespace Commercetools\Core;
77

88
use Monolog\Handler\StreamHandler;
99
use Monolog\Logger;
10-
use Sphere\Core\Model\Common\Context;
11-
use Sphere\Core\Model\Product\ProductProjection;
12-
use Sphere\Core\Model\Product\ProductProjectionCollection;
13-
use Sphere\Core\Request\Products\ProductProjectionSearchRequest;
10+
use Commercetools\Core\Model\Common\Context;
11+
use Commercetools\Core\Model\Product\ProductProjection;
12+
use Commercetools\Core\Model\Product\ProductProjectionCollection;
13+
use Commercetools\Core\Request\Products\ProductProjectionSearchRequest;
1414

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

1717
$appConfig = parse_ini_file('myapp.ini', true);
1818

1919
$context = Context::of()->setLanguages(['en'])->setGraceful(true);
2020

21-
// create the sphere config object
22-
$config = new Config();
23-
$config->fromArray($appConfig['sphere'])->setContext($context);
21+
// create the api client config object
22+
$config = Config::fromArray($appConfig['commercetools'])->setContext($context);
2423

2524
/**
2625
* create search request
@@ -35,7 +34,7 @@
3534
$log = new Logger('name');
3635
$log->pushHandler(new StreamHandler('./requests.log'));
3736

38-
$client = new Client($config, null, $log);
37+
$client = Client::ofConfigAndLogger($config, $log);
3938

4039
$products = $client->execute($request)->toObject();
4140

@@ -45,7 +44,7 @@
4544
?>
4645
<html>
4746
<head>
48-
<title>Sphere PHP SDK example</title>
47+
<title>Commercetools PHP SDK example</title>
4948
</head>
5049
<body>
5150
<form method="POST" action=".">

0 commit comments

Comments
 (0)