From fec1992dbd974a3ed3dc78669ee924655e76044f Mon Sep 17 00:00:00 2001 From: Patrick Samson Date: Mon, 13 Jan 2020 16:39:42 -0500 Subject: [PATCH] Update dependencies and test to support Laravel 6.x --- .gitignore | 8 ++++++-- .travis.yml | 9 +-------- README.md | 2 +- composer.json | 20 ++++++++++++++------ phpunit.xml | 3 --- tests/Drivers/BrowserDriverTest.php | 4 ++-- tests/Drivers/RequestDriverTest.php | 4 ++-- tests/Drivers/SessionDriverTest.php | 4 ++-- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index af1f417..ea76f73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ -composer.lock -/vendor +# Composer +/composer.lock +/vendor/* + +# PHPUnit +/.phpunit.result.cache diff --git a/.travis.yml b/.travis.yml index de172fa..f03eb9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,15 +3,9 @@ language: php sudo: false php: - - 7.1 - - 7.2 - - 7.3 + - 7.4 env: - matrix: - - TESTBENCH_VERSION=3.5.* - - TESTBENCH_VERSION=3.6.* - - TESTBENCH_VERSION=3.7.* global: - COMPOSER_DISCARD_CHANGES=true - COMPOSER_NO_INTERACTION=1 @@ -24,7 +18,6 @@ matrix: before_install: - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; - composer self-update && composer -V - - composer require "orchestra/testbench:${TESTBENCH_VERSION}" --no-update -v install: - travis_retry composer update --prefer-dist diff --git a/README.md b/README.md index 5038df3..d8704fb 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Via Composer composer require lykegenes/laravel-locale-switcher ``` -Then, add this to your Service Providers : +Then, add this to your Service Providers (It should be done automa) : ``` php Lykegenes\LocaleSwitcher\ServiceProvider::class, ``` diff --git a/composer.json b/composer.json index 3cbc841..54dd59f 100644 --- a/composer.json +++ b/composer.json @@ -16,14 +16,14 @@ } ], "require": { - "illuminate/support": "~5.1", - "illuminate/http": "~5.1" + "illuminate/support": "^6.2", + "illuminate/http": "^6.2" }, "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0", - "mockery/mockery": "~1.1", + "phpunit/phpunit": "^8.0", + "mockery/mockery": "^1.0", "php-coveralls/php-coveralls": "~1.0", - "orchestra/testbench": "~3.5" + "orchestra/testbench": "^4.0" }, "autoload": { "psr-4": { @@ -37,7 +37,15 @@ "extra": { "branch-alias": { "dev-master": "1.0-dev" - } + }, + "laravel": { + "providers": [ + "Lykegenes\\LocaleSwitcher\\ServiceProvider" + ], + "aliases": { + "LocaleSwitcher": "Lykegenes\\LocaleSwitcher\\Facades\\LocaleSwitcher" + } + } }, "minimum-stability": "dev", "prefer-stable": true diff --git a/phpunit.xml b/phpunit.xml index 4ec995f..e356349 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,14 +8,11 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" > ./tests/ - - ./tests/Integration diff --git a/tests/Drivers/BrowserDriverTest.php b/tests/Drivers/BrowserDriverTest.php index c96cfe8..bd3f013 100644 --- a/tests/Drivers/BrowserDriverTest.php +++ b/tests/Drivers/BrowserDriverTest.php @@ -19,7 +19,7 @@ class BrowserDriverTest extends Orchestra\Testbench\TestCase */ protected $browserDriver; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -29,7 +29,7 @@ public function setUp() $this->browserDriver = new BrowserDriver($this->request, $this->configManager); } - public function tearDown() + public function tearDown(): void { parent::tearDown(); diff --git a/tests/Drivers/RequestDriverTest.php b/tests/Drivers/RequestDriverTest.php index 3364748..fc3f731 100644 --- a/tests/Drivers/RequestDriverTest.php +++ b/tests/Drivers/RequestDriverTest.php @@ -14,7 +14,7 @@ class RequestDriverTest extends Orchestra\Testbench\TestCase */ protected $requestDriver; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -23,7 +23,7 @@ public function setUp() $this->requestDriver = new RequestDriver($this->request); } - public function tearDown() + public function tearDown(): void { parent::tearDown(); diff --git a/tests/Drivers/SessionDriverTest.php b/tests/Drivers/SessionDriverTest.php index 1fd8365..0fe4dcc 100644 --- a/tests/Drivers/SessionDriverTest.php +++ b/tests/Drivers/SessionDriverTest.php @@ -14,7 +14,7 @@ class SessionDriverTest extends Orchestra\Testbench\TestCase */ protected $sessionDriver; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -23,7 +23,7 @@ public function setUp() $this->sessionDriver = new SessionDriver($this->session); } - public function tearDown() + public function tearDown(): void { parent::tearDown();