Skip to content

Commit

Permalink
bug #264 chore: add tests for PHP 8.4 and fix deprecations (Chris53897)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

chore: add tests for PHP 8.4 and fix deprecations

Commits
-------

50d52af chore: add tests for PHP 8.4 and fix deprecations
  • Loading branch information
xabbuh committed Jan 13, 2025
2 parents 50bb97c + 50d52af commit dc0f0dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- 8.1
- 8.2
- 8.3
- 8.4
dependencies: [highest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/JsonBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getValues(): array
return $this->values;
}

public function setValues(array $values, string $pathPrefix = null): self
public function setValues(array $values, ?string $pathPrefix = null): self
{
foreach ($values as $key => $value) {
$path = sprintf('%s[%s]', $pathPrefix, $key);
Expand Down
4 changes: 2 additions & 2 deletions src/Command/CKEditorInstallerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ private function info(string $message, OutputInterface $output): void
private function block(
string $message,
OutputInterface $output,
string $background = null,
string $font = null
?string $background = null,
?string $font = null
): void {
$options = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Installer/CKEditorInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private function getDownloadUrl(array $options): string
/**
* @return resource
*/
private function createStreamContext(callable $notifier = null)
private function createStreamContext(?callable $notifier = null)
{
$context = [];
$proxy = getenv('https_proxy') ?: getenv('http_proxy');
Expand Down Expand Up @@ -306,7 +306,7 @@ private function extractFile(string $file, string $rewrite, string $origin, arra
}
}

private function notify(callable $notifier = null, string $type = null, mixed $data = null): mixed
private function notify(?callable $notifier = null, ?string $type = null, mixed $data = null): mixed
{
if (null !== $notifier) {
return $notifier($type, $data);
Expand Down

0 comments on commit dc0f0dc

Please sign in to comment.