Merge branch 'master' into php5

* master:
  Run Code Sniffer via phing.
  Depend on phing/phing build script.

Conflicts:
	composer.lock
This commit is contained in:
Andreas Fischer 2014-04-12 19:33:05 +02:00
commit 61b0fe2ddf
4 changed files with 81 additions and 3 deletions

View File

@ -20,8 +20,7 @@ before_script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then travis/setup-composer.sh; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then travis/setup-composer.sh; fi"
script: script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phpcs -s --extensions=php --standard=build/code-sniffer-ruleset.xml phpseclib/; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phing -f build/build.xml sniff; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phpcs -s --extensions=php --standard=build/code-sniffer-ruleset-tests.xml tests/; fi"
- travis/run-phpunit.sh - travis/run-phpunit.sh
after_success: after_success:

26
build/build.xml Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="phpseclib"
description="PHP Secure Communications Library"
default="all"
>
<target name="all" depends="sniff" />
<!-- Code Sniffer -->
<target name="sniff" depends="sniff-php-code,sniff-php-tests" />
<target name="sniff-php-code">
<exec command="vendor/bin/phpcs -s
--extensions=php
--standard=build/code-sniffer-ruleset.xml
phpseclib/"
dir=".." passthru="true" />
</target>
<target name="sniff-php-tests">
<exec command="vendor/bin/phpcs -s
--extensions=php
--standard=build/code-sniffer-ruleset-tests.xml
tests/"
dir=".." passthru="true" />
</target>
</project>

View File

@ -49,6 +49,7 @@
"php": ">=5.3.0" "php": ">=5.3.0"
}, },
"require-dev": { "require-dev": {
"phing/phing": "2.7.*",
"phpunit/phpunit": "4.0.*", "phpunit/phpunit": "4.0.*",
"squizlabs/php_codesniffer": "1.*" "squizlabs/php_codesniffer": "1.*"
}, },

54
composer.lock generated
View File

@ -3,11 +3,63 @@
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
], ],
"hash": "47815ecdbeb5586e01973e3e961c4b14", "hash": "9550e007a60e2baceebf1185d508dd00",
"packages": [ "packages": [
], ],
"packages-dev": [ "packages-dev": [
{
"name": "phing/phing",
"version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/phingofficial/phing.git",
"reference": "bd2689790c620ac745b3ad29765c641a0dd5d007"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phingofficial/phing/zipball/bd2689790c620ac745b3ad29765c641a0dd5d007",
"reference": "bd2689790c620ac745b3ad29765c641a0dd5d007",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"bin": [
"bin/phing"
],
"type": "library",
"autoload": {
"classmap": [
"classes/phing/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"classes"
],
"license": [
"LGPL3"
],
"authors": [
{
"name": "Michiel Rook",
"email": "mrook@php.net"
},
{
"name": "Phing Community",
"homepage": "http://www.phing.info/trac/wiki/Development/Contributors"
}
],
"description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.",
"homepage": "http://www.phing.info/",
"keywords": [
"build",
"task",
"tool"
],
"time": "2014-02-13 13:17:59"
},
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "2.0.5", "version": "2.0.5",