Skip to content

Commit

Permalink
Revert "Drop old versions of PHP and Symfony (#640)"
Browse files Browse the repository at this point in the history
This reverts commit d67bafb.
  • Loading branch information
VincentLanglet committed Dec 7, 2024
1 parent d67bafb commit c0be94f
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 41 deletions.
28 changes: 14 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
"Audit"
],
"require": {
"php": "^8.1",
"php": "^8.0",
"doctrine/collections": "^1.8 || ^2.0",
"doctrine/dbal": "^3.6",
"doctrine/event-manager": "^1.2 || ^2.0",
"doctrine/orm": "^2.14 || ^3.0",
"doctrine/persistence": "^3.0",
"psr/clock": "^1.0",
"symfony/config": "^6.4 || ^7.1",
"symfony/dependency-injection": "^6.4 || ^7.1",
"symfony/http-kernel": "^6.4 || ^7.1",
"symfony/security-core": "^6.4 || ^7.1",
"symfony/config": "^5.4 || ^6.2 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.2 || ^7.0",
"symfony/security-core": "^5.4 || ^6.2 || ^7.0",
"twig/twig": "^3.0"
},
"require-dev": {
Expand All @@ -38,15 +38,15 @@
"psalm/plugin-phpunit": "^0.18",
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^1.1",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/cache": "^6.4 || ^7.1",
"symfony/filesystem": "^6.4 || ^7.1",
"symfony/framework-bundle": "^6.4 || ^7.1",
"symfony/http-foundation": "^6.4 || ^7.1",
"symfony/phpunit-bridge": "^6.4 || ^7.1",
"symfony/security-bundle": "^6.4 || ^7.1",
"symfony/twig-bundle": "^6.4 || ^7.1",
"symfony/var-dumper": "^6.4 || ^7.1",
"symfony/browser-kit": "^5.4 || ^6.2 || ^7.0",
"symfony/cache": "^5.4 || ^6.2 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.2 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/http-foundation": "^5.4 || ^6.2 || ^7.0",
"symfony/phpunit-bridge": "^6.2",
"symfony/security-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/twig-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/var-dumper": "^5.4 || ^6.2 || ^7.0",
"vimeo/psalm": "^5.7"
},
"conflict": {
Expand Down
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 c0be94f

Please sign in to comment.