Skip to content

Fix the nullable parameter declarations for compatibility with PHP 8.4#148

Merged
vjik merged 2 commits intoyiisoft:masterfrom
martio:feature/php-8-4
Dec 25, 2024
Merged

Fix the nullable parameter declarations for compatibility with PHP 8.4#148
vjik merged 2 commits intoyiisoft:masterfrom
martio:feature/php-8-4

Conversation

@martio
Copy link
Copy Markdown
Contributor

@martio martio commented Dec 25, 2024

Q A
Is bugfix? ✅/✖️
New feature? ✔️/❌
Breaks BC? ✔️/❌
Fixed issues comma-separated list of tickets # fixed by the PR, if any

I have prepared a small fix that resolves the following issue:

DEPRECATED  Yiisoft\Translator\TranslatorInterface::translate(): Implicitly marking parameter $locale as nullable is deprecated, the explicit nullable type must be used instead in vendor/yiisoft/translator/src/TranslatorInterface.php on line 46.

Yiisoft\Translator\TranslatorInterface

   public function translate(
       string|Stringable $id,
       array $parameters = [],
       string $category = null,
       string $locale = null
   ): string;

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.35%. Comparing base (50dcaa5) to head (b3f3749).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #148   +/-   ##
=========================================
  Coverage     99.35%   99.35%           
  Complexity      111      111           
=========================================
  Files            13       13           
  Lines           308      308           
=========================================
  Hits            306      306           
  Misses            2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vjik vjik merged commit 9e202ca into yiisoft:master Dec 25, 2024
@vjik
Copy link
Copy Markdown
Member

vjik commented Dec 25, 2024

@martio Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants