Skip to content

Commit

Permalink
Revert readonly properties (#642)
Browse files Browse the repository at this point in the history
* Revert "Drop old versions of PHP and Symfony (#640)"

This reverts commit d67bafb.

* Bump deps
  • Loading branch information
VincentLanglet authored Dec 7, 2024
1 parent 669f0c2 commit 289f249
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/Action/CompareAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
final class CompareAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/IndexAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
final class IndexAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/ViewDetailAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
final class ViewDetailAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/ViewEntityAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
final class ViewEntityAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/ViewRevisionAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
final class ViewRevisionAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/AuditManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
*/
class AuditManager
{
private readonly MetadataFactory $metadataFactory;
private MetadataFactory $metadataFactory;

public function __construct(
private readonly AuditConfiguration $config,
private readonly ?ClockInterface $clock = null,
private AuditConfiguration $config,
private ?ClockInterface $clock = null,
) {
$this->metadataFactory = $config->createMetadataFactory();
}
Expand Down
8 changes: 4 additions & 4 deletions src/ChangedEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class ChangedEntity
* @phpstan-param T $entity
*/
public function __construct(
private readonly string $className,
private readonly array $id,
private readonly string $revType,
private readonly object $entity,
private string $className,
private array $id,
private string $revType,
private object $entity,
) {
}

Expand Down
12 changes: 6 additions & 6 deletions src/DeferredChangedManyToManyEntityRevisionToPersist.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ final class DeferredChangedManyToManyEntityRevisionToPersist
* @param ClassMetadata<object> $targetClass
*/
public function __construct(
private readonly object $entity,
private readonly string $revType,
private readonly array $entityData,
private readonly array|ManyToManyOwningSideMapping $assoc,
private readonly ClassMetadata $class,
private readonly ClassMetadata $targetClass,
private object $entity,
private string $revType,
private array $entityData,
private array|ManyToManyOwningSideMapping $assoc,
private ClassMetadata $class,
private ClassMetadata $targetClass,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/CacheListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
final class CacheListener implements EventSubscriber
{
public function __construct(private readonly AuditReader $auditReader)
public function __construct(private AuditReader $auditReader)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Revision
*/
public function __construct(
private $rev,
private readonly \DateTime $timestamp,
private readonly ?string $username,
private \DateTime $timestamp,
private ?string $username,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ClockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testFixedClockIsUsed(): void
protected function getClock(): ClockInterface
{
return new class($this->getFixedTime()) implements ClockInterface {
public function __construct(private readonly \DateTimeImmutable $now)
public function __construct(private \DateTimeImmutable $now)
{
}

Expand Down

0 comments on commit 289f249

Please sign in to comment.