Skip to content

Commit

Permalink
PHP 8.3 Support (#6)
Browse files Browse the repository at this point in the history
* Laravel Pint Fixes

* PHP 8.3 Support

* WIP
  • Loading branch information
claudiodekker authored Oct 24, 2024
1 parent 56099b8 commit e59fe60
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.1, 8.2 ]
php: [ 8.1, 8.2, 8.3 ]
laravel: [ 9, 10, 11 ]
stability: [ 'prefer-lowest', 'prefer-stable' ]
include:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [v0.1.1](https://github.com/lmsqueezy/plain-ui-components/compare/v0.1.0...v0.1.1) - 2024-10-24

### Added
- Laravel 11 Support ([#4](https://github.com/lmsqueezy/plain-ui-components/pull/4))
- PHP 8.3 Support ([#6](https://github.com/lmsqueezy/plain-ui-components/pull/6))

## [v0.1.0](https://github.com/lmsqueezy/plain-ui-components/releases/tag/v0.1.0) - 2023-05-11

### Added
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"source": "https://github.com/lmsqueezy/plain-ui-components"
},
"require": {
"php": "~8.1.0|~8.2.0",
"php": "~8.1.0|~8.2.0|~8.3.0",
"illuminate/http": "^9.33|^10.0|^11.0",
"illuminate/support": "^9.33|^10.0|^11.0"
},
Expand Down Expand Up @@ -36,4 +36,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
4 changes: 2 additions & 2 deletions src/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Card
/**
* Create a new card instance.
*/
protected function __construct(string $key, int $ttl = null)
protected function __construct(string $key, ?int $ttl = null)
{
$this->key = $key;
$this->ttl = $ttl;
Expand All @@ -33,7 +33,7 @@ protected function __construct(string $key, int $ttl = null)
/**
* Fluently create a new card instance.
*/
public static function make(string $key, int $ttl = null): static
public static function make(string $key, ?int $ttl = null): static
{
return new static($key, $ttl);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Cards.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function __construct()
*/
public static function make(): static
{
return new static();
return new static;
}

/**
Expand Down Expand Up @@ -66,7 +66,7 @@ public function bind(string $key, callable $resolver): static
/**
* Resolve the requested cardKeys into an array.
*/
public function toArray(Request $request = null): array
public function toArray(?Request $request = null): array
{
$keys = $request?->json('cardKeys');

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Container implements Component
*/
public static function make(): static
{
return new static();
return new static;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Components/CopyButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CopyButton implements ContainerComponent, RowComponent
/**
* Create a new copy button component instance.
*/
protected function __construct(string $value, string $tooltip = null)
protected function __construct(string $value, ?string $tooltip = null)
{
$this->value = $value;
$this->tooltip = $tooltip;
Expand All @@ -29,7 +29,7 @@ protected function __construct(string $value, string $tooltip = null)
/**
* Fluently create a new copy button component instance.
*/
public static function make(string $value, string $tooltip = null): static
public static function make(string $value, ?string $tooltip = null): static
{
return new static($value, $tooltip);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Row.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Row implements ContainerComponent
/**
* Create a new row component instance.
*/
public function __construct(RowComponent $main = null, RowComponent $aside = null)
public function __construct(?RowComponent $main = null, ?RowComponent $aside = null)
{
if ($main) {
$this->addMain($main);
Expand All @@ -35,7 +35,7 @@ public function __construct(RowComponent $main = null, RowComponent $aside = nul
/**
* Fluently create a new row component instance.
*/
public static function make(RowComponent $main = null, RowComponent $aside = null): static
public static function make(?RowComponent $main = null, ?RowComponent $aside = null): static
{
return new static($main, $aside);
}
Expand Down

0 comments on commit e59fe60

Please sign in to comment.