Fix Travis test and update Scrutinizer config
This commit is contained in:
parent
37152cd459
commit
b3229c6a7b
|
|
@ -7,7 +7,7 @@ before_commands:
|
||||||
tools:
|
tools:
|
||||||
external_code_coverage:
|
external_code_coverage:
|
||||||
enabled: true
|
enabled: true
|
||||||
timeout: 700
|
timeout: 900
|
||||||
php_code_coverage:
|
php_code_coverage:
|
||||||
enabled: false
|
enabled: false
|
||||||
test_command: phpunit -c phpunit.xml.dist
|
test_command: phpunit -c phpunit.xml.dist
|
||||||
|
|
|
||||||
109
.travis.yml
109
.travis.yml
|
|
@ -1,67 +1,68 @@
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.3.3
|
- 5.3.3
|
||||||
- 5.3
|
- 5.3
|
||||||
- 5.4
|
- 5.4
|
||||||
- 5.5
|
- 5.5
|
||||||
- 5.6
|
- 5.6
|
||||||
- hhvm
|
- hhvm
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: 5.3.3
|
- php: 5.3.3
|
||||||
- php: 5.6
|
- php: 5.6
|
||||||
- php: hhvm
|
- php: hhvm
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="
|
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
## Packages
|
## Packages
|
||||||
- sudo apt-get -qq update > /dev/null
|
- sudo apt-get -qq update > /dev/null
|
||||||
- sudo apt-get -qq install graphviz > /dev/null
|
- sudo apt-get -qq install graphviz > /dev/null
|
||||||
## Composer
|
## Composer
|
||||||
# - curl -s http://getcomposer.org/installer | php
|
# - curl -s http://getcomposer.org/installer | php
|
||||||
# - php composer.phar install --prefer-source
|
# - php composer.phar install --prefer-source
|
||||||
- composer self-update
|
- composer self-update
|
||||||
- composer require dompdf/dompdf:0.6.*
|
- composer require dompdf/dompdf:0.6.*
|
||||||
- composer install --prefer-source --dev
|
- composer install --prefer-source --dev
|
||||||
## PHP_CodeSniffer
|
## PHP_CodeSniffer
|
||||||
- pyrus install pear/PHP_CodeSniffer
|
- pyrus install pear/PHP_CodeSniffer
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
## PHP Copy/Paste Detector
|
## PHP Copy/Paste Detector
|
||||||
- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
|
- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
|
||||||
## PHP Mess Detector
|
## PHP Mess Detector
|
||||||
- pear config-set preferred_state beta
|
- pear config-set preferred_state beta
|
||||||
- printf "\n" | pecl install imagick
|
- printf "\n" | pecl install imagick
|
||||||
- pear channel-discover pear.phpmd.org
|
- pear channel-discover pear.phpmd.org
|
||||||
- pear channel-discover pear.pdepend.org
|
- pear channel-discover pear.pdepend.org
|
||||||
- pear install --alldeps phpmd/PHP_PMD
|
- pear install --alldeps phpmd/PHP_PMD
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
## PHPLOC
|
## PHPLOC
|
||||||
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
|
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
|
||||||
## PHPDocumentor
|
## PHPDocumentor
|
||||||
- mkdir -p build/docs
|
- mkdir -p build/docs
|
||||||
- mkdir -p build/coverage
|
- mkdir -p build/coverage
|
||||||
|
|
||||||
script:
|
script:
|
||||||
## PHP_CodeSniffer
|
## PHP_CodeSniffer
|
||||||
- phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
|
- phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
|
||||||
## PHP Copy/Paste Detector
|
## PHP Copy/Paste Detector
|
||||||
- php phpcpd.phar src/ tests/ --verbose
|
- php phpcpd.phar src/ tests/ --verbose
|
||||||
## PHP Mess Detector
|
## PHP Mess Detector
|
||||||
- phpmd src/,tests/ text unusedcode,naming,design,controversial --exclude pclzip.lib.php
|
- phpmd src/,tests/ text unusedcode,naming,design,controversial --exclude pclzip.lib.php
|
||||||
## PHPLOC
|
## PHPLOC
|
||||||
#- php phploc.phar src/
|
#- php phploc.phar src/
|
||||||
## PHPUnit
|
## PHPUnit
|
||||||
- phpunit -c ./ --coverage-text --coverage-html ./build/coverage
|
- phpunit -c ./ --coverage-text --coverage-html ./build/coverage
|
||||||
## PHPDocumentor
|
## PHPDocumentor
|
||||||
- vendor/bin/phpdoc.php -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/PCLZip/*" --template="responsive-twig"
|
- vendor/bin/phpdoc.php -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/PCLZip/*" --template="responsive-twig"
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
## PHPDocumentor
|
## PHPDocumentor
|
||||||
- bash .travis_shell_after_success.sh
|
- bash .travis_shell_after_success.sh
|
||||||
- wget https://scrutinizer-ci.com/ocular.phar
|
## Scrutinizer
|
||||||
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
|
- wget https://scrutinizer-ci.com/ocular.phar
|
||||||
|
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,6 @@ class Template
|
||||||
public function cloneBlock($blockname, $clones = 1, $replace = true)
|
public function cloneBlock($blockname, $clones = 1, $replace = true)
|
||||||
{
|
{
|
||||||
$xmlBlock = null;
|
$xmlBlock = null;
|
||||||
$pattern =
|
|
||||||
preg_match(
|
preg_match(
|
||||||
'/(<\?xml.*)(<w:p.*>\${' . $blockname . '}<\/w:.*?p>)(.*)(<w:p.*\${\/' . $blockname . '}<\/w:.*?p>)/is',
|
'/(<\?xml.*)(<w:p.*>\${' . $blockname . '}<\/w:.*?p>)(.*)(<w:p.*\${\/' . $blockname . '}<\/w:.*?p>)/is',
|
||||||
$this->documentXML,
|
$this->documentXML,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Element\Table;
|
use PhpOffice\PhpWord\Element\Table;
|
||||||
use PhpOffice\PhpWord\Element\Text;
|
use PhpOffice\PhpWord\Element\Text;
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\Media;
|
use PhpOffice\PhpWord\Media;
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Writer\ODText\Part;
|
namespace PhpOffice\PhpWord\Writer\ODText\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Writer\ODText\Part;
|
namespace PhpOffice\PhpWord\Writer\ODText\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
use PhpOffice\PhpWord\Style;
|
use PhpOffice\PhpWord\Style;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Element\Section;
|
use PhpOffice\PhpWord\Element\Section;
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||||
use PhpOffice\PhpWord\Writer\Word2007\Style\Section as SectionStyleWriter;
|
use PhpOffice\PhpWord\Writer\Word2007\Style\Section as SectionStyleWriter;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
namespace PhpOffice\PhpWord\Writer\Word2007\Part;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||||
use PhpOffice\PhpWord\Style;
|
use PhpOffice\PhpWord\Style;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue