Skip to content

Commit

Permalink
Merge pull request #35 from esendex/ORI-628_GetSdkBuildWorkingphp74
Browse files Browse the repository at this point in the history
ORI-628 - Get SDK build working on PHP 7.4
  • Loading branch information
tomrowsell86 authored Feb 17, 2021
2 parents df29415 + 5e9299b commit 85fc945
Show file tree
Hide file tree
Showing 35 changed files with 1,748 additions and 632 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: php
dist: trusty
php:
- 7.0
- 5.6
- 5.5
- 5.4
- 7.4
- 7.3
before_script:
- echo 'date.timezone = "Europe/London"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- composer install
Expand Down
21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Esendex PHP Client
## Installation

### Requirements
- PHP >= 5.3.0
- PHP >= 7.3
- ext-curl enabled

The **esendex-php-sdk** is available to install through several methods as well as from source.
Expand All @@ -14,7 +14,7 @@ The **esendex-php-sdk** is available to install through several methods as well
```json
{
"require": {
"esendex/sdk": "2.*.*"
"esendex/sdk": "3.*.*"
}
}
```
Expand All @@ -27,32 +27,21 @@ For installation on other platforms see [getcomposer.org](https://getcomposer.or

We're in the default [`Packagist`](http://packagist.org/packages/esendex/sdk) repository so just run
```bash
$ php composer.phar require esendex/sdk:2.*.*
$ php composer.phar require esendex/sdk:3.*.*
```
or add the package above to your *composer.json*

Then just include the generated *autoload.php* somewhere in your code;
Then just include Composer's generated *autoload.php* somewhere in your code;
```php5
require_once 'path/to/vendor/autoload.php';
```

#### PEAR
Our package requires version 1.9.3 or newer
```bash
$ pear config-set auto_discover 1
$ pear install esendex.github.com/pear/Esendex
```
We provide a PSR-0 autoloader you can use for your convenience;
```php5
require_once 'Esendex/autoload.php';
```

#### GZIP
Download the current version [here](http://downloads.esendex.com.s3-website-eu-west-1.amazonaws.com/esendex-php-sdk/latest.sdk)

Our autoloader may be included somewhere in your application;
```php5
require_once 'path/to/downloaded/Esendex/autoload.php';
require_once 'path/to/downloaded/sdk/src/Esendex/AutoLoad.php';
```

## Getting Started
Expand Down
14 changes: 10 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trigger:
- master

pool:
vmImage: ubuntu-default
vmImage: ubuntu-20.04

variables:
phpVersion: 7.4
Expand All @@ -23,6 +23,12 @@ steps:
displayName: 'Use PHP version $(phpVersion)'

- script: composer install --no-interaction --prefer-dist
displayName: 'composer install'
- script: vendor/bin/phing -verbose package
displayName: 'phing package'
displayName: 'composer update'
- script: vendor/bin/phing -verbose package
displayName: 'phing package'

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/build'
ArtifactName: 'drop'
publishLocation: 'Container'
16 changes: 0 additions & 16 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,6 @@

<echo message="Creating packages..."/>

<exec executable="php" dir="./build" checkreturn="true">
<arg file="./pear_generator.php"/>
<arg line="make"/>
</exec>

<echo message="Building PEAR package"/>
<exec executable="pear" dir="./build" checkreturn="true">
<arg line="package"/>
</exec>
<move todir="./build/pear">
<fileset dir="./build">
<include name="package.xml"/>
<include name="*.tgz"/>
</fileset>
</move>

<copy todir="./build/src">
<fileset dir="./build/Esendex">
<include name="**"/>
Expand Down
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"name": "esendex/sdk",
"description": "Send SMS from your application using the Esendex API",
"homepage": "http://developers.esendex.com",
"keywords": ["sms", "rest", "restful", "api", "requests"],
"keywords": [
"sms",
"rest",
"restful",
"api",
"requests"
],
"license": "BSD-3-Clause",
"authors": [
{
Expand All @@ -16,16 +22,17 @@
"source": "https://github.com/esendex/esendex-php-sdk"
},
"require": {
"php": ">=5.3",
"php": ">=7.3",
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "4.3.*",
"phing/phing": "2.*"
"phpunit/phpunit": "8.5.*",
"phing/phing": "2.*",
"pear/archive_tar": "1.4.*"
},
"autoload": {
"psr-0": {
"Esendex": "src/"
}
}
}
}
Loading

0 comments on commit 85fc945

Please sign in to comment.