Skip to content

Commit 4c0fe2b

Browse files
committed
wip
1 parent 1027001 commit 4c0fe2b

2 files changed

Lines changed: 19 additions & 55 deletions

File tree

releases/8.5/languages/en.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'fcc_in_const_expr_title' => 'First Class Callables in constant expressions',
1717
'curl_share_persistence_improvement_title' => 'Persistent cURL share handle improvement',
1818
'array_first_last_title' => 'New <code>array_first()</code> and <code>array_last()</code> functions',
19-
'deprecated_traits_title' => 'Attribute <code>#[\Deprecated]</code> available for traits',
19+
'deprecated_traits_title' => '',
2020

2121
'new_classes_title' => 'New Classes, Interfaces, and Functions',
2222

releases/8.5/release.inc

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,16 @@ PHP
238238
final class CalculatorTest extends \PHPUnit\Framework\TestCase
239239
{
240240
#[DataProvider('subtractionProvider')]
241-
public function testSubtraction(int $minuend, int $subtrahend, int $result): void
241+
public function testSubtraction(
242+
int $minuend,
243+
int $subtrahend,
244+
int $result
245+
): void
242246
{
243-
$this->assertSame($result, Calculator::subtract($minuend, $subtrahend));
247+
$this->assertSame(
248+
$result,
249+
Calculator::subtract($minuend, $subtrahend)
250+
);
244251
}
245252
246253
public static function subtractionProvider(): iterable
@@ -272,9 +279,15 @@ final class CalculatorTest
272279
yield [0, $i, ($i * -1)];
273280
}
274281
})]
275-
public function testSubtraction(int $minuend, int $subtrahend, int $result)
282+
public function testSubtraction(
283+
int $minuend,
284+
int $subtrahend,
285+
int $result
286+
)
276287
{
277-
\assert(Calculator::subtract($minuend, $subtrahend) === $result);
288+
\assert(
289+
Calculator::subtract($minuend, $subtrahend) === $result
290+
);
278291
}
279292
}
280293
PHP
@@ -349,56 +362,6 @@ $versions = ['PHP 8.1', 'PHP 8.2', 'PHP 8.3', 'PHP 8.4', 'PHP 8.5'];
349362
350363
var_dump(array_first($versions));
351364
// string(7) "PHP 8.1"
352-
PHP
353-
); ?>
354-
</div>
355-
</div>
356-
</div>
357-
</div>
358-
359-
<div class="php8-compare">
360-
<h2 class="php8-h2" id="deprecated_traits">
361-
<?= message('deprecated_traits_title', $lang) ?>
362-
<a class="php8-rfc" href="https://wiki.php.net/rfc/deprecated_traits">RFC</a>
363-
</h2>
364-
<div class="php8-compare__main">
365-
<div class="php8-compare__block example-contents">
366-
<div class="php8-compare__label">PHP &lt; 8.5</div>
367-
<div class="php8-code phpcode">
368-
<?php highlight_php_trimmed(
369-
<<<'PHP'
370-
/**
371-
* @deprecated 8.4 use UsePhpVersion instead
372-
*/
373-
trait UseVersion
374-
{
375-
public function getVersion(): string
376-
{
377-
return '8.4';
378-
}
379-
}
380-
PHP
381-
382-
); ?>
383-
</div>
384-
</div>
385-
<div class="php8-compare__arrow"></div>
386-
<div class="php8-compare__block example-contents" style="display: table;">
387-
<div class="php8-compare__label php8-compare__label_new">PHP 8.5</div>
388-
<div class="php8-code phpcode" style="display: table-cell;">
389-
<?php highlight_php_trimmed(
390-
<<<'PHP'
391-
#[\Deprecated(
392-
message: "use UsePhpVersion instead",
393-
since: "8.5",
394-
)]
395-
trait UseVersion
396-
{
397-
public function getVersion(): string
398-
{
399-
return '8.5';
400-
}
401-
}
402365
PHP
403366
); ?>
404367
</div>
@@ -415,6 +378,7 @@ PHP
415378
<li>Property Promotion is now available for <code>final</code></li>
416379
<li>Attributes are now available for constants</li>
417380
<li>Attribute <code>#[\Override]</code> now works on properties</li>
381+
<li>Attribute <code>#[\Deprecated]</code> available for traits</li>
418382
<li>Asymmetric Visibility for Static Properties</li>
419383
<li>New <code>#[\DelayedTargetValidation]</code> attribute is available</li>
420384
<li>New <code>get_error_handler()</code>, <code>get_exception_handler()</code> functions, and <code>Closure::getCurrent</code> method are available.</li>

0 commit comments

Comments
 (0)