Skip to content
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

PHP8 compability #91

Merged
merged 1 commit into from
Mar 22, 2021
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
nbproject
composer.lock
docs/html
.phpunit.result.cache
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ language: php
matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.3
env:
- DEPENDENCIES=""
- EXECUTE_CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
- php: 7.3
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 7.2
- php: 7.4
env:
- DEPENDENCIES=""
- php: 7.2
- php: 7.4
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 8.0
env:
- DEPENDENCIES=""
- php: 8.0
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"

Expand All @@ -31,7 +37,7 @@ before_script:
- composer update $DEPENDENCIES

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then XDEBUG_MODE=coverage php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi

after_success:
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.1",
"php": "^7.3 || ^8.0",
"prooph/event-store" : "^7.0"
},
"require-dev": {
"psr/container": "^1.0",
"sandrokeil/interop-config": "^2.0.1",
"phpunit/phpunit": "^6.0",
"phpunit/phpunit": "^9.3",
"prooph/snapshot-store": "^1.2.0",
"prooph/php-cs-fixer-config": "^0.3",
"phpspec/prophecy": "^1.7",
"prooph/php-cs-fixer-config": "^0.4",
"phpspec/prophecy": "^1.9",
"phpspec/prophecy-phpunit": "^2.0",
"satooshi/php-coveralls": "^1.0",
"prooph/bookdown-template": "^0.2.3"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/quickstart.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
9 changes: 4 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
>
<testsuite name="Prooph Event-Sourcing Test Suite">
<directory>./tests/</directory>
</testsuite>

<filter>
<whitelist>
<coverage>
<include>
<directory>./src/</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>
4 changes: 2 additions & 2 deletions src/Aggregate/AggregateRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/AggregateTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/AggregateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/AggregateTypeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/EventProducerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/EventSourcedTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/Exception/AggregateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/Exception/AggregateTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Aggregate/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/AggregateChanged.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/AggregateRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Container/Aggregate/AggregateRepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/EventStoreIntegration/AggregateRootDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/EventStoreIntegration/AggregateTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/EventStoreIntegration/ClosureAggregateTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
7 changes: 5 additions & 2 deletions tests/Aggregate/AggregateRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down Expand Up @@ -34,10 +34,13 @@
use ProophTest\EventSourcing\Mock\UsernameChanged;
use ProophTest\EventStore\ActionEventEmitterEventStoreTestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use ReflectionClass;

class AggregateRepositoryTest extends ActionEventEmitterEventStoreTestCase
{
use ProphecyTrait;

/**
* @var AggregateRepository
*/
Expand Down
7 changes: 5 additions & 2 deletions tests/Aggregate/AggregateTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -20,9 +20,12 @@
use Prooph\EventSourcing\Aggregate\Exception\InvalidArgumentException;
use ProophTest\EventStore\Mock\Post;
use ProophTest\EventStore\Mock\User;
use Prophecy\PhpUnit\ProphecyTrait;

class AggregateTypeTest extends TestCase
{
use ProphecyTrait;

/**
* @test
*/
Expand Down
8 changes: 4 additions & 4 deletions tests/AggregateChangedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -16,7 +16,7 @@
use DateTimeImmutable;
use PHPUnit\Framework\TestCase;
use Prooph\EventSourcing\AggregateChanged;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;

class AggregateChangedTest extends TestCase
{
Expand All @@ -27,7 +27,7 @@ public function it_has_a_new_uuid_after_construct(): void
{
$event = AggregateChanged::occur('1', []);

$this->assertInstanceOf(Uuid::class, $event->uuid());
$this->assertInstanceOf(UuidInterface::class, $event->uuid());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/AggregateRootTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
7 changes: 5 additions & 2 deletions tests/Container/Aggregate/AggregateRepositoryFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/**
* This file is part of prooph/event-sourcing.
* (c) 2014-2019 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2021 Alexander Miertsch <kontakt@codeliner.ws>
* (c) 2015-2021 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -22,10 +22,13 @@
use ProophTest\EventSourcing\Mock\RepositoryMock;
use ProophTest\EventStore\ActionEventEmitterEventStoreTestCase;
use ProophTest\EventStore\Mock\User;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

class AggregateRepositoryFactoryTest extends ActionEventEmitterEventStoreTestCase
{
use ProphecyTrait;

/**
* @test
*/
Expand Down
Loading