Skip to content

Commit

Permalink
Fix deprecations for SF4.4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Jul 3, 2020
1 parent 334fb6d commit 3cb1bdc
Show file tree
Hide file tree
Showing 239 changed files with 1,049 additions and 1,128 deletions.
2 changes: 1 addition & 1 deletion src/Surfnet/Stepup/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function update($configurationAsJson)
$this->apply(new EmailTemplatesUpdatedEvent(self::CONFIGURATION_ID, $decodedConfiguration['email_templates']));
}

public function getAggregateRootId()
public function getAggregateRootId(): string
{
return self::CONFIGURATION_ID;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\AllowedSecondFactorList;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Configuration;
use Symfony\Component\Form\Exception\LogicException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function deserialize(array $data)
);
}

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

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

public function serialize()
public function serialize(): array
{
return ['id' => $this->id, 'identity_providers' => $this->identityProviders];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;

Expand Down Expand Up @@ -55,7 +55,7 @@ public static function deserialize(array $data)
/**
* @return array
*/
public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function deserialize(array $data)
/**
* @return array
*/
public function serialize()
public function serialize(): array
{
return ['id' => $this->id];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\NumberOfTokensPerIdentityOption;
Expand Down Expand Up @@ -92,7 +92,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\NumberOfTokensPerIdentityOption;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\ContactInformation;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
Expand Down Expand Up @@ -85,7 +85,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\ContactInformation;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\RaLocationId;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\Location;
use Surfnet\Stepup\Configuration\Value\RaLocationId;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\RaLocationId;
Expand Down Expand Up @@ -56,7 +56,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\RaLocationId;
use Surfnet\Stepup\Configuration\Value\RaLocationName;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\InstitutionAuthorizationOption;
Expand Down Expand Up @@ -61,7 +61,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function deserialize(array $data)
/**
* @return array
*/
public function serialize()
public function serialize(): array
{
return ['id' => $this->id, 'service_providers' => $this->serviceProviders];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\ShowRaaContactInformationOption;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

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

public function serialize()
public function serialize(): array
{
return ['id' => $this->id, 'sraa_list' => $this->sraaList];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\UseRaLocationsOption;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\InstitutionAuthorizationOption;
Expand Down Expand Up @@ -62,7 +62,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\InstitutionAuthorizationOption;
Expand Down Expand Up @@ -61,7 +61,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Surfnet\Stepup\Configuration\Event;

use Broadway\Serializer\SerializableInterface;
use Broadway\Serializer\Serializable as SerializableInterface;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
use Surfnet\Stepup\Configuration\Value\VerifyEmailOption;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function deserialize(array $data)
);
}

public function serialize()
public function serialize(): array
{
return [
'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

namespace Surfnet\Stepup\Configuration\EventSourcing;

use Broadway\EventHandling\EventBusInterface;
use Broadway\EventSourcing\AggregateFactory\AggregateFactoryInterface;
use Broadway\EventHandling\EventBus as EventBusInterface;
use Broadway\EventSourcing\AggregateFactory\AggregateFactory as AggregateFactoryInterface;
use Broadway\EventSourcing\EventSourcingRepository;
use Broadway\EventStore\EventStoreInterface;
use Broadway\EventStore\EventStore as EventStoreInterface;
use Surfnet\Stepup\Configuration\Configuration;

class ConfigurationRepository extends EventSourcingRepository
{
Expand All @@ -30,6 +31,6 @@ public function __construct(
EventBusInterface $eventBus,
AggregateFactoryInterface $aggregateFactory
) {
parent::__construct($eventStore, $eventBus, 'Surfnet\Stepup\Configuration\Configuration', $aggregateFactory);
parent::__construct($eventStore, $eventBus, Configuration::class, $aggregateFactory);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

namespace Surfnet\Stepup\Configuration\EventSourcing;

use Broadway\EventHandling\EventBusInterface;
use Broadway\EventSourcing\AggregateFactory\AggregateFactoryInterface;
use Broadway\EventHandling\EventBus as EventBusInterface;
use Broadway\EventSourcing\AggregateFactory\AggregateFactory as AggregateFactoryInterface;
use Broadway\EventSourcing\EventSourcingRepository;
use Broadway\EventStore\EventStoreInterface;
use Broadway\EventStore\EventStore as EventStoreInterface;
use Surfnet\Stepup\Configuration\InstitutionConfiguration;

class InstitutionConfigurationRepository extends EventSourcingRepository
{
Expand All @@ -33,7 +34,7 @@ public function __construct(
parent::__construct(
$eventStore,
$eventBus,
'Surfnet\Stepup\Configuration\InstitutionConfiguration',
InstitutionConfiguration::class,
$aggregateFactory
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public function destroy()
$this->apply(new InstitutionConfigurationRemovedEvent($this->institutionConfigurationId, $this->institution));
}

public function getAggregateRootId()
public function getAggregateRootId(): string
{
return $this->institutionConfigurationId;
}
Expand Down
Loading

0 comments on commit 3cb1bdc

Please sign in to comment.