mlocati / powershell-phpmanager

A PowerShell module to install/update PHP, PHP extensions and Composer on Windows

Home Page:https://www.powershellgallery.com/packages/PhpManager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adjust PHP version regex for PHP 8.1 snap builds

shivammathur opened this issue · comments

PHP 8.1 in the PHP-8.1 branch has the version 8.1.0RC1-dev.
Ref:

This is unlike PHP 8.0 RCs where the version on the branch was 8.0.0-dev.
So this change in 8.1 breaks the regex for checking PHP version as it parses -dev and -RC\d, but not -RC\d-dev.

$match = $executableResult | Select-String -Pattern "(?<version>\d+\.\d+\.\d+)(?<stabilityLevel>-dev|(?:$Script:UNSTABLEPHP_RX))?(?<stabilityVersion>\d+)?\t(?<bits>\d+)\t(?<apiVersion>\d+)$"

Failure log for Get-Php: https://github.com/shivammathur/test-setup-php/runs/3492819490?check_suite_focus=true#step:3:11

@mlocati
After the fix, it does not break, but there is a minor issue - the version in Get-Php is 8.1.0rc2 with UnstabilityLevel RC. Shouldn't it be 8.1.0rc2-dev with UnstabilityLevel snapshot?

Seems like none PHP 8.1 tests on windows are also failing now: https://github.com/Krisell/framework/runs/3495992100#step:4:14

Screen Shot 2021-09-02 at 15 37 18

After the fix, it does not break, but there is a minor issue - the version in Get-Php is 8.1.0rc2 with UnstabilityLevel RC. Shouldn't it be 8.1.0rc2-dev with UnstabilityLevel snapshot?

Well, if it's a release candidate, it's not a snapshot. Am I missing something?

It is a nightly snapshot build from the PHP-8.1 branch, not the tagged rc.
https://github.com/shivammathur/php-builder-windows/releases/tag/php8.1

It seems so strange to me to define a "release candidate" as a "snapshot"...
Why do we have php-8.1.0RC2-dev instead of php-8.1.0-dev (or php-8.1.0-snapshot)?

Yes, the change seems arbitrary to me also. It should be php-8.1.0-dev in the source.

@driesvints Please try restarting the workflow, 7.4 should not fail.

@shivammathur yeah, it seems it was a temp hiccup, sorry about that!

Here's a better fix: #89

@mlocati Great, I prefer this as dev in the version should mean snapshot.