From 79afb25d3e9a4c106e6540e8a0455321f65f5876 Mon Sep 17 00:00:00 2001 From: Stef Rouschop Date: Sat, 8 Feb 2020 16:17:53 +0100 Subject: [PATCH] Add support for Laravel 6 (#39) * Add support for Laravel 6 * drop support for PHP < 7.2 * styleci linting has been deprecated * updated phpunit and testbench * Switch to new symantic versioning for Laravel --- .phpunit.result.cache | 1 + .styleci.yml | 2 -- .travis.yml | 6 +++--- composer.json | 12 ++++++------ phpunit.xml | 3 +-- tests/BotManTesterTest.php | 4 ++-- 6 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 .phpunit.result.cache diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..8bbdfe0 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":1464:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:22:{s:53:"Tests\BotManTesterTest::it_can_fake_incoming_messages";d:0.011;s:52:"Tests\BotManTesterTest::it_can_fake_user_information";d:0;s:45:"Tests\BotManTesterTest::it_can_assert_replies";d:0;s:53:"Tests\BotManTesterTest::it_can_assert_replies_are_not";d:0;s:61:"Tests\BotManTesterTest::it_can_assert_replies_are_in_an_array";d:0;s:65:"Tests\BotManTesterTest::it_can_assert_replies_are_not_in_an_array";d:0;s:53:"Tests\BotManTesterTest::it_can_assert_generic_replies";d:0;s:61:"Tests\BotManTesterTest::it_can_assert_replies_are_not_present";d:0;s:49:"Tests\BotManTesterTest::it_can_assert_raw_replies";d:0;s:54:"Tests\BotManTesterTest::it_can_assert_multiple_replies";d:0;s:54:"Tests\BotManTesterTest::it_can_assert_a_template_class";d:0;s:55:"Tests\BotManTesterTest::it_can_assert_a_template_object";d:0.001;s:63:"Tests\BotManTesterTest::it_can_assert_a_template_is_in_an_array";d:0;s:67:"Tests\BotManTesterTest::it_can_assert_a_template_is_not_in_an_array";d:0;s:56:"Tests\BotManTesterTest::it_can_fake_interactive_messages";d:0.008;s:45:"Tests\BotManTesterTest::it_can_fake_locations";d:0;s:42:"Tests\BotManTesterTest::it_can_fake_images";d:0;s:42:"Tests\BotManTesterTest::it_can_fake_videos";d:0;s:41:"Tests\BotManTesterTest::it_can_fake_audio";d:0;s:41:"Tests\BotManTesterTest::it_can_fake_files";d:0;s:42:"Tests\BotManTesterTest::it_can_fake_events";d:0;s:45:"Tests\BotManTesterTest::it_can_test_questions";d:0.009;}}} \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml index a2f2088..1ef9935 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -2,5 +2,3 @@ preset: laravel enabled: - unalign_double_arrow - -linting: true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 45f5025..d64dd97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: php php: - - 7.0 - - 7.1 + - 7.2 + - 7.3 before_script: - travis_retry composer self-update --preview @@ -16,4 +16,4 @@ before_install: - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini after_success: - - codecov \ No newline at end of file + - codecov diff --git a/composer.json b/composer.json index 651b05b..094985d 100644 --- a/composer.json +++ b/composer.json @@ -15,17 +15,17 @@ } ], "require": { - "php": ">=7.0", + "php": "^7.2", "botman/botman": "~2.0|~3.0", "guzzlehttp/guzzle": "~6.0", - "illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", - "illuminate/contracts": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", - "illuminate/console": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0", + "illuminate/contracts": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0", + "illuminate/console": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0", "thecodingmachine/discovery": "^1.2" }, "require-dev": { - "phpunit/phpunit": "~6.0", - "orchestra/testbench": "~3.5.0", + "orchestra/testbench": "^3.6|^3.7|^3.8|^4.0", + "phpunit/phpunit": "^7.0|^8.0", "mockery/mockery": "dev-master" }, "autoload": { diff --git a/phpunit.xml b/phpunit.xml index 2ba9eaf..1da2e58 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" > @@ -20,4 +19,4 @@ src/ - \ No newline at end of file + diff --git a/tests/BotManTesterTest.php b/tests/BotManTesterTest.php index 85e69b8..7333eba 100644 --- a/tests/BotManTesterTest.php +++ b/tests/BotManTesterTest.php @@ -37,12 +37,12 @@ class BotManTesterTest extends TestCase /** @var BotMan */ protected $botman; - public function tearDown() + public function tearDown() : void { m::close(); } - protected function setUp() + protected function setUp() :void { parent::setUp();