Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#359] Add PHP 8.2 support #60

Merged
merged 1 commit into from Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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