Skip to content

Commit

Permalink
fix: update OutputEndpointData create method signature for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
goktugoner23 committed Jan 15, 2025
1 parent a120c9e commit fdc553d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions camel/Output/OutputEndpointData.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,13 @@ public static function splitIntoFileAndRegularParameters(array $parameters): arr
return [$files, $regularParameters];
}

public static function create(array $parameters = []): static
public static function create(BaseDTO|array $data, BaseDTO|array $inheritFrom = []): static
{
return new static($parameters);
if (is_array($data)) {
return new static($data);
}

// If it's a DTO, convert to array
return new static($data->toArray());
}
}

0 comments on commit fdc553d

Please sign in to comment.