Skip to content

Commit

Permalink
adding devtools, defining dependencies, fixing errors, fixing style, …
Browse files Browse the repository at this point in the history
…fixing risky tests (#1)

* adding devtools, defining dependencies, fixing errors, fixing style, fixing risky tests

* needed a commit to trigger travis, so adding settings.yml for probot app
  • Loading branch information
jaydiablo authored Apr 23, 2018
1 parent bcbbebe commit 25f345a
Show file tree
Hide file tree
Showing 39 changed files with 1,741 additions and 1,543 deletions.
10 changes: 10 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repository:
name: zf1-soap
private: false
has_issues: true
has_projects: true
has_wiki: true
has_downloads: true
default_branch: master
allow_squash_merge: true
allow_rebase_merge: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor
/composer.lock
/clover.xml
.php_cs.cache
22 changes: 22 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->files()
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@PHPUnit60Migration:risky' => true,
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'single_quote' => true,
'array_syntax' => ['syntax' => 'long'],
'concat_space' => ['spacing' => 'one'],
'psr0' => true
])
->setUsingCache(true)
->setFinder($finder);
;
60 changes: 60 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
language: php

sudo: false

php:
- 7
- 7.1
- 7.2
- nightly

env: TMPDIR=/tmp USE_XDEBUG=false

branches:
only:
master

install:
- phpenv rehash
- travis_retry composer install --no-interaction --prefer-source

stages:
- test
- style check
- phpstan analysis
- test with coverage

before_script:
- if [[ "$USE_XDEBUG" == false ]]; then phpenv config-rm xdebug.ini || return 0; fi

script:
- composer test

jobs:
fast_finish: true
allow_failures:
- php: nightly
include:
- stage: style check
php: 7.1
env: TMPDIR=/tmp USE_XDEBUG=false
script:
- composer style-check
- stage: phpstan analysis
php: 7.1
env: TMPDIR=/tmp USE_XDEBUG=false
script:
- composer phpstan
- stage: test with coverage
php: 7.1
env: TMPDIR=/tmp USE_XDEBUG=true CC_TEST_REPORTER_ID=40595993c5ec636e3100589a57536b40c7ef67c279ce5150472f92b4020b5284
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- composer test-with-coverage
after_success:
- bash <(curl -s https://codecov.io/bash) -f ./clover.xml
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
27 changes: 27 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2005-2015, Zend Technologies USA, 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 the name of Zend Technologies USA, 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.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Zend Framework 1 - Soap
============================
[![Build Status](https://travis-ci.org/diablomedia/zf1-soap.svg?branch=master)](https://travis-ci.org/diablomedia/zf1-soap)
[![codecov](https://codecov.io/gh/diablomedia/zf1-soap/branch/master/graph/badge.svg)](https://codecov.io/gh/diablomedia/zf1-soap)
[![Latest Stable Version](https://poser.pugx.org/diablomedia/zendframework1-soap/v/stable)](https://packagist.org/packages/diablomedia/zendframework1-soap)
[![Total Downloads](https://poser.pugx.org/diablomedia/zendframework1-soap/downloads)](https://packagist.org/packages/diablomedia/zendframework1-soap)
[![License](https://poser.pugx.org/diablomedia/zendframework1-soap/license)](https://packagist.org/packages/diablomedia/zendframework1-soap)

This is just the Zend_Soap component extracted from our fork of the Zend Framework 1 repo (https://github.com/diablomedia/zf1).
50 changes: 50 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "diablomedia/zendframework1-soap",
"description": "Zend Framework 1 Soap component",
"type": "library",
"keywords": [
"framework",
"zf1"
],
"homepage": "http://framework.zend.com/",
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"diablomedia/zendframework1-config": "^1.0.0",
"diablomedia/zendframework1-exception": "^1.0.0",
"diablomedia/zendframework1-server": "^1.0.0",
"diablomedia/zendframework1-uri": "^1.0.0",
"diablomedia/zendframework1-xml": "^1.0.0",
"ext-SimpleXML": "*",
"ext-dom": "*",
"ext-soap": "*",
"php": ">=7.0.0"
},
"autoload": {
"psr-0": {
"Zend_Soap_": "src/"
}
},
"autoload-dev": {
"psr-0": {
"Zend_": "tests/"
}
},
"require-dev": {
"phpunit/phpunit": "^6.0",
"phpstan/phpstan": "^0.9.2",
"friendsofphp/php-cs-fixer": "^2.11",
"maglnet/composer-require-checker": "^0.1.6 | ^0.2.1",
"phpro/grumphp": "^0.14.0"
},
"archive": {
"exclude": ["/tests"]
},
"scripts": {
"test": "phpunit",
"test-with-coverage": "phpunit --coverage-clover=clover.xml",
"phpstan": "phpstan analyze -l1 -c phpstan.neon --no-progress ./ --ansi",
"style-check": "php-cs-fixer fix --dry-run -vv"
}
}
16 changes: 16 additions & 0 deletions grumphp.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# grumphp.yml
parameters:
tasks:
composer:
strict: true
composer_require_checker: ~
phpcsfixer2:
allow_risky: true
config: .php_cs
phpstan:
level: 1
configuration: phpstan.neon
phpunit:
metadata:
priority: 100
always_execute: true
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
excludes_analyse:
- %rootDir%/../../../vendor/*
- %rootDir%/../../../tests/*
ignoreErrors:
# Bad reflection I assume
- '#Call to an undefined static method SoapClient::__construct\(\)\.#'
# Not sure what default should be
- '#Variable \$xml might not be defined\.#'
- '#Variable \$complexTypeName might not be defined\.#'
19 changes: 19 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<phpunit
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
beStrictAboutTestsThatDoNotTestAnything="true"
backupGlobals="true"
stderr="true"
colors="true">
<testsuites>
<testsuite name="default">
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 25f345a

Please sign in to comment.