Skip to content

Commit

Permalink
Cleaned up for PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamielsharief committed Jan 13, 2021
1 parent 72836e9 commit afbcaf6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
php-version:
- "7.3"
- "7.4"
# - "8.0"
- "8.0"
database:
- mysql
- postgres
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [3.5.1] - 2021-01-14

### Changed

- Increase max plugin installer version

## [3.5.0] - 2021-01-03

### Changed
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 9 additions & 2 deletions tests/TestCase/Console/Command/GenerateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit afbcaf6

Please sign in to comment.