Skip to content

Commit

Permalink
Merge pull request #11 from karpilin/feature/make-compatible-with-bro…
Browse files Browse the repository at this point in the history
…adway-v2.1

Make compatible with Broadway v2.1
  • Loading branch information
matthiasnoback authored Nov 22, 2019
2 parents 362d213 + 523ef7c commit 31497c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
language: php

php:
- 7.0
- 7.1
jobs:
include:
- php: 7.0
env: BROADWAY=^1.0
- php: 7.3
env: BROADWAY=^2.1

before_script:
- composer selfupdate
- composer update --prefer-dist
- composer require broadway/broadway $BROADWAY --prefer-dist

script:
- vendor/bin/phpunit
- vendor/bin/phpbench run --report=default


after_script:
- vendor/bin/coveralls

sudo: false

cache:
directories:
- $HOME/.composer/cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"require": {
"php": "^7.0",
"doctrine/instantiator": "^1.0",
"broadway/broadway": "^1.0"
"broadway/broadway": "^1.0|^2.1"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 1 addition & 0 deletions src/SymfonyIntegration/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:

broadway_serialization.reconstitute:
class: BroadwaySerialization\Reconstitution\ReconstituteUsingInstantiatorAndHydrator
public: true
arguments:
- "@broadway_serialization.instantiator"
- "@broadway_serialization.hydrate"
2 changes: 1 addition & 1 deletion test/Performance/SomeOtherSerializableClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static function deserialize(array $data)
return new self($data['foo']);
}

public function serialize()
public function serialize(): array
{
return [
'foo' => $this->foo
Expand Down
2 changes: 1 addition & 1 deletion test/Performance/TraditionalSerializableClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function ($data) {
return $object;
}

public function serialize()
public function serialize(): array
{
return [
'stringProperty' => $this->stringProperty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static function deserialize(array $data)
return new self($data['bar']);
}

public function serialize()
public function serialize(): array
{
return ['bar' => $this->bar];
}
Expand Down

0 comments on commit 31497c1

Please sign in to comment.