8000 minor #43700 Fix deprecations on PHP 8.2 (nicolas-grekas) · symfony/symfony@e602345 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit e602345

Browse files
committed
minor #43700 Fix deprecations on PHP 8.2 (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- Fix deprecations on PHP 8.2 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 924ebdc Fix deprecations on PHP 8.2
2 parents 7d20c4d + 924ebdc commit e602345

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Cache/Traits/MemcachedTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function doSave(array $values, int $lifetime)
255255
protected function doFetch(array $ids)
256256
{
257257
try {
258-
$encodedIds = array_map('self::encodeKey', $ids);
258+
$encodedIds = array_map([__CLASS__, 'encodeKey'], $ids);
259259

260260
$encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds));
261261

@@ -284,7 +284,7 @@ protected function doHave($id)
284284
protected function doDelete(array $ids)
285285
{
286286
$ok = true;
287-
$encodedIds = array_map('self::encodeKey', $ids);
287+
$encodedIds = array_map([__CLASS__, 'encodeKey'], $ids);
288288
foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) {
289289
if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) {
290290
$ok = false;

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected function formatChoiceQuestionChoices(ChoiceQuestion $question, $tag)
207207
{
208208
$messages = [];
209209

210-
$maxWidth = max(array_map('self::strlen', array_keys($choices = $question->getChoices())));
210+
$maxWidth = max(array_map([__CLASS__, 'strlen'], array_keys($choices = $question->getChoices())));
211211

212212
foreach ($choices as $key => $value) {
213213
$padding = str_repeat(' ', $maxWidth - self::strlen($key));

0 commit comments

Comments
 (0)
0