Skip to content

Commit

Permalink
fix util exec on test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuck committed Oct 5, 2017
1 parent 392689f commit e2aca5e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ matrix:
- php: 5.6
env: PHPUNIT=false
before_install:
- if [ $PHPUNIT = false ]; then php ./tests/travis/remove-require-dev.php; fi
- if [ $PHPUNIT = false ]; then php -r "require 'tests/utilities/travis.php'; removeRequireDev();"; fi
install:
- composer install
script:
Expand Down
15 changes: 0 additions & 15 deletions tests/travis/remove-require-dev.php

This file was deleted.

20 changes: 20 additions & 0 deletions tests/utilities/travis.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

/*
* removes the require-dev section from composer.json
* needed for linting in older php platforms
*/
function removeRequireDev()
{
$filename = __DIR__.'/../../composer.json';

$content = file_get_contents($filename);

$data = json_decode($content, true);

unset($data['require-dev']);

$content = json_encode($data);

file_put_contents($filename, $content);
}

0 comments on commit e2aca5e

Please sign in to comment.