-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests refactor, support for newer Laravel and PHP versions (#146)
* Tests refactor, support for newer Laravel and PHP versions * Update .travis.yml * Update phpunit.xml Co-authored-by: Pascal Baljet <[email protected]>
- Loading branch information
1 parent
3a0b7f6
commit 76026e0
Showing
24 changed files
with
318 additions
and
10,707 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,205 @@ | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
dist: trusty | ||
language: php | ||
|
||
php: | ||
- '5.5' | ||
- '5.6' | ||
- '7.0' | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
matrix: | ||
include: | ||
- php: 5.4 | ||
dist: trusty | ||
env: LARAVEL='4.2.*' TESTBENCH='2.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.4 | ||
dist: trusty | ||
env: LARAVEL='4.2.*' TESTBENCH='2.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='4.2.*' TESTBENCH='2.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='4.2.*' TESTBENCH='2.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 5.6 | ||
env: LARAVEL='4.2.*' TESTBENCH='2.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.6 | ||
env: LARAVEL='4.2.*' TESTBENCH='2.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
# Optimize the build since we are `composer installing` for each supported | ||
# Laravel versions (see composer.json, under scripts sections). | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- php: 5.4 | ||
dist: trusty | ||
env: LARAVEL='5.0.*' TESTBENCH='3.0.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.4 | ||
dist: trusty | ||
env: LARAVEL='5.0.*' TESTBENCH='3.0.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='5.0.*' TESTBENCH='3.0.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='5.0.*' TESTBENCH='3.0.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 5.6 | ||
env: LARAVEL='5.0.*' TESTBENCH='3.0.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.6 | ||
env: LARAVEL='5.0.*' TESTBENCH='3.0.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 5.6 | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.6 | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.0 | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.0 | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.1 | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.1.*' TESTBENCH='3.1.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.5 | ||
dist: trusty | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 5.6 | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.6 | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.0 | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.0 | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.1 | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.2.*' TESTBENCH='3.2.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 5.6 | ||
env: LARAVEL='5.3.*' TESTBENCH='3.3.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.6 | ||
env: LARAVEL='5.3.*' TESTBENCH='3.3.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.0 | ||
env: LARAVEL='5.3.*' TESTBENCH='3.3.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.0 | ||
env: LARAVEL='5.3.*' TESTBENCH='3.3.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.1 | ||
env: LARAVEL='5.3.*' TESTBENCH='3.3.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.3.*' TESTBENCH='3.3.*' PHPUNIT='<6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 5.6 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=5.7' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 5.6 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=5.7' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.0 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=5.7' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.0 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=5.7' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.1 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=5.7' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=5.7' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.2 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=6 <8' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='5.4.*' TESTBENCH='^3.4.2' PHPUNIT='>=6 <8' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 7.0 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.0 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.1 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.2 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.3 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.3 | ||
env: LARAVEL='5.5.*' TESTBENCH='^3.5.5' PHPUNIT='>=6.5' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 7.1 | ||
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.2 | ||
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 7.1 | ||
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.2 | ||
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.3 | ||
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.3 | ||
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 7.1 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.1 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.2 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.3 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.3 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.4 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.4 | ||
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 7.2 | ||
env: LARAVEL='6.*' TESTBENCH='4.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='6.*' TESTBENCH='4.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.3 | ||
env: LARAVEL='6.*' TESTBENCH='4.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.3 | ||
env: LARAVEL='6.*' TESTBENCH='4.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.4 | ||
env: LARAVEL='6.*' TESTBENCH='4.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.4 | ||
env: LARAVEL='6.*' TESTBENCH='4.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
|
||
- php: 7.2 | ||
env: LARAVEL='7.*' TESTBENCH='5.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.2 | ||
env: LARAVEL='7.*' TESTBENCH='5.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.3 | ||
env: LARAVEL='7.*' TESTBENCH='5.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.3 | ||
env: LARAVEL='7.*' TESTBENCH='5.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
- php: 7.4 | ||
env: LARAVEL='7.*' TESTBENCH='5.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-lowest' | ||
- php: 7.4 | ||
env: LARAVEL='7.*' TESTBENCH='5.*' PHPUNIT='>=6' COMPOSER_FLAGS='--prefer-stable' | ||
fast_finish: true | ||
|
||
before_install: | ||
- export COMPOSER_MEMORY_LIMIT=-1 | ||
- composer config discard-changes true | ||
- travis_retry composer self-update | ||
- travis_retry composer require "laravel/framework:${LARAVEL}" "phpunit/phpunit:${PHPUNIT}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update | ||
|
||
install: | ||
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest | ||
|
||
before_script: | ||
- composer self-update | ||
# Installing `Laravel-JS-Localization` package dependencies. If the current | ||
# PHP version is 5.5 then we should require minimum supported illuminate | ||
# dependencies. | ||
- if [[ `php -v` =~ "PHP 5.5" ]]; then composer require "illuminate/config:4.2.*" "illuminate/console:4.2.*" "illuminate/filesystem:4.2.*"; fi | ||
- if [[ `php -v` =~ "PHP 7.2" || `php -v` =~ "PHP 7.3" ]]; then yes | pecl install mcrypt-1.0.2; fi | ||
- composer install --prefer-dist --no-interaction | ||
# Installing `Laravel-JS-Localization` package dependencies for each | ||
# supported Laravel versions (see composer.json, under scripts section). | ||
- composer test-install | ||
|
||
script: composer test | ||
script: | ||
- vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,46 +2,65 @@ | |
"name": "mariuzzo/laravel-js-localization", | ||
"description": "Laravel Localization in JavaScript", | ||
"type": "library", | ||
"keywords": ["laravel", "laravel 5", "localization", "i18n", "javascript", "js", "lang"], | ||
"keywords": [ | ||
"laravel", | ||
"laravel 5", | ||
"localization", | ||
"i18n", | ||
"javascript", | ||
"js", | ||
"lang" | ||
], | ||
"homepage": "https://github.com/rmariuzzo/laravel-js-localization", | ||
"license": "MIT", | ||
"authors": [{ | ||
"name": "Rubens Mariuzzo", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/rmariuzzo", | ||
"role": "Developer" | ||
}, { | ||
"name": "German Popoter", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/gpopoteur", | ||
"role": "Developer" | ||
}, { | ||
"name": "Galievskiy Dmitriy", | ||
"homepage": "https://github.com/xAockd", | ||
"role": "Developer" | ||
}, { | ||
"name": "Ramon Ackermann", | ||
"homepage": "https://github.com/sboo", | ||
"role": "Developer" | ||
}, { | ||
"name": "Anton Komarev", | ||
"homepage": "https://github.com/antonkomarev", | ||
"role": "Developer" | ||
}], | ||
"authors": [ | ||
{ | ||
"name": "Rubens Mariuzzo", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/rmariuzzo", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "German Popoter", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/gpopoteur", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Galievskiy Dmitriy", | ||
"homepage": "https://github.com/xAockd", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Ramon Ackermann", | ||
"homepage": "https://github.com/sboo", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Anton Komarev", | ||
"homepage": "https://github.com/antonkomarev", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Pascal Baljet", | ||
"homepage": "https://github.com/pascalbaljetmedia", | ||
"role": "Developer" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/rmariuzzo/laravel-js-localization/issues", | ||
"source": "https://github.com/rmariuzzo/laravel-js-localization" | ||
}, | ||
"require": { | ||
"php": ">=5.4.0", | ||
"illuminate/config": ">=4.2", | ||
"illuminate/console": ">=4.2", | ||
"illuminate/filesystem": ">=4.2", | ||
"tedivm/jshrink": "~1.0", | ||
"vlucas/phpdotenv": "^3.3" | ||
"php": "^5.4 || ^7.0", | ||
"illuminate/config": "^4.2 || ^5.0 || ^6.0 || ^7.0", | ||
"illuminate/console": "^4.2 || ^5.0 || ^6.0 || ^7.0", | ||
"illuminate/filesystem": "^4.2 || ^5.0 || ^6.0 || ^7.0", | ||
"tedivm/jshrink": "~1.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "4.8.*" | ||
"orchestra/testbench": "^2.2 || ^3.0 || ^4.0", | ||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
@@ -54,29 +73,11 @@ | |
} | ||
}, | ||
"minimum-stability": "stable", | ||
"scripts": { | ||
"test-install": [ | ||
"composer install --prefer-dist --no-interaction --working-dir tests/4.2", | ||
"composer install --prefer-dist --no-interaction --working-dir tests/5.0", | ||
"composer install --prefer-dist --no-interaction --working-dir tests/5.1", | ||
"composer install --prefer-dist --no-interaction --working-dir tests/5.2", | ||
"./tests/5.3/install", | ||
"./tests/5.4/install" | ||
], | ||
"test": [ | ||
"./vendor/bin/phpunit --configuration tests/4.2", | ||
"./vendor/bin/phpunit --configuration tests/5.0", | ||
"./vendor/bin/phpunit --configuration tests/5.1", | ||
"./vendor/bin/phpunit --configuration tests/5.2", | ||
"./tests/5.3/run", | ||
"./tests/5.4/run" | ||
] | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Mariuzzo\\LaravelJsLocalization\\LaravelJsLocalizationServiceProvider" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.