Skip to content

Commit

Permalink
Move back to php8.1 requirement as minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
DZunke committed Apr 8, 2024
1 parent 9960e36 commit 9b721f5
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.3' ]
php: [ '8.1', '8.2', '8.3' ]

name: PHP ${{ matrix.php }}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"bin/panaly"
],
"require": {
"php": "^8.3",
"php": "^8.1",
"psr/log": "^3.0",
"symfony/console": "^7.0",
"symfony/event-dispatcher": "^7.0",
Expand Down
6 changes: 3 additions & 3 deletions src/Collector/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

use function assert;

readonly class Collector
class Collector
{
public function __construct(
private ConfigurationFile $configurationFile,
private RuntimeConfiguration $runtimeConfiguration,
private readonly ConfigurationFile $configurationFile,
private readonly RuntimeConfiguration $runtimeConfiguration,
) {
}

Expand Down
10 changes: 5 additions & 5 deletions src/Configuration/ConfigurationFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use function array_map;
use function array_values;

readonly class ConfigurationFile
class ConfigurationFile
{
/**
* @param list<Plugin> $plugins
Expand All @@ -24,10 +24,10 @@
* @param list<Reporting> $reporting
*/
public function __construct(
public array $plugins,
public array $metricGroups,
public array $storage,
public array $reporting,
public readonly array $plugins,
public readonly array $metricGroups,
public readonly array $storage,
public readonly array $reporting,
) {
}

Expand Down
10 changes: 5 additions & 5 deletions src/Configuration/ConfigurationFile/Metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

use Panaly\Configuration\Exception\InvalidConfigurationFile;

readonly class Metric
class Metric
{
public function __construct(
public string $identifier,
public string $metric,
public string|null $title,
public array $options,
public readonly string $identifier,
public readonly string $metric,
public readonly string|null $title,
public readonly array $options,
) {
if ($this->identifier === '') {
throw InvalidConfigurationFile::metricMustNotHaveABlankIdentifier();
Expand Down
8 changes: 4 additions & 4 deletions src/Configuration/ConfigurationFile/MetricGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

use Panaly\Configuration\Exception\InvalidConfigurationFile;

readonly class MetricGroup
class MetricGroup
{
/** @param list<Metric> $metrics */
public function __construct(
public string $identifier,
public string $title,
public array $metrics,
public readonly string $identifier,
public readonly string $title,
public readonly array $metrics,
) {
if ($this->identifier === '') {
throw InvalidConfigurationFile::metricGroupMustNotHaveABlankName();
Expand Down
6 changes: 3 additions & 3 deletions src/Configuration/ConfigurationFile/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
use function class_exists;
use function is_a;

readonly class Plugin
class Plugin
{
/**
* @param class-string $class
* @param array<string, mixed> $options
*/
public function __construct(
public string $class,
public array $options = [],
public readonly string $class,
public readonly array $options = [],
) {
if (! class_exists($this->class)) {
throw InvalidConfigurationFile::pluginClassNotExists($this->class);
Expand Down
6 changes: 3 additions & 3 deletions src/Configuration/ConfigurationFile/Reporting.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

use Panaly\Configuration\Exception\InvalidConfigurationFile;

readonly class Reporting
class Reporting
{
public function __construct(
public string $identifier,
public array $options,
public readonly string $identifier,
public readonly array $options,
) {
if ($this->identifier === '') {
throw InvalidConfigurationFile::reportingMustNotHaveABlankName();
Expand Down
6 changes: 3 additions & 3 deletions src/Configuration/ConfigurationFile/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

use Panaly\Configuration\Exception\InvalidConfigurationFile;

readonly class Storage
class Storage
{
public function __construct(
public string $identifier,
public array $options,
public readonly string $identifier,
public readonly array $options,
) {
if ($this->identifier === '') {
throw InvalidConfigurationFile::storageMustNotHaveABlankName();
Expand Down
8 changes: 4 additions & 4 deletions src/Event/MetricResultCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
use Panaly\Configuration\RuntimeConfiguration;
use Panaly\Result\Result;

final readonly class MetricResultCreated
final class MetricResultCreated
{
public function __construct(
public ConfigurationFile $configurationFile,
public RuntimeConfiguration $runtimeConfiguration,
public Result $result,
public readonly ConfigurationFile $configurationFile,
public readonly RuntimeConfiguration $runtimeConfiguration,
public readonly Result $result,
) {
}
}
4 changes: 2 additions & 2 deletions src/Event/RuntimeLoaded.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use Panaly\Configuration\RuntimeConfiguration;

final readonly class RuntimeLoaded
final class RuntimeLoaded
{
public function __construct(
public RuntimeConfiguration $runtimeConfiguration,
public readonly RuntimeConfiguration $runtimeConfiguration,
) {
}
}
6 changes: 3 additions & 3 deletions src/Reporting/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
use Panaly\Configuration\RuntimeConfiguration;
use Panaly\Result\Result;

readonly class Handler
class Handler
{
public function __construct(
private ConfigurationFile $configurationFile,
private RuntimeConfiguration $runtimeConfiguration,
private readonly ConfigurationFile $configurationFile,
private readonly RuntimeConfiguration $runtimeConfiguration,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Result/Metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

use Panaly\Result\Metric\Value;

readonly class Metric
class Metric
{
public function __construct(
public string $title,
public Value $value,
public readonly string $title,
public readonly Value $value,
) {
}
}
4 changes: 2 additions & 2 deletions src/Result/Metric/Integer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Panaly\Result\Metric;

final readonly class Integer implements Value
final class Integer implements Value
{
public function __construct(private int $value)
public function __construct(private readonly int $value)
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/Storage/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
use Panaly\Configuration\RuntimeConfiguration;
use Panaly\Result\Result;

readonly class Handler
class Handler
{
public function __construct(
private ConfigurationFile $configurationFile,
private RuntimeConfiguration $runtimeConfiguration,
private readonly ConfigurationFile $configurationFile,
private readonly RuntimeConfiguration $runtimeConfiguration,
) {
}

Expand Down

0 comments on commit 9b721f5

Please sign in to comment.