Skip to content

Commit

Permalink
[#359] Add PHP 8.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
kpicaza committed Dec 9, 2022
1 parent a3e9656 commit 184948a
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/coding-standards.yml
Expand Up @@ -22,6 +22,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mutation-tests.yml
Expand Up @@ -22,6 +22,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/phpunit.yml
Expand Up @@ -22,6 +22,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/psalm.yml
Expand Up @@ -22,6 +22,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": "^7.4|^8.0|^8.1"
"php": "^7.4|^8.0|^8.1|^8.2"
},
"require-dev": {
"icanhazstring/composer-unused": "^0.8",
Expand All @@ -26,7 +26,7 @@
"phpunit/phpunit": "^8.0 || ^9.0",
"roave/infection-static-analysis-plugin": "^1.18",
"squizlabs/php_codesniffer": "^3.4",
"symfony/var-dumper": "^4.2 || ^5.0",
"symfony/var-dumper": "^4.2 || ^5.0 || ^6.0",
"vimeo/psalm": "^4.4"
},
"autoload": {
Expand Down
10 changes: 5 additions & 5 deletions src/Write/Event/FeatureWasCreated.php
Expand Up @@ -5,30 +5,30 @@
namespace Pheature\Core\Toggle\Write\Event;

use Pheature\Core\Toggle\Write\FeatureId;
use DatetimeImmutable;
use DateTimeImmutable;

final class FeatureWasCreated
{
private string $featureId;
private DatetimeImmutable $occurredAt;
private DateTimeImmutable $occurredAt;

public function __construct(string $featureId, DatetimeImmutable $occurredAt)
public function __construct(string $featureId, DateTimeImmutable $occurredAt)
{
$this->featureId = $featureId;
$this->occurredAt = $occurredAt;
}

public static function occur(string $featureId): self
{
return new self($featureId, new DatetimeImmutable());
return new self($featureId, new DateTimeImmutable());
}

public function featureId(): FeatureId
{
return FeatureId::fromString($this->featureId);
}

public function occurredAt(): DatetimeImmutable
public function occurredAt(): DateTimeImmutable
{
return $this->occurredAt;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Write/Event/FeatureWasDisabled.php
Expand Up @@ -5,30 +5,30 @@
namespace Pheature\Core\Toggle\Write\Event;

use Pheature\Core\Toggle\Write\FeatureId;
use DatetimeImmutable;
use DateTimeImmutable;

final class FeatureWasDisabled
{
private string $featureId;
private DatetimeImmutable $occurredAt;
private DateTimeImmutable $occurredAt;

public function __construct(string $featureId, DatetimeImmutable $occurredAt)
public function __construct(string $featureId, DateTimeImmutable $occurredAt)
{
$this->featureId = $featureId;
$this->occurredAt = $occurredAt;
}

public static function occur(string $featureId): self
{
return new self($featureId, new DatetimeImmutable());
return new self($featureId, new DateTimeImmutable());
}

public function featureId(): FeatureId
{
return FeatureId::fromString($this->featureId);
}

public function occurredAt(): DatetimeImmutable
public function occurredAt(): DateTimeImmutable
{
return $this->occurredAt;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Write/Event/FeatureWasEnabled.php
Expand Up @@ -5,30 +5,30 @@
namespace Pheature\Core\Toggle\Write\Event;

use Pheature\Core\Toggle\Write\FeatureId;
use DatetimeImmutable;
use DateTimeImmutable;

final class FeatureWasEnabled
{
private string $featureId;
private DatetimeImmutable $occurredAt;
private DateTimeImmutable $occurredAt;

public function __construct(string $featureId, DatetimeImmutable $occurredAt)
public function __construct(string $featureId, DateTimeImmutable $occurredAt)
{
$this->featureId = $featureId;
$this->occurredAt = $occurredAt;
}

public static function occur(string $featureId): self
{
return new self($featureId, new DatetimeImmutable());
return new self($featureId, new DateTimeImmutable());
}

public function featureId(): FeatureId
{
return FeatureId::fromString($this->featureId);
}

public function occurredAt(): DatetimeImmutable
public function occurredAt(): DateTimeImmutable
{
return $this->occurredAt;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Write/Event/StrategyWasAdded.php
Expand Up @@ -5,7 +5,7 @@
namespace Pheature\Core\Toggle\Write\Event;

use Pheature\Core\Toggle\Write\FeatureId;
use DatetimeImmutable;
use DateTimeImmutable;
use Pheature\Core\Toggle\Write\Payload;
use Pheature\Core\Toggle\Write\Segment;
use Pheature\Core\Toggle\Write\SegmentId;
Expand All @@ -19,7 +19,7 @@
final class StrategyWasAdded
{
private string $featureId;
private DatetimeImmutable $occurredAt;
private DateTimeImmutable $occurredAt;
private string $strategyId;
private string $strategyType;
/** @var WriteSegment[] */
Expand All @@ -31,7 +31,7 @@ public function __construct(
string $strategyId,
string $strategyType,
array $segments,
DatetimeImmutable $occurredAt
DateTimeImmutable $occurredAt
) {
$this->featureId = $featureId;
$this->strategyId = $strategyId;
Expand All @@ -43,7 +43,7 @@ public function __construct(
/** @param WriteSegment[] $segments */
public static function occur(string $featureId, string $strategyId, string $strategyType, array $segments): self
{
return new self($featureId, $strategyId, $strategyType, $segments, new DatetimeImmutable());
return new self($featureId, $strategyId, $strategyType, $segments, new DateTimeImmutable());
}

public function featureId(): FeatureId
Expand All @@ -61,7 +61,7 @@ public function strategyType(): StrategyType
return StrategyType::fromString($this->strategyType);
}

public function occurredAt(): DatetimeImmutable
public function occurredAt(): DateTimeImmutable
{
return $this->occurredAt;
}
Expand Down

0 comments on commit 184948a

Please sign in to comment.