Skip to content

Commit

Permalink
Merge pull request #26 from phansys/dx
Browse files Browse the repository at this point in the history
DX improvements
  • Loading branch information
allmightyspiff authored Nov 2, 2022
2 parents e9c20d4 + 3422f8c commit dfe76dd
Show file tree
Hide file tree
Showing 14 changed files with 3,045 additions and 336 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
.DS_Store
*.swp
Thumbs.db
.svn
._*
/vendor/
70 changes: 70 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

$header = <<<'EOF'
Copyright (c) 2009 - 2010, SoftLayer Technologies, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither SoftLayer Technologies, Inc. nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
EOF;

// Use PHP-CS-Fixer 2+ if it is available
if (\class_exists('PhpCsFixer\Config', false)) {
return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules(array(
'@Symfony' => true,
'array_syntax' => array('syntax' => 'long'),
'binary_operator_spaces' => array(
'align_double_arrow' => false,
'align_equals' => false,
),
'blank_line_after_opening_tag' => true,
'header_comment' => array('header' => $header),
'ordered_imports' => true,
'php_unit_construct' => true,
))
->setFinder(
PhpCsFixer\Finder::create()->in(__DIR__)
)
;
}

Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);

return Symfony\CS\Config\Config::create()
->setUsingCache(true)
->fixers(array(
'newline_after_open_tag',
'ordered_use',
'php_unit_construct',
'long_array_syntax',
'unalign_double_arrow',
'unalign_equals',
))
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__)
)
;
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: php
warnings_are_errors: false

env:
global:
- PATH="$HOME/.composer/vendor/bin:$PATH"

matrix:
fast_finish: true
include:
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.0
- php: 7.1
- php: 7.2

sudo: false

cache:
directories:
- $HOME/.composer/cache

before_script:
- if [[ $TRAVIS_PHP_VERSION != hhvm && -f xdebug.ini ]]; then phpenv config-rm xdebug.ini; fi
- if [ "$GITHUB_OAUTH_TOKEN" != "" ]; then echo -e $GITHUB_OAUTH_TOKEN && composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN; fi;
- COMPOSER_MEMORY_LIMIT=-1 composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script:
- vendor/bin/phpunit -c phpunit.xml.dist
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# A SoftLayer API PHP client.

[![Build Status](https://travis-ci.org/softlayer/softlayer-api-php-client.svg?branch=master)](https://travis-ci.org/softlayer/softlayer-api-php-client)

## Warning

```
Expand All @@ -19,7 +21,7 @@ Making API calls using the `\SoftLayer\SoapClient` or `\SoftLayer\XmlRpcClient`

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.

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

## System Requirements

Expand Down
14 changes: 13 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"require": {
"php": ">=5.3",
"php": "^5.3|^7.0",
"ext-xmlrpc": "*",
"ext-soap": "*"
},
Expand All @@ -20,9 +20,21 @@
"SoftLayer\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"SoftLayer\\Tests\\": "tests/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"config": {
"sort-packages": true
}
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^1.13|^2.0",
"phpunit/phpunit": "^5.4.3|^6.0|^7.0"
}
}
Loading

0 comments on commit dfe76dd

Please sign in to comment.