Skip to content

Commit 4f2d9c5

Browse files
authored
Merge pull request #52 from ashnazg/ci
CI updates
2 parents 0b589f9 + 0b55dcd commit 4f2d9c5

11 files changed

+2592
-39
lines changed

.coveralls.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1+
# IDE Shizzle; it is recommended to use a global .gitignore for this but since this is an OSS project we want to make
2+
# it easy to contribute
13
.idea
2-
composer.lock
3-
vendor
4-
.DS_Store
4+
/nbproject/private/
5+
.buildpath
6+
.project
7+
.settings
8+
9+
# No need to version the binary files of other tools
10+
bin/behat*
11+
bin/phpcs*
12+
bin/phpunit*
13+
bin/jsonlint*
14+
bin/validate-json*
15+
16+
# Build folder and vendor folder are generated code; no need to version this
17+
build/*
18+
vendor/*
19+
composer.phar
20+
21+
# By default the phpunit.xml.dist is provided; you can override this using a local config file
22+
phpunit.xml

.scrutinizer.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
before_commands:
2+
- "composer install --no-dev --prefer-source"
3+
4+
checks:
5+
php:
6+
excluded_dependencies:
7+
- phpstan/phpstan
8+
9+
tools:
10+
external_code_coverage:
11+
enabled: true
12+
timeout: 300
13+
filter:
14+
excluded_paths: ["examples", "tests", "vendor"]
15+
php_code_sniffer:
16+
enabled: true
17+
config:
18+
standard: PSR2
19+
filter:
20+
paths: ["src/*", "tests/*"]
21+
excluded_paths: []
22+
php_cpd:
23+
enabled: true
24+
excluded_dirs: ["examples", "tests", "vendor"]
25+
php_cs_fixer:
26+
enabled: true
27+
config:
28+
level: all
29+
filter:
30+
paths: ["src/*", "tests/*"]
31+
php_loc:
32+
enabled: true
33+
excluded_dirs: ["examples", "tests", "vendor"]
34+
php_mess_detector:
35+
enabled: true
36+
config:
37+
ruleset: phpmd.xml.dist
38+
design_rules: { eval_expression: false }
39+
filter:
40+
paths: ["src/*"]
41+
php_pdepend:
42+
enabled: true
43+
excluded_dirs: ["examples", "tests", "vendor"]
44+
php_analyzer:
45+
enabled: true
46+
filter:
47+
paths: ["src/*", "tests/*"]
48+
sensiolabs_security_checker: true

.travis.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
11
language: php
2-
32
php:
4-
- 7.0
53
- 7.1
64
- 7.2
5+
- nightly
6+
sudo: false
7+
8+
env:
79

810
matrix:
11+
fast_finish: true
912
allow_failures:
10-
- php: 7.2
11-
12-
cache:
13-
directories:
14-
- $HOME/.composer/cache
13+
- php: nightly
1514

1615
install:
17-
- composer install --no-interaction
16+
- composer install --no-interaction --prefer-dist --optimize-autoloader
1817

19-
script:
20-
- vendor/bin/phpunit --coverage-clover=coverage.xml -v
18+
jobs:
19+
include:
20+
- stage: test
21+
script:
22+
- vendor/bin/phpunit --no-coverage
2123

22-
after_script:
23-
- |
24-
if [ $TRAVIS_PHP_VERSION = '7.1' ]; then
25-
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar;
26-
php coveralls.phar --verbose;
27-
fi
24+
- stage: coverage
25+
php: 7.1
26+
script:
27+
- vendor/bin/phpunit
28+
after_script:
29+
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
30+
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
31+
32+
- stage: lint
33+
php: 7.1
34+
before_script:
35+
- composer create-project symplify/easy-coding-standard temp/ecs
36+
script:
37+
- temp/ecs/bin/ecs check src tests
38+
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
39+
40+
cache:
41+
directories:
42+
- $HOME/.composer/cache/files
2843

2944
notifications:
3045
irc: "irc.freenode.org#phpdocumentor"
46+
slack:
47+
secure: "fjumM0h+4w3EYM4dpgqvpiCug7m4sSIC5+HATgwga/Nrc6IjlbWvGOv3JPgD3kQUhi18VmZfUYPmCv916SIbMnv8JWcrSaJXnPCgmxidvYkuzQDIw1HDJbVppGnkmwQA/qjIrM3sIEMfnu/arLRJQLI363aStZzGPxwIa4PDKcg="
3148
email:
32-
33-
49+
50+

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
# TypeResolver and FqsenResolver
2-
3-
[![Build Status](https://img.shields.io/travis/phpDocumentor/TypeResolver/master.svg?style=flat-square)](https://travis-ci.org/phpDocumentor/TypeResolver)
4-
[![Code Coverage](https://img.shields.io/coveralls/phpDocumentor/TypeResolver/master.svg?style=flat-square)](https://coveralls.io/github/phpDocumentor/TypeResolver)
1+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2+
[![Travis Status](https://img.shields.io/travis/phpDocumentor/TypeResolver.svg?label=Linux)](https://travis-ci.org/phpDocumentor/TypeResolver)
3+
[![Appveyor Status](https://img.shields.io/appveyor/ci/phpDocumentor/TypeResolver.svg?label=Windows)](https://ci.appveyor.com/project/phpDocumentor/TypeResolver/branch/master)
4+
[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/TypeResolver.svg)](https://coveralls.io/github/phpDocumentor/TypeResolver?branch=master)
5+
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/TypeResolver.svg)](https://scrutinizer-ci.com/g/phpDocumentor/TypeResolver/?branch=master)
6+
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/TypeResolver.svg)](https://scrutinizer-ci.com/g/phpDocumentor/TypeResolver/?branch=master)
7+
[![Stable Version](https://img.shields.io/packagist/v/phpDocumentor/TypeResolver.svg)](https://packagist.org/packages/phpDocumentor/TypeResolver)
8+
[![Unstable Version](https://img.shields.io/packagist/vpre/phpDocumentor/TypeResolver.svg)](https://packagist.org/packages/phpDocumentor/TypeResolver)
9+
10+
11+
TypeResolver and FqsenResolver
12+
==============================
513

614
The specification on types in DocBlocks (PSR-5) describes various keywords and special constructs
715
but also how to statically resolve the partial name of a Class into a Fully Qualified Class Name (FQCN).

appveyor.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
build: false
2+
clone_folder: c:\typeresolver
3+
max_jobs: 3
4+
platform: x86
5+
pull_requests:
6+
do_not_increment_build_number: true
7+
version: '{build}.{branch}'
8+
skip_tags: true
9+
branches:
10+
only:
11+
- master
12+
13+
environment:
14+
matrix:
15+
- PHP_VERSION: '7.1.13'
16+
VC_VERSION: 'VC14'
17+
- PHP_VERSION: '7.2.1'
18+
VC_VERSION: 'VC15'
19+
matrix:
20+
fast_finish: false
21+
22+
cache:
23+
- c:\php -> appveyor.yml
24+
- '%LOCALAPPDATA%\Composer\files'
25+
26+
init:
27+
- SET PATH=c:\php\%PHP_VERSION%;%PATH%
28+
29+
install:
30+
- IF NOT EXIST c:\php mkdir c:\php
31+
- IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION%
32+
- cd c:\php\%PHP_VERSION%
33+
- IF NOT EXIST php-installed.txt appveyor DownloadFile http://windows.php.net/downloads/releases/php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip
34+
- IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip -y >nul
35+
- IF NOT EXIST php-installed.txt del /Q *.zip
36+
- IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini
37+
- IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini
38+
- IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini
39+
- IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini
40+
- IF NOT EXIST php-installed.txt echo extension=php_curl.dll >> php.ini
41+
- IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini
42+
- IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini
43+
- IF NOT EXIST php-installed.txt echo extension=php_fileinfo.dll >> php.ini
44+
- IF NOT EXIST php-installed.txt echo zend.assertions=1 >> php.ini
45+
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
46+
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://getcomposer.org/composer.phar
47+
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
48+
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
49+
- cd c:\typeresolver
50+
- composer install --no-interaction --prefer-dist --no-progress
51+
52+
test_script:
53+
- cd c:\typeresolver
54+
- vendor/bin/phpunit --no-coverage

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.0",
12+
"php": ">=7.1",
1313
"phpdocumentor/reflection-common": "^1.0"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^6.4",
17-
"mockery/mockery": "^1.0"
16+
"phpunit/phpunit": "^6.5",
17+
"mockery/mockery": "^1.0",
18+
"phpstan/phpstan": "^0.9.0"
1819
},
1920
"autoload": {
2021
"psr-4": {

0 commit comments

Comments
 (0)