Skip to content

Commit 3a81462

Browse files
saundefinedTimWolla
andcommitted
Apply suggestions from code review
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
1 parent 50642ad commit 3a81462

4 files changed

Lines changed: 19 additions & 18 deletions

File tree

releases/8.5/languages/en.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
'features_clone_with_title' => 'Clone with',
2222
'features_clone_with_description' => '<p>Clone objects and update properties with the new <code>clone()</code> syntax, making the "with-er" pattern simple for <code>readonly</code> classes.</p>',
2323
'features_uri_extension_title' => 'URI Extension',
24-
'features_uri_extension_description' => '<p>PHP 8.5 adds a built-in URI extension to parse, normalize, and handle URLs following <code>RFC 3986</code> and <code>WHATWG</code> standards.</p>',
24+
'features_uri_extension_description' => '<p>PHP 8.5 adds a built-in URI extension to parse, normalize, and handle URLs following <em>RFC 3986</em> and <em>WHATWG URL</em> standards.</p>',
2525
'features_no_discard_title' => '#[\NoDiscard] Attribute',
2626
'features_no_discard_description' => '<p>The <code>#[\NoDiscard]</code> attribute warns when a return value isn’t used, helping prevent mistakes and improving overall API safety.</p>',
2727
'features_fcc_in_const_expr_title' => 'Closures and First-Class Callables in Constant Expressions',
28-
'features_fcc_in_const_expr_description' => '<p>Static closures and first-class callables can now be used in constant expressions.</p>',
28+
'features_fcc_in_const_expr_description' => '<p>Static closures and first-class callables can now be used in constant expressions, such as Attribute parameters.</p>',
2929

3030
'pipe_operator_title' => 'Pipe Operator',
3131
'pipe_operator_description' => '<p>The pipe operator allows chaining function calls together without dealing with intermediary variables. This enables replacing many "nested calls" with a chain that can be read forwards, rather than inside-out.</p><p>Learn more about the backstory of this feature in <a href="https://thephp.foundation/blog/2025/07/11/php-85-adds-pipe-operator/" target="_blank" rel="noopener noreferrer">The PHP Foundation’s blog</a>.</p>',
3232

3333
'array_first_last_title' => 'array_first() and array_last() functions',
34-
'array_first_last_description' => '<p>PHP 8.5 adds two new functions for retrieving the first and last values of an array. These functions complement the <code>array_key_first</code> and <code>array_key_last</code> functions.</p>',
34+
'array_first_last_description' => '<p>PHP 8.5 adds two new functions for retrieving the first and last values of an array. These functions complement the <code>array_key_first()</code> and <code>array_key_last()</code> functions.</p>',
3535

3636
'clone_with_title' => 'Clone With',
3737
'clone_with_description' => '<p>It is now possible to update properties during object cloning by passing an associative array to the <code>clone()</code> function. This enables straightforward support of the "with-er" pattern for <code>readonly</code> classes.</p>',

releases/8.5/languages/ru.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
'features_clone_with_title' => 'Clone with',
2222
'features_clone_with_description' => '<p>Клонируйте объекты и обновляйте свойства с помощью нового синтаксиса <code>clone()</code>, который упрощает использование шаблона «with-er» для классов <code>readonly</code>.</p>',
2323
'features_uri_extension_title' => 'Модуль URI',
24-
'features_uri_extension_description' => '<p>В PHP 8.5 добавлен модуль URI для анализа, нормализации и обработки URL-адресов в соответствии со стандартами <code>RFC 3986</code> и <code>WHATWG</code>.</p>',
24+
'features_uri_extension_description' => '<p>В PHP 8.5 добавлен модуль URI для анализа, нормализации и обработки URL-адресов в соответствии со стандартами <em>RFC 3986</em> и <em>WHATWG URL</em>.</p>',
2525
'features_no_discard_title' => 'Атрибут #[\NoDiscard]',
2626
'features_no_discard_description' => '<p>Атрибут <code>#[\NoDiscard]</code> выдаёт предупреждение, если возвращаемое значение не используется, что помогает предотвратить ошибки и повысить общую безопасность API.</p>',
2727
'features_fcc_in_const_expr_title' => 'Замыкания и вызовы первого класса в константных выражениях',
28-
'features_fcc_in_const_expr_description' => '<p>Статические замыкания и вызываемые объекты первого класса теперь могут использоваться в константных выражениях.</p>',
28+
'features_fcc_in_const_expr_description' => '<p>Статические замыкания и вызываемые объекты первого класса теперь могут использоваться в константных выражениях, таких как параметры атрибутов.</p>',
2929

3030
'pipe_operator_title' => 'Оператор Pipe',
3131
'pipe_operator_description' => '<p>Оператор Pipe позволяет связывать вызовы функций в цепочку без использования промежуточных переменных. Позволяет заменить множество «вложенных вызовов» цепочкой.</p><p>Узнайте больше об этой функции в <a href="https://thephp.foundation/blog/2025/07/11/php-85-adds-pipe-operator/" target="_blank" rel="noopener noreferrer">блоге PHP Foundation</a>.</p>',
3232

3333
'array_first_last_title' => 'Функции array_first() и array_last()',
34-
'array_first_last_description' => '<p>В PHP 8.5 добавлены две новые функции для извлечения первого и последнего значения массива, они дополняют функции <code>array_key_first</code> и <code>array_key_last</code>.</p>',
34+
'array_first_last_description' => '<p>В PHP 8.5 добавлены две новые функции для извлечения первого и последнего значения массива, они дополняют функции <code>array_key_first()</code> и <code>array_key_last()</code>.</p>',
3535

3636
'clone_with_title' => 'Clone With',
3737
'clone_with_description' => '<p>Теперь можно обновлять свойства во время клонирования объектов, передавая ассоциативный массив в функцию <code>clone()</code>. Это позволит напрямую поддерживать паттерн «with-er» для классов <code>readonly</code>.</p>',

releases/8.5/release.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ readonly class Color
367367
{
368368
$values = get_object_vars($this);
369369
$values['alpha'] = $alpha;
370+
370371
return new self(...$values);
371372
}
372373
}
@@ -408,7 +409,9 @@ readonly class Color
408409
409410
public function withAlpha(int $alpha): self
410411
{
411-
return clone($this, ['alpha' => $alpha]);
412+
return clone($this, [
413+
'alpha' => $alpha,
414+
]);
412415
}
413416
}
414417

styles/php85.css

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -983,22 +983,20 @@ header nav {
983983
}
984984

985985
.hero {
986+
position: relative;
986987
isolation: isolate;
987988
z-index: 10;
988989
margin-top: calc(var(--spacing) * -4);
989-
height: calc(var(--spacing) * 175);
990-
justify-content: center;
991-
align-items: center;
992990
display: flex;
993-
position: relative;
994-
overflow: hidden
995-
}
996-
997-
@media (min-width: 64rem) {
998-
.hero {
991+
height: calc(var(--spacing) * 160);
992+
align-items: center;
993+
justify-content: center;
994+
overflow: hidden;
995+
@media (width >= 64rem) {
999996
margin-top: calc(var(--spacing) * -16);
1000-
height: 100vh;
1001-
padding-top: calc(var(--spacing) * 16)
997+
}
998+
@media (width >= 64rem) {
999+
padding-top: calc(var(--spacing) * 16);
10021000
}
10031001
}
10041002

0 commit comments

Comments
 (0)