Skip to content

Conversation

@saundefined
Copy link
Member

@saundefined saundefined commented Sep 25, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

🚀 Regression report for commit 658fafe is at https://web-php-regression-report-pr-1454.preview.thephp.foundation

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

🚀 Preview for commit 658fafe can be found at https://web-php-pr-1454.preview.thephp.foundation

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
Comment on lines 382 to 388
$upcomingRelease = null;
foreach ($php as $key => $version) {
if ($version['state'] === 'upcoming') {
$upcomingRelease = $version;
break;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good example, because this could just be array_find().

Comment on lines 409 to 414
$upcomingRelease = array_first(
array_filter(
$php,
static fn($version) => $version['state'] === 'upcoming'
)
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Perhaps using array_last is a bit less controversial:

$lastActiveRelease = array_last(
    array_filter(
        $php,
        static fn($version) => $version['state'] === 'active'
    )
);

Comment on lines 306 to 358
<div class="php8-compare__main">
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP &lt; 8.5</div>
<div class="php8-code phpcode">
<?php highlight_php_trimmed(
<<<'PHP'
$sh = curl_share_init();
curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);

$ch1 = curl_init('https://php.net/');
curl_setopt($ch1, CURLOPT_SHARE, $sh);
curl_exec($ch1);

$ch2 = curl_init('https://thephp.foundation/');
curl_setopt($ch2, CURLOPT_SHARE, $sh);
curl_exec($ch2);

curl_share_close($sh);

curl_close($ch1);
curl_close($ch2);
PHP

); ?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents" style="display: table;">
<div class="php8-compare__label php8-compare__label_new">PHP 8.5</div>
<div class="php8-code phpcode" style="display: table-cell;">
<?php highlight_php_trimmed(
<<<'PHP'
$sh = curl_share_init_persistent([
CURL_LOCK_DATA_DNS,
CURL_LOCK_DATA_CONNECT
]);

$ch1 = curl_init('https://php.net/');
curl_setopt($ch1, CURLOPT_SHARE, $sh);
curl_exec($ch1);

$ch2 = curl_init('https://thephp.foundation/');
curl_setopt($ch2, CURLOPT_SHARE, $sh);
curl_exec($ch2);

curl_close($ch1);
curl_close($ch2);
PHP
); ?>
</div>
</div>
</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comparison is not really meaningful to understand what has changed. At least some explanation is necessary. curl_close() should be removed in all cases, since it is useless with 8.0 and deprecated with 8.5.

Comment on lines 240 to 251
#[DataProvider('subtractionProvider')]
public function testSubtraction(
int $minuend,
int $subtrahend,
int $result
): void
{
$this->assertSame(
$result,
Calculator::subtract($minuend, $subtrahend)
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be kept in sync with the 8.5 version. Unfortunately the 8.5 version can't yet use PHPUnit, since sebastianbergmann/phpunit#6136 is not implemented yet. So both should use some “generic test framework”.

/cc @sebastianbergmann

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
@TimWolla TimWolla mentioned this pull request Oct 6, 2025
1 task
@TimWolla TimWolla mentioned this pull request Oct 10, 2025
1 task
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
Co-authored-by: Borislav Kosun <kosun.b@yandex.com>
* Simplified header and footer text.
* Moved Pipe Operator example to the top and simplified the code and description slightly.
* Made the URI Extension description less wordy.
* Replaced the *Clone With* example to have a realistic before/after class (rather than a fatal error in the before example).
* Greatly simplified the `array_first()` example and moved it to after the `#[\NoDiscard]` attribute.
* Replaced the *Closures and First Class Callables in Constant Expressions* example with a couple self-contained functions highlighting the new syntax (rather than a complex test which isn't even supported in PHPUnit). Also added a description.
* Shortened and clarified the *Persistent cURL Share Handles* example and added a more helpful description.
* Filled out the *Deprecations and backward compatibility breaks* section.
* Replaced *New Classes, Interfaces, and Functions* section with a more relevant *Additional features and improvements* section (mentioning that fatal errors now include a backtrace, that `setcookie()` and `setrawcookie()` now support the "partitioned" key, and clarifying some of the other new functions/features).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants