Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prepare for php 8.4 deprecations
  • Loading branch information
jasperwissels committed Nov 24, 2025
commit e05aaa365df3dc4983f9ca6e997d98750e44bcba
2 changes: 1 addition & 1 deletion examples/bootstrap_examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getOfficialLink() {
* optionally helpers for the specific profile
*/

public function setTimestamps(ResourceInterface $resource, \DateTimeInterface $created=null, \DateTimeInterface $updated=null) {
public function setTimestamps(ResourceInterface $resource, ?\DateTimeInterface $created=null, ?\DateTimeInterface $updated=null) {
if ($resource instanceof ResourceIdentifierObject) {
throw new Exception('cannot add attributes to identifier objects');
}
Expand Down
2 changes: 1 addition & 1 deletion src/ErrorsDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ErrorsDocument extends Document {
/**
* @param ErrorObject $errorObject optional
*/
public function __construct(ErrorObject $errorObject=null) {
public function __construct(?ErrorObject $errorObject=null) {
parent::__construct();

if ($errorObject !== null) {
Expand Down
2 changes: 1 addition & 1 deletion tests/example_output/ExampleTimestampsProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function getOfficialLink() {
return 'https://jsonapi.org/recommendations/#authoring-profiles';
}

public function setTimestamps(ResourceInterface $resource, \DateTimeInterface $created=null, \DateTimeInterface $updated=null) {
public function setTimestamps(ResourceInterface $resource, ?\DateTimeInterface $created=null, ?\DateTimeInterface $updated=null) {
if ($resource instanceof ResourceIdentifierObject) {
throw new Exception('cannot add attributes to identifier objects');
}
Expand Down