ScoopInstaller / PHP

📦 PHP Bucket for Scoop

Home Page:http://scoop.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Can't install archived versions of php8.0

soulflyman opened this issue · comments

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

php8.0

Expected/Current Behaviour

It should be possible to install older versions, but only the current version can be installed

Steps to Reproduce

PS> scoop install php8.0@8.0.28
WARN  Given version (8.0.28) does not match manifest (8.0.29)
WARN  Attempting to generate manifest for 'php8.0' (8.0.28)
Autoupdating php8.0
Searching hash for php-8.0.28-Win32-vs16-x86.zip in https://windows.php.net/downloads/releases/sha256sum.txt
Could not find hash in https://windows.php.net/downloads/releases/sha256sum.txt
Downloading php-8.0.28-Win32-vs16-x86.zip to compute hashes!
The remote server returned an error: (404) Not Found.
URL https://windows.php.net/downloads/releases/php-8.0.28-Win32-vs16-x86.zip is not valid
Could not install php8.0@8.0.28

Possible Solution

Don't know how to solve this, the version is available in the archive subfolder.
https://windows.php.net/downloads/releases/archives

Scoop and Buckets Version

PS> scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
7ba3c49cd (HEAD -> master, origin/master, origin/HEAD) github@3.3.0: Fix hash (Closes #11822)

'java' bucket:
74c2335d (HEAD -> master, origin/master, origin/HEAD) semeru17-jre: Update to version 17.0.8.1-1-0.40.0

'main' bucket:
31e6da5d5 (HEAD -> master, origin/master, origin/HEAD) stgit: Add version 2.3.0 (#4951)

'nerd-fonts' bucket:
75aef68 (HEAD -> master, origin/master, origin/HEAD) SarasaGothic: Update to version 0.41.8

'nirsoft' bucket:
941fcbd (HEAD -> master, origin/master, origin/HEAD) Updated BrowsingHistoryView and NK2Edit

'nonportable' bucket:
642ae68 (HEAD -> master, origin/master, origin/HEAD) autohotkey-np: Update to version 2.0.6

'php' bucket:
7709cbc (HEAD -> master, origin/master, origin/HEAD) php8.2: Update to version 8.2.10

'sysinternals' bucket:
db7ddd5 (HEAD -> main, origin/main, origin/HEAD) zoomit: Update to version 7.1

Scoop Config

PS> Get-Content ~\.config\scoop\config.json | ConvertFrom-Json

last_update         aria2-warning-enabled scoop_branch scoop_repo
-----------         --------------------- ------------ ----------
31.08.2023 14:02:17                 False master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

The same problem exists with php8.1 and php8.2, don't know if creating separate issues is necessary.

The URL is created by substituting the version in the link:

"url": "https://windows.php.net/downloads/releases/php-$version-Win32-vs16-x64.zip"

So unless this is modified to look in the archives subfolder, installing an older version will not work.

Now the problem is that this subfolder does not contain the last release of a major version (for e.g. it does not contain 8.0.30).

Does scoop allow adding multiple domains as mirror, so scoop will check the first URL and if it fails it tries the next in the list?

This would allow us to define https://windows.php.net/downloads/releases as the first and main download URL and https://windows.php.net/downloads/releases/archives as the alternative download location.