diff --git a/composer.json b/composer.json index a3ade78..165c7d2 100644 --- a/composer.json +++ b/composer.json @@ -13,14 +13,14 @@ "antimattr/mongodb-migrations" : "*" }, "require": { - "php": "^7.1", + "php": "^7.1 || ^8.0", "ext-mongodb": "*", - "mongodb/mongodb": "^1.4", + "mongodb/mongodb": "^1.8", "symfony/console": "^2.7 || ^3.4 || ^4.0 || ^5.0", "symfony/yaml": "^2.7 || ^3.4 || ^4.0 || ^5.0" }, "require-dev": { - "phpunit/phpunit": "^7.0", + "phpunit/phpunit": "^7.0 || ^8.0", "friendsofphp/php-cs-fixer": "^2.0", "mikey179/vfsstream": "1.*" }, diff --git a/src/AntiMattr/MongoDB/Migrations/Tools/Console/Command/GenerateCommand.php b/src/AntiMattr/MongoDB/Migrations/Tools/Console/Command/GenerateCommand.php index 7fb80d4..fbdcc2d 100644 --- a/src/AntiMattr/MongoDB/Migrations/Tools/Console/Command/GenerateCommand.php +++ b/src/AntiMattr/MongoDB/Migrations/Tools/Console/Command/GenerateCommand.php @@ -23,7 +23,7 @@ class GenerateCommand extends AbstractCommand { protected static $defaultName = 'mongodb:migrations:generate'; - private static $_template = + protected static $_template = '; diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Collection/StatisticsTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Collection/StatisticsTest.php index 977ad5f..7b831cd 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Collection/StatisticsTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Collection/StatisticsTest.php @@ -10,7 +10,7 @@ class StatisticsTest extends TestCase private $collection; private $statistics; - protected function setUp() + protected function setUp(): void { $this->collection = $this->createMock('MongoDB\Collection'); $this->statistics = new Statistics(); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/ConfigurationTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/ConfigurationTest.php index b8d14c6..9a43e48 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/ConfigurationTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/ConfigurationTest.php @@ -10,7 +10,7 @@ class ConfigurationTest extends TestCase private $configuration; private $connection; - protected function setUp() + protected function setUp(): void { $this->connection = $this->createMock('MongoDB\Client'); $this->configuration = new Configuration($this->connection); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbortExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbortExceptionTest.php index 8f75835..d91994d 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbortExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbortExceptionTest.php @@ -8,7 +8,7 @@ class AbortExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\AbortException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbstractMigrationsExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbstractMigrationsExceptionTest.php index 3a6596a..c531fea 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbstractMigrationsExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/AbstractMigrationsExceptionTest.php @@ -9,7 +9,7 @@ class AbstractMigrationsExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = new AbstractMigrationsExceptionStub(); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/ConfigurationValidationExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/ConfigurationValidationExceptionTest.php index 3d3dd84..7479879 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/ConfigurationValidationExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/ConfigurationValidationExceptionTest.php @@ -8,7 +8,7 @@ class ConfigurationValidationExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\ConfigurationValidationException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/DuplicateVersionExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/DuplicateVersionExceptionTest.php index 5ec3c9e..5ec3dbf 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/DuplicateVersionExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/DuplicateVersionExceptionTest.php @@ -8,7 +8,7 @@ class DuplicateVersionExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\DuplicateVersionException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/IrreversibleExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/IrreversibleExceptionTest.php index d85ad9b..e2e97de 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/IrreversibleExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/IrreversibleExceptionTest.php @@ -8,7 +8,7 @@ class IrreversibleExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\IrreversibleException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/NoMigrationsToExecuteExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/NoMigrationsToExecuteExceptionTest.php index ce222be..abfef56 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/NoMigrationsToExecuteExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/NoMigrationsToExecuteExceptionTest.php @@ -8,7 +8,7 @@ class NoMigrationsToExecuteExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\NoMigrationsToExecuteException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/SkipExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/SkipExceptionTest.php index d97ecaa..aea82d6 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/SkipExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/SkipExceptionTest.php @@ -8,7 +8,7 @@ class SkipExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\SkipException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/UnknownVersionExceptionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/UnknownVersionExceptionTest.php index 63da089..c73775d 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/UnknownVersionExceptionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Exception/UnknownVersionExceptionTest.php @@ -8,7 +8,7 @@ class UnknownVersionExceptionTest extends TestCase { private $exception; - protected function setUp() + protected function setUp(): void { $this->exception = $this->createMock('AntiMattr\MongoDB\Migrations\Exception\UnknownVersionException'); } diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/MigrationTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/MigrationTest.php index e8c7e9c..77b031f 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/MigrationTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/MigrationTest.php @@ -11,7 +11,7 @@ class MigrationTest extends TestCase private $migration; private $outputWriter; - protected function setUp() + protected function setUp(): void { $this->configuration = $this->createMock('AntiMattr\MongoDB\Migrations\Configuration\Configuration'); $this->outputWriter = $this->createMock('AntiMattr\MongoDB\Migrations\OutputWriter'); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/OutputWriterTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/OutputWriterTest.php index 49ddf1e..914423c 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/OutputWriterTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/OutputWriterTest.php @@ -9,7 +9,7 @@ class OutputWriterTest extends TestCase { private $outputWriter; - protected function setUp() + protected function setUp(): void { $this->output = $this->createMock('Symfony\Component\Console\Output\OutputInterface'); $output = $this->output; diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/ExecuteCommandTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/ExecuteCommandTest.php index c1c9e7b..f132e84 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/ExecuteCommandTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/ExecuteCommandTest.php @@ -19,7 +19,7 @@ class ExecuteCommandTest extends TestCase private $config; private $version; - public function setUp() + public function setUp(): void { $this->command = new ExecuteCommand(); $this->output = $this->createMock('Symfony\Component\Console\Output\OutputInterface'); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/GenerateCommandTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/GenerateCommandTest.php index a53fa42..81a26cd 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/GenerateCommandTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/GenerateCommandTest.php @@ -16,7 +16,7 @@ class GenerateCommandTest extends TestCase private $output; private $config; - protected function setUp() + protected function setUp(): void { $this->command = new GenerateCommandStub(); $this->output = $this->createMock('Symfony\Component\Console\Output\OutputInterface'); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/MigrateCommandTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/MigrateCommandTest.php index 8efbb26..5161b5f 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/MigrateCommandTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/MigrateCommandTest.php @@ -18,7 +18,7 @@ class MigrateCommandTest extends TestCase private $command; private $output; - public function setUp() + public function setUp(): void { $this->command = new MigrateCommandStub(); $this->output = $this->createMock('Symfony\Component\Console\Output\OutputInterface'); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/StatusCommandTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/StatusCommandTest.php index 265bbb9..a1d1bb5 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/StatusCommandTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/StatusCommandTest.php @@ -26,7 +26,7 @@ class StatusCommandTest extends TestCase */ private $outputFormatter; - protected function setUp() + protected function setUp(): void { $this->command = new StatusCommandStub(); $this->output = $this->createMock('Symfony\Component\Console\Output\OutputInterface'); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/VersionCommandTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/VersionCommandTest.php index d2bf6f9..f489ed0 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/VersionCommandTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/Tools/Console/Command/VersionCommandTest.php @@ -19,7 +19,7 @@ class VersionCommandTest extends TestCase private $migration; private $version; - protected function setUp() + protected function setUp(): void { $this->command = new VersionCommandStub(); $this->output = $this->createMock('Symfony\Component\Console\Output\OutputInterface'); diff --git a/tests/AntiMattr/Tests/MongoDB/Migrations/VersionTest.php b/tests/AntiMattr/Tests/MongoDB/Migrations/VersionTest.php index 6d3c3ca..2b27b35 100644 --- a/tests/AntiMattr/Tests/MongoDB/Migrations/VersionTest.php +++ b/tests/AntiMattr/Tests/MongoDB/Migrations/VersionTest.php @@ -19,7 +19,7 @@ class VersionTest extends TestCase private $outputWriter; private $statistics; - protected function setUp() + protected function setUp(): void { $this->className = 'AntiMattr\Tests\MongoDB\Migrations\Version20140908000000'; $this->configuration = $this->createMock('AntiMattr\MongoDB\Migrations\Configuration\Configuration');