Update Travis for PHP7, update tooling

This commit is contained in:
Craig Davis 2017-10-16 16:00:50 -07:00
parent 442afa1889
commit fe9e5625b6
No known key found for this signature in database
GPG Key ID: 3C688BD208948D65
10 changed files with 1538 additions and 628 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.idea
vendor vendor
examples/resume/_*.md examples/resume/_*.md
examples/output/*.html examples/output/*.html

View File

@ -1,9 +1,14 @@
language: php language: php
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
php: php:
- 5.3 - '5.6'
- 5.4 - '7.0'
- '7.1'
- '7.2'
install:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction --dev
script:
- ./vendor/bin/pake test

Binary file not shown.

View File

@ -41,15 +41,12 @@
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
"require": { "require": {
"fabpot/php-cs-fixer": "0.4.0",
"indeyets/pake": "~1.99", "indeyets/pake": "~1.99",
"kriswallsmith/assetic": "1.1.2", "kriswallsmith/assetic": "1.1.2",
"leafo/lessphp": "v0.4.0", "leafo/lessphp": "v0.4.0",
"michelf/php-markdown": "1.4.0", "michelf/php-markdown": "1.4.0",
"michelf/php-smartypants": "^1.8", "michelf/php-smartypants": "^1.8",
"mustache/mustache": "2.5.1", "mustache/mustache": "2.5.1",
"phpunit/phpunit": "3.7.*",
"squizlabs/php_codesniffer": "1.*",
"sunra/php-simple-html-dom-parser": "v1.5.0", "sunra/php-simple-html-dom-parser": "v1.5.0",
"symfony/config": "v2.3.4", "symfony/config": "v2.3.4",
"symfony/console": "v2.3.4", "symfony/console": "v2.3.4",
@ -60,5 +57,9 @@
}, },
"bin": [ "bin": [
"bin/md2resume" "bin/md2resume"
] ],
} "require-dev": {
"phpunit/phpunit": "^6.2",
"squizlabs/php_codesniffer": "^3.0@dev"
}
}

2118
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
} }
// Bootstrap our application with the Composer autoloader // Bootstrap our application with the Composer autoloader
$app = require __DIR__ . '/vendor/autoload.php'; $app = include __DIR__ . '/vendor/autoload.php';
// Setup the namespace for our own namespace // Setup the namespace for our own namespace
$app->add('Resume', __DIR__ . '/src'); $app->add('Resume', __DIR__ . '/src');

View File

@ -6,7 +6,7 @@ pake_task('test');
pake_desc('Check the code for psr2 standards'); pake_desc('Check the code for psr2 standards');
pake_task('sniff'); pake_task('sniff');
pake_desc('Run php-cs-fixer on the src directory'); pake_desc('Run phpcbf on the src directory');
pake_task('fixer'); pake_task('fixer');
pake_desc('Update the README with the latest command output'); pake_desc('Update the README with the latest command output');
@ -88,11 +88,11 @@ function run_sniff()
function run_fixer() function run_fixer()
{ {
pake_echo_comment('Running php-cs-fixer'); pake_echo_comment('Running phpcbf');
pake_sh( pake_sh(
'./vendor/bin/php-cs-fixer fix ./md2resume_dev.php' './vendor/bin/phpcbf --standard=PSR2 ./md2resume_dev.php'
. ' && ./vendor/bin/php-cs-fixer fix ./src/Resume/Cli/' . ' && ./vendor/bin/phpcbf --standard=PSR2 ./src/Resume/Cli/'
. ' && ./vendor/bin/php-cs-fixer fix ./src/Resume/Command/', . ' && ./vendor/bin/phpcbf --standard=PSR2 ./src/Resume/Command/',
true true
); );
} }

View File

@ -13,7 +13,7 @@ class SelfUpdateCommand extends Command
->setName('selfupdate') ->setName('selfupdate')
->setDescription('Updates md2resume.phar to the latest version.') ->setDescription('Updates md2resume.phar to the latest version.')
->setHelp( ->setHelp(
<<<EOT <<<EOT
The <info>self-update</info> command checks github for newer The <info>self-update</info> command checks github for newer
versions of the command line client and if found, installs the latest. versions of the command line client and if found, installs the latest.

View File

@ -67,7 +67,7 @@ class StatsCommand extends Command
$phrase .= strtolower($input[$key+$i]); $phrase .= strtolower($input[$key+$i]);
} }
} }
if (!isset( $results[$phrase])) { if (!isset($results[$phrase])) {
$results[$phrase] = 1; $results[$phrase] = 1;
} else { } else {
$results[$phrase]++; $results[$phrase]++;

View File

@ -3,9 +3,10 @@
$app = require __DIR__ . '/../vendor/autoload.php'; $app = require __DIR__ . '/../vendor/autoload.php';
$app->add('Resume', __DIR__ . '/../src'); $app->add('Resume', __DIR__ . '/../src');
use PHPUnit\Framework\TestCase;
use Resume\Cli\Resume; use Resume\Cli\Resume;
class ResumeTest extends \PHPUnit_Framework_TestCase class ResumeTest extends TestCase
{ {
public $console; public $console;