Skip to content

Commit

Permalink
Merge branch 'release/4.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lindyhopchris committed Nov 30, 2024
2 parents 98899c6 + 73426be commit fd7ebf8
Show file tree
Hide file tree
Showing 37 changed files with 63 additions and 52 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
laravel: [11]
php: [8.2, 8.3, 8.4]
core: ['4.3.2', '5.0.1']

steps:
- name: Checkout Code
Expand All @@ -30,8 +30,8 @@ jobs:
coverage: none
ini-values: error_reporting=E_ALL

- name: Set Laravel Version
run: composer require "illuminate/database:^${{ matrix.laravel }}" --no-update
- name: Set Laravel JSON:API Core Version
run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update

- name: Install dependencies
uses: nick-fields/retry@v3
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. This projec

## Unreleased

## [4.4.0] - 2024-11-30

### Added

- Allow `laravel-json-api/core` v4 and v5.

### Fixed

- Remove deprecation notices in PHP 8.4.

## [4.3.1] - 2024-10-31

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ext-json": "*",
"illuminate/database": "^11.0",
"illuminate/support": "^11.0",
"laravel-json-api/core": "^4.0"
"laravel-json-api/core": "^4.3.2|^5.0.1"
},
"require-dev": {
"orchestra/testbench": "^9.0",
Expand All @@ -50,7 +50,7 @@
"dev-develop": "4.x-dev"
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"sort-packages": true
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
failOnWarning="true"
failOnDeprecation="true"
failOnNotice="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
>
<coverage/>
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/ArrayHash.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ArrayHash extends Attribute
* @param string|null $column
* @return ArrayHash
*/
public static function make(string $fieldName, string $column = null): self
public static function make(string $fieldName, ?string $column = null): self
{
return new self($fieldName, $column);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/ArrayList.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ArrayList extends Attribute
* @param string|null $column
* @return ArrayList
*/
public static function make(string $fieldName, string $column = null): self
public static function make(string $fieldName, ?string $column = null): self
{
return new self($fieldName, $column);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ abstract protected function assertValue($value): void;
* @param string $fieldName
* @param string|null $column
*/
public function __construct(string $fieldName, string $column = null)
public function __construct(string $fieldName, ?string $column = null)
{
if (empty($fieldName)) {
throw new InvalidArgumentException('Expecting a non-empty string field name.');
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Boolean extends Attribute
* @param string|null $column
* @return Boolean
*/
public static function make(string $fieldName, string $column = null): self
public static function make(string $fieldName, ?string $column = null): self
{
return new self($fieldName, $column);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DateTime extends Attribute
* @param string|null $column
* @return static
*/
public static function make(string $fieldName, string $column = null): self
public static function make(string $fieldName, ?string $column = null): self
{
return new static($fieldName, $column);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Fields/ID.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ID implements IDContract, Fillable
* @param string|null $column
* @return static
*/
public static function make(string $column = null): self
public static function make(?string $column = null): self
{
return new static($column);
}
Expand All @@ -46,7 +46,7 @@ public static function make(string $column = null): self
*
* @param string|null $column
*/
public function __construct(string $column = null)
public function __construct(?string $column = null)
{
$this->column = $column ?: null;
$this->sortable();
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Number extends Attribute
* @param string|null $column
* @return Number
*/
public static function make(string $fieldName, string $column = null): self
public static function make(string $fieldName, ?string $column = null): self
{
return new self($fieldName, $column);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Fields/Relations/BelongsTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BelongsTo extends ToOne implements FillableToOne
* @param string|null $relation
* @return static
*/
public static function make(string $fieldName, string $relation = null): BelongsTo
public static function make(string $fieldName, ?string $relation = null): BelongsTo
{
return new static($fieldName, $relation);
}
Expand All @@ -37,7 +37,7 @@ public static function make(string $fieldName, string $relation = null): Belongs
* @param string $fieldName
* @param string|null $relation
*/
public function __construct(string $fieldName, string $relation = null)
public function __construct(string $fieldName, ?string $relation = null)
{
parent::__construct($fieldName, $relation);
$this->mustValidate();
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Relations/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BelongsToMany extends ToMany implements FillableToMany
* @param string|null $relation
* @return BelongsToMany
*/
public static function make(string $fieldName, string $relation = null): BelongsToMany
public static function make(string $fieldName, ?string $relation = null): BelongsToMany
{
return new self($fieldName, $relation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Relations/HasMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class HasMany extends ToMany implements FillableToMany
* @param string|null $relation
* @return HasMany
*/
public static function make(string $fieldName, string $relation = null): HasMany
public static function make(string $fieldName, ?string $relation = null): HasMany
{
return new self($fieldName, $relation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Relations/HasManyThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HasManyThrough extends ToMany
* @param string|null $relation
* @return HasManyThrough
*/
public static function make(string $fieldName, string $relation = null): HasManyThrough
public static function make(string $fieldName, ?string $relation = null): HasManyThrough
{
return new self($fieldName, $relation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Relations/HasOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HasOne extends ToOne implements FillableToOne
* @param string|null $relation
* @return HasOne
*/
public static function make(string $fieldName, string $relation = null): HasOne
public static function make(string $fieldName, ?string $relation = null): HasOne
{
return new self($fieldName, $relation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Relations/HasOneThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HasOneThrough extends ToOne
* @param string|null $relation
* @return HasOneThrough
*/
public static function make(string $fieldName, string $relation = null): HasOneThrough
public static function make(string $fieldName, ?string $relation = null): HasOneThrough
{
return new self($fieldName, $relation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Relations/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ abstract protected function guessInverse(): string;
* @param string $fieldName
* @param string|null $relation
*/
public function __construct(string $fieldName, string $relation = null)
public function __construct(string $fieldName, ?string $relation = null)
{
$this->name = $fieldName;
$this->relation = $relation;
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/SoftDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SoftDelete extends DateTime
* @param string $fieldName
* @param string|null $column
*/
public function __construct(string $fieldName, string $column = null)
public function __construct(string $fieldName, ?string $column = null)
{
parent::__construct($fieldName, $column);
$this->unguarded();
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Str extends Attribute
* @param string|null $column
* @return Str
*/
public static function make(string $fieldName, string $column = null): self
public static function make(string $fieldName, ?string $column = null): self
{
return new self($fieldName, $column);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/Has.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Has implements Filter
* @param string|null $key
* @return static
*/
public static function make(Schema $schema, string $fieldName, string $key = null)
public static function make(Schema $schema, string $fieldName, ?string $key = null)
{
return new static($schema, $fieldName, $key);
}
Expand All @@ -42,7 +42,7 @@ public static function make(Schema $schema, string $fieldName, string $key = nul
* @param string $fieldName
* @param string|null $key
*/
public function __construct(Schema $schema, string $fieldName, string $key = null)
public function __construct(Schema $schema, string $fieldName, ?string $key = null)
{
$this->schema = $schema;
$this->fieldName = $fieldName;
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/Scope.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Scope implements Filter
* @param string|null $scope
* @return static
*/
public static function make(string $name, string $scope = null)
public static function make(string $name, ?string $scope = null)
{
return new static($name, $scope);
}
Expand All @@ -48,7 +48,7 @@ public static function make(string $name, string $scope = null)
* @param string $name
* @param string|null $scope
*/
public function __construct(string $name, string $scope = null)
public function __construct(string $name, ?string $scope = null)
{
$this->name = $name;
$this->scope = $scope ?: $this->guessScope();
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/Where.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Where implements Filter
* @param string|null $column
* @return static
*/
public static function make(string $name, string $column = null): self
public static function make(string $name, ?string $column = null): self
{
return new static($name, $column);
}
Expand All @@ -45,7 +45,7 @@ public static function make(string $name, string $column = null): self
* @param string $name
* @param string|null $column
*/
public function __construct(string $name, string $column = null)
public function __construct(string $name, ?string $column = null)
{
$this->name = $name;
$this->column = $column ?: $this->guessColumn();
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/WhereAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WhereAll implements Filter
* @param array<string>|null $columns
* @return static
*/
public static function make(string $name, array $columns = null): static
public static function make(string $name, ?array $columns = null): static
{
return new static($name, $columns);
}
Expand All @@ -45,7 +45,7 @@ public static function make(string $name, array $columns = null): static
* @param string $name
* @param array<string>|null $columns
*/
public function __construct(string $name, array $columns = null)
public function __construct(string $name, ?array $columns = null)
{
$this->name = $name;
$this->columns = $columns ?? [];
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/WhereAny.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WhereAny implements Filter
* @param array<string>|null $columns
* @return static
*/
public static function make(string $name, array $columns = null): static
public static function make(string $name, ?array $columns = null): static
{
return new static($name, $columns);
}
Expand All @@ -45,7 +45,7 @@ public static function make(string $name, array $columns = null): static
* @param string $name
* @param array<string>|null $columns
*/
public function __construct(string $name, array $columns = null)
public function __construct(string $name, ?array $columns = null)
{
$this->name = $name;
$this->columns = $columns ?? [];
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/WhereHas.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class WhereHas implements Filter
* @param string|null $key
* @return static
*/
public static function make(Schema $schema, string $fieldName, string $key = null)
public static function make(Schema $schema, string $fieldName, ?string $key = null)
{
return new static($schema, $fieldName, $key);
}
Expand All @@ -45,7 +45,7 @@ public static function make(Schema $schema, string $fieldName, string $key = nul
* @param string $fieldName
* @param string|null $key
*/
public function __construct(Schema $schema, string $fieldName, string $key = null)
public function __construct(Schema $schema, string $fieldName, ?string $key = null)
{
$this->schema = $schema;
$this->fieldName = $fieldName;
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/WhereIdIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class WhereIdIn implements Filter
* @param string|null $key
* @return static
*/
public static function make(Schema $schema, string $key = null): self
public static function make(Schema $schema, ?string $key = null): self
{
if ($schema instanceof EloquentSchema) {
return new static(
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/WhereIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class WhereIn implements Filter
* @param string|null $column
* @return static
*/
public static function make(string $name, string $column = null): self
public static function make(string $name, ?string $column = null): self
{
return new static($name, $column);
}
Expand All @@ -44,7 +44,7 @@ public static function make(string $name, string $column = null): self
* @param string $name
* @param string|null $column
*/
public function __construct(string $name, string $column = null)
public function __construct(string $name, ?string $column = null)
{
$this->name = $name;
$this->column = $column ?: $this->guessColumn();
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/WhereNull.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class WhereNull implements Filter
*
* @return static
*/
public static function make(string $name, string $column = null): self
public static function make(string $name, ?string $column = null): self
{
return new static($name, $column);
}
Expand All @@ -42,7 +42,7 @@ public static function make(string $name, string $column = null): self
*
* @param string|null $column
*/
public function __construct(string $name, string $column = null)
public function __construct(string $name, ?string $column = null)
{
$this->name = $name;
$this->column = $column ?: $this->guessColumn();
Expand Down
2 changes: 1 addition & 1 deletion src/ProxySchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function isModel($model): bool
* @param Model|null $model
* @return ProxyContract
*/
public function newProxy(Model $model = null): ProxyContract
public function newProxy(?Model $model = null): ProxyContract
{
$proxyClass = $this->model();

Expand Down
2 changes: 1 addition & 1 deletion src/QueryBuilder/Applicators/FilterApplicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FilterApplicator
* @param SchemaRelation|null $relation
* @return static
*/
public static function make(Schema $schema, SchemaRelation $relation = null): self
public static function make(Schema $schema, ?SchemaRelation $relation = null): self
{
return new self($schema, $relation);
}
Expand Down
Loading

0 comments on commit fd7ebf8

Please sign in to comment.