Skip to content

Commit 8afd99b

Browse files
Merge pull request #29 from softlayer/php8.1.12
Php8.1.12 support
2 parents dfe76dd + 3d36916 commit 8afd99b

File tree

11 files changed

+2379
-1036
lines changed

11 files changed

+2379
-1036
lines changed

.github/workflows/test.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build-test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: php-actions/composer@v6 # or alternative dependency management
12+
with:
13+
php_version: '8.1'
14+
php_extensions: 'soap'
15+
- uses: php-actions/phpunit@v3
16+
with:
17+
php_version: '8.1'
18+
php_extensions: 'soap'
19+
- uses: actions/upload-artifact@v2
20+
with:
21+
name: debug-output
22+
path: output.log

.travis.yml

-30
This file was deleted.

README.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
11
# A SoftLayer API PHP client.
22

3-
[![Build Status](https://travis-ci.org/softlayer/softlayer-api-php-client.svg?branch=master)](https://travis-ci.org/softlayer/softlayer-api-php-client)
3+
![Build Status](https://github.com/softlayer/softlayer-api-php-client/actions/workflows/test.yml/badge.svg)
44

55
## Warning
66

7-
```
8-
The latest version 1.x is not backwards-compatible.
9-
It is necessary to update scripts to function properly with the new version.
10-
```
7+
Use [v1.2.0](https://github.com/softlayer/softlayer-api-php-client/releases/tag/v1.2) for older PHP versions (php < 8.0) . [v2.0.0](https://github.com/softlayer/softlayer-api-php-client/releases/tag/v2.0.0) for php 8.0 or higher.
8+
9+
[PHP 8.0 removed XMLRPC](https://php.watch/versions/8.0/xmlrpc) as a built in extension. As such, it is no longer required as part of the composer file in this project. The XmlRpcClient still exists here if you need it, but we assume most users are using the SoapClient. If there are any issues with this [Let us know on github](https://github.com/softlayer/softlayer-api-php-client/issues)
1110

1211
## Overview
1312

1413
The SoftLayer API PHP client classes provide a simple method for connecting to and making calls from the SoftLayer API and provides support for many of the SoftLayer API's features. Method calls and client management are handled by the PHP SOAP and XML-RPC extensions.
1514

16-
Making API calls using the `\SoftLayer\SoapClient` or `\SoftLayer\XmlRpcClient` classes is done in the following steps:
15+
Making API calls using the `\SoftLayer\SoapClient` is done in the following steps:
1716

18-
1. Instantiate a new `\SoftLayer\SoapClient` or `\SoftLayer\XmlRpcClient` object using the `\SoftLayer\SoapClient::getClient()` or `\SoftLayer\XmlRpcClient::getClient()` methods. Provide the name of the service that you wish to query, an optional id number of the object that you wish to instantiate, your SoftLayer API username, your SoftLayer API key, and an optional API endpoint base URL. The client classes default to connect over the public Internet. Enter `\SoftLayer\SoapClient::API_PRIVATE_ENDPOINT` or `\SoftLayer\XmlRpcClient::API_PRIVATE_ENDPOINT` to connect to the API over SoftLayer's private network. The system making API calls must be connected to SoftLayer's private network (eg. purchased from SoftLayer or connected via VPN) in order to use the private network API endpoints.
19-
2. Define and add optional headers to the client, such as object masks and result limits.
20-
3. Call the API method you wish to call as if it were local to your client object. This class throws exceptions if it's unable to execute a query, so it's best to place API method calls in try / catch statements for proper error handling.
17+
1. Instantiate a new `\SoftLayer\SoapClient` object using the `\SoftLayer\SoapClient::getClient()` method. Provide the name of the service that you wish to query, an optional id number of the object that you wish to instantiate, your SoftLayer API username, your SoftLayer API key, and an optional API endpoint base URL. The client classes default to connect over the public Internet.
18+
2. Use `\SoftLayer\SoapClient::API_PRIVATE_ENDPOINT` to connect to the API over SoftLayer's private network. The system making API calls must be connected to SoftLayer's private network (eg. purchased from SoftLayer or connected via VPN) in order to use the private network API endpoints.
19+
3. Define and add optional headers to the client, such as object masks and result limits.
20+
4. Call the API method you wish to call as if it were local to your client object. This class throws exceptions if it's unable to execute a query, so it's best to place API method calls in try / catch statements for proper error handling.
2121

2222
Once your method is executed you may continue using the same client if you need to connect to the same service or define another client object if you wish to work with multiple services at once.
2323

24-
The most up to date version of this library can be found on the SoftLayer github public repositories: [http://github.com/softlayer/](http://github.com/softlayer/) . Please post to the SoftLayer forums [Stack Overflow](https://stackoverflow.com) or open a support ticket in the SoftLayer customer portal if you have any questions regarding use of this library. If you use Stack Overflow please tag your posts with “SoftLayer” so our team can easily find your post.
24+
25+
The most up to date version of this library can be found on the SoftLayer github public repositories: [https://github.com/softlayer/softlayer-api-php-client](https://github.com/softlayer/softlayer-api-php-client) . Any issues using this library, please open a [Github Issue](https://github.com/softlayer/softlayer-api-php-client/issues)
26+
2527

2628
## System Requirements
2729

28-
The `\SoftLayer\SoapClient` class requires at least PHP 5.3.0 and the PHP SOAP enxtension installed. The `\SoftLayer\XmlRpcClient` class requires PHP at least PHP 5 and the PHP XML-RPC extension installed.
30+
The `\SoftLayer\SoapClient` class requires at least PHP 8.0.0 and the PHP SOAP enxtension installed and enabled (`extension=soap` in the php.ini file).
31+
Since [php 8.0 has removed xmlrpc extension](https://php.watch/versions/8.0/xmlrpc) you will need to manually install this library to use the `\SoftLayer\XmlRpcClient`. If you are using an earlier version of php that still includes ext-xml, please use v1.2.0 of this library.
2932

30-
A valid API username and key are required to call the SoftLayer API. A connection to the SoftLayer private network is required to connect to SoftLayer's private network API endpopints.
33+
A valid API username and key are required to call the SoftLayer API. A connection to the SoftLayer private network is required to connect to SoftLayer's private network API endpopints. See [Authenticating to the SoftLayer API](https://sldn.softlayer.com/article/authenticating-softlayer-api/) for how to get these API keys.
3134

3235
## Installation
3336

3437
Install the SoftLayer API client using [Composer](https://getcomposer.org/).
3538
```bash
36-
composer require softlayer/softlayer-api-php-client:~1.0@dev
39+
composer require softlayer/softlayer-api-php-client:~2.0.0
3740
```
3841

3942
## Usage
@@ -107,4 +110,4 @@ This software is written by the SoftLayer Development Team <[[email protected]]
107110

108111
## Copyright
109112

110-
This software is Copyright &copy; 2009 – 2010 [SoftLayer Technologies, Inc](http://www.softlayer.com/). See the bundled LICENSE.textile file for more information.
113+
This software is Copyright &copy; 2009 – 2022 [SoftLayer Technologies, Inc](http://www.softlayer.com/). See the bundled LICENSE.textile file for more information.

composer.json

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "softlayer/softlayer-api-php-client",
33
"description": "SoftLayer API PHP client",
44
"keywords": ["softlayer"],
5-
"homepage": "http://sldn.softlayer.com/article/PHP",
5+
"homepage": "https://sldn.softlayer.com/php/",
66
"license": "MIT",
77
"authors": [
88
{
@@ -11,8 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^5.3|^7.0",
15-
"ext-xmlrpc": "*",
14+
"php": ">=8.0",
1615
"ext-soap": "*"
1716
},
1817
"autoload": {
@@ -26,15 +25,12 @@
2625
}
2726
},
2827
"extra": {
29-
"branch-alias": {
30-
"dev-master": "1.0-dev"
31-
},
3228
"config": {
3329
"sort-packages": true
3430
}
3531
},
3632
"require-dev": {
37-
"friendsofphp/php-cs-fixer": "^1.13|^2.0",
38-
"phpunit/phpunit": "^5.4.3|^6.0|^7.0"
33+
"friendsofphp/php-cs-fixer": ">=3.13.0",
34+
"phpunit/phpunit": ">=9.0"
3935
}
4036
}

0 commit comments

Comments
 (0)