From afbcaf6c7671071dcd02fce1725cca5d6988d76c Mon Sep 17 00:00:00 2001 From: Jamiel Sharief <20553479+jamielsharief@users.noreply.github.com> Date: Thu, 14 Jan 2021 00:34:31 +0100 Subject: [PATCH] Cleaned up for PHP 8.0 --- .coveralls.yml | 1 - .github/workflows/ci.yml | 2 +- CHANGELOG.md | 6 ++++++ composer.json | 4 ++-- .../TestCase/Console/Command/GenerateCommandTest.php | 11 +++++++++-- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.coveralls.yml b/.coveralls.yml index fa53839..2c07c6d 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,3 +1,2 @@ -service_name: travis-ci coverage_clover: clover.xml # file generated by phpunit json_path: coverage.json # file generated by php-coveralls \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72ef10a..348e53e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: php-version: - "7.3" - "7.4" -# - "8.0" + - "8.0" database: - mysql - postgres diff --git a/CHANGELOG.md b/CHANGELOG.md index cf85226..56cf25f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [3.5.1] - 2021-01-14 + +### Changed + +- Increase max plugin installer version + ## [3.5.0] - 2021-01-03 ### Changed diff --git a/composer.json b/composer.json index 5857f41..83f8470 100644 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ }, "require": { "php": ">=7.3.0", - "originphp/framework": "^3", - "originphp/plugin-installer": "^1.3" + "originphp/framework": "^3.14", + "originphp/plugin-installer": "^1.3|^2.0" }, "require-dev": { "phpunit/phpunit": "^9.2", diff --git a/tests/TestCase/Console/Command/GenerateCommandTest.php b/tests/TestCase/Console/Command/GenerateCommandTest.php index d873672..1f8705c 100644 --- a/tests/TestCase/Console/Command/GenerateCommandTest.php +++ b/tests/TestCase/Console/Command/GenerateCommandTest.php @@ -245,11 +245,18 @@ public function testGenerateRepository() unlink($filename); } + private function deleteIfExists(string $filename) + { + if (file_exists($filename)) { + unlink($filename); + } + } + public function testInteractive() { // this can be annoying when changes are maded - @unlink(APP . DS . 'Model' . DS . 'Concern' . DS . 'Fooable.php'); - @unlink(TESTS . DS . 'TestCase' . DS . 'Model' . DS . 'Concern' . DS . 'FooableTest.php'); + $this->deleteIfExists(APP . DS . 'Model' . DS . 'Concern' . DS . 'Fooable.php'); + $this->deleteIfExists(TESTS . DS . 'TestCase' . DS . 'Model' . DS . 'Concern' . DS . 'FooableTest.php'); $this->exec('generate', ['concern_model', 'Fooable']); $this->assertExitSuccess();