Skip to content

Added php 8 support. #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.*"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GenerateCommand extends AbstractCommand
{
protected static $defaultName = 'mongodb:migrations:generate';

private static $_template =
protected static $_template =
'<?php

namespace <namespace>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AbstractMigrationsExceptionTest extends TestCase
{
private $exception;

protected function setUp()
protected function setUp(): void
{
$this->exception = new AbstractMigrationsExceptionStub();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/AntiMattr/Tests/MongoDB/Migrations/MigrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/AntiMattr/Tests/MongoDB/Migrations/VersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down