From 78355885c72e74d5c094a4d6f49a0e00d2030da6 Mon Sep 17 00:00:00 2001 From: Ciaran McNulty Date: Sat, 7 Apr 2018 13:14:40 +0100 Subject: [PATCH 1/4] Enable Symfony 4 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c62dbe7..d5344db 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,8 @@ "require" : { "php" : ">=5.3.3", - "symfony/config" : "^2.2|^3.0", - "symfony/event-dispatcher" : "^2.2|^3.0" + "symfony/config" : "^2.2 || ^3.0 || ^4.0", + "symfony/event-dispatcher" : "^2.2 || ^3.0 || ^4.0" }, "autoload" : { From 524a8007f4fafdfdc1c4e2116e9ac797f49bcd74 Mon Sep 17 00:00:00 2001 From: Ciaran McNulty Date: Sat, 7 Apr 2018 13:01:55 +0100 Subject: [PATCH 2/4] Specify compatible local PHPUnit versions --- .travis.yml | 6 +++++- composer.json | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1539058..535f8b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php sudo: false - cache: directories: - $HOME/.composer/cache/files @@ -12,6 +11,8 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 - hhvm matrix: @@ -27,3 +28,6 @@ before_script: - "if [ \"$INOTIFY_EXTENSION\" = \"1\" ]; then pyrus install pecl/inotify && pyrus build pecl/inotify; fi" - "if [ \"$INOTIFY_EXTENSION\" = \"1\" ]; then echo \"extension=inotify.so\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - "composer install --no-progress" + +script: + - "vendor/bin/phpunit" \ No newline at end of file diff --git a/composer.json b/composer.json index d5344db..e2baa28 100644 --- a/composer.json +++ b/composer.json @@ -38,5 +38,8 @@ "branch-alias" : { "dev-master" : "1.0.x-dev" } + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0" } } From 7a2076a5d594f398b0893531326d4a8a8959c083 Mon Sep 17 00:00:00 2001 From: Ciaran McNulty Date: Sat, 7 Apr 2018 13:02:17 +0100 Subject: [PATCH 3/4] Handle different exception for missing files in Symfony 3.1 --- tests/Lurker/Tests/Tracker/TrackerTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Lurker/Tests/Tracker/TrackerTest.php b/tests/Lurker/Tests/Tracker/TrackerTest.php index b7eabbe..a5175ca 100644 --- a/tests/Lurker/Tests/Tracker/TrackerTest.php +++ b/tests/Lurker/Tests/Tracker/TrackerTest.php @@ -30,17 +30,16 @@ public function tearDown() } /** - * @expectedException Lurker\Exception\InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testDoesNotTrackMissingFiles() { $tracker = $this->getTracker(); - - $tracker->track(new TrackedResource('missing', new FileResource(__DIR__.'/missingfile'))); + $tracker->track(new TrackedResource('missing', new FileResource(__DIR__ . '/missingfile'))); } /** - * @expectedException Lurker\Exception\InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testDoesNotTrackMissingDirectories() { From 3c67815dd2e547fc6660018c0755d094ec1d9592 Mon Sep 17 00:00:00 2001 From: Ciaran McNulty Date: Sat, 7 Apr 2018 13:18:11 +0100 Subject: [PATCH 4/4] Simplify inotify installation and tet with fewer PHP versions --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 535f8b8..189b92b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,16 +17,11 @@ php: matrix: include: - - php: 5.4 - env: INOTIFY_EXTENSION=1 - - php: 5.5 - env: INOTIFY_EXTENSION=1 - php: 5.6 env: INOTIFY_EXTENSION=1 before_script: - - "if [ \"$INOTIFY_EXTENSION\" = \"1\" ]; then pyrus install pecl/inotify && pyrus build pecl/inotify; fi" - - "if [ \"$INOTIFY_EXTENSION\" = \"1\" ]; then echo \"extension=inotify.so\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - "if [ \"$INOTIFY_EXTENSION\" = \"1\" ]; then pecl install inotify-0.1.6; fi" - "composer install --no-progress" script: