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

Improve support to install pre-release extensions

shivammathur opened this issue · comments

@mlocati
Currently the MinimumStability parameter can be used to install pre-release extensions, but if a stable version is released afterwards it will install the stable version.

So if there is a Stability optional parameter which forces the extension state, that will be great.
For example following would setup 2.8.0beta2 and not 2.8.1.

Install-PhpExtension xdebug -Stability beta -Version 2.8

I don't think it's possible, since in the PECL archive we have very few beta versions.
For example: here's the list of all stable xdebug versions, whereas here's the list of unstable versions. As you can see, this second list is very incomplete...

@mlocati If there is no version with the extension state, then it can fail.

For example, this can fail with a message like... There is no xdebug-2.7.XbetaY release.

Install-PhpExtension xdebug -Stability beta -Version 2.7

@mlocati I think Stability would be more predictable parameter and would allow installing releases which have been succeeded with stable versions. Also instead of replacing MinimumStability with Stability parameter, if both parameters can coexist, there won't be any breaking change. Let me know what you think.

@shivammathur can I ask the reason behind this request? A sample use case where using -Version and/or -MinimumStability wouldn't be enough?

This was a user request and I'm not sure about their exact use case as I would always use the latest or a stable version of an extension if available. Might be testing all releases.

The request was that they are not able to install some unstable versions of an extension in windows when there is a newer stable version.

I think the easiest and more backward compatible approach would be to add a -MaximumStability argument

Yes, -MaximumStability will be better.