Skip to content

Commit

Permalink
migration to cakephp 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
skie committed Apr 8, 2023
1 parent 746d819 commit e81c9ba
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"description": "DbTest plugin for CakePHP",
"type": "cakephp-plugin",
"require": {
"php": ">=7.2",
"cakephp/cakephp": "^4.0.0"
"php": ">=8.1",
"cakephp/cakephp": "5.*"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"cakephp/cakephp-codesniffer": "^4.0.0"
"phpunit/phpunit": "^9.5.16",
"cakephp/cakephp-codesniffer": "^4.0"
},
"autoload": {
"psr-4": {
Expand All @@ -35,5 +35,10 @@
"psalm": "psalm --show-info=false",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.11 vimeo/psalm:^3.0 && mv composer.backup composer.json",
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:^0.4.11 && mv composer.backup composer.json", "test-coverage": "phpunit --coverage-clover=clover.xml"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
6 changes: 2 additions & 4 deletions phpunit.xml.dbtest
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
stderr="true"
colors="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/bootstrap.php"
>
<php>
Expand All @@ -14,8 +12,8 @@

<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="App Test Suite">
<directory>./tests/TestCase</directory>
<testsuite name="app">
<directory>tests/TestCase/</directory>
</testsuite>
<!-- Add plugin test suites here. -->
</testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/BaseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class BaseEngine
*
* @var bool
*/
protected $_database = [];
protected array $_database = [];

/**
* Constructor method
Expand Down
2 changes: 1 addition & 1 deletion src/Shell/FixtureImportShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Cake\Console\ConsoleOptionParser;
use Cake\Console\Shell;
use Cake\Datasource\ConnectionManager;
use Cake\Filesystem\Folder;
use Shim\Filesystem\Folder;
use Cake\Utility\Hash;

class FixtureImportShell extends Shell
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/Fixture/FixtureInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use CakeDC\DbTest\TestSuite\Fixture\FixtureManager;
use Cake\Core\Configure;
use Cake\Datasource\ConnectionManager;
use Cake\Filesystem\Folder;
use Shim\Filesystem\Folder;
use Exception;
use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\Test;
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/Fixture/FixtureManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use CakeDC\DbTest\Engine\EngineFactory;
use Cake\Core\Configure;
use Cake\Datasource\ConnectionManager;
use Cake\Filesystem\Folder;
use Shim\Filesystem\Folder;
use Cake\Log\Log;

class FixtureManager
Expand Down

0 comments on commit e81c9ba

Please sign in to comment.