Versions icon indicating copy to clipboard operation
Versions copied to clipboard

[email protected]: Switch to Github release

Open shanto opened this issue 1 week ago β€’ 2 comments

https://xdebug.org was down for quite a while today.

  • [x] Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • [x] I have read the Contributing Guide

Summary by CodeRabbit

  • Chores
    • Switched PHP 8.4 Xdebug distribution from the historical site to GitHub Releases.
    • Migrated package format from a single DLL artifact to ZIP archives; updated checksums and update-detection logic.
    • Adjusted install behavior to extract the correct DLL from the ZIP and remove extraneous files for compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

shanto avatar Dec 12 '25 12:12 shanto

Walkthrough

Migrated PHP 8.4 Xdebug manifest from direct DLL downloads to GitHub release ZIPs: updated 64-bit URL and hash, adjusted checkver/autoupdate URLs and regexes for ZIP filenames, and added post-install steps to rename the DLL and remove non-DLL files.

Changes

Cohort / File(s) Change Summary
Xdebug PHP 8.4 Manifest Configuration
bucket/php84-xdebug.json
Replaced 64-bit DLL URL/hash with GitHub release ZIP URL and new SHA256; updated checkver.url and checkver.regex to match ZIP filenames; updated autoupdate URL/regex to GitHub ZIP pattern; added two post_install commands to rename the extracted DLL to php_xdebug.dll and remove non-DLL files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify the architecture.64bit.url template matches the actual GitHub release asset path.
  • Confirm the new SHA256 matches the ZIP artifact.
  • Test checkver.regex and autoupdate.hash.regex against current release filenames.
  • Validate post_install commands: correct filename matching, safe deletion logic, and behavior across extraction scenarios.

Poem

🐰 I hopped from dll to zip with glee,
I fetch, rename, and tidy debris.
A tiny script, a tidy shove,
I nudge the manifest with rabbit love.
Hopβ€”installβ€”then hum a soft tune.

Pre-merge checks and finishing touches

βœ… Passed checks (3 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly identifies the main change: switching the php84-xdebug package at version 3.5.0-8.4 to use GitHub releases as the source.
Description check βœ… Passed The PR description includes the required conventional title format and confirms both checklist items (conventional PR title and reading the contributing guide) are completed.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

πŸ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between e1f737bb89a49cca9bf27192190c10ce19c3b5f6 and 45abd11fba7e8a829b7d252d26b459f4d21a9015.

πŸ“’ Files selected for processing (1)
  • bucket/php84-xdebug.json (2 hunks)
🧰 Additional context used
🧠 Learnings (5)
πŸ““ Common learnings
Learnt from: shanto
Repo: ScoopInstaller/Versions PR: 2637
File: bucket/php84-xdebug.json:20-21
Timestamp: 2025-12-13T10:05:16.567Z
Learning: The php84-xdebug package in bucket/php84-xdebug.json intentionally provides only the php_xdebug.dll file. The post_install script creates its own xdebug.ini configuration. Extra files from the ZIP distribution (LICENSE, .pdb, contrib/, docs) should be removed to maintain the package's historical minimal footprint.
πŸ“š Learning: 2025-12-13T10:05:16.567Z
Learnt from: shanto
Repo: ScoopInstaller/Versions PR: 2637
File: bucket/php84-xdebug.json:20-21
Timestamp: 2025-12-13T10:05:16.567Z
Learning: The php84-xdebug package in bucket/php84-xdebug.json intentionally provides only the php_xdebug.dll file. The post_install script creates its own xdebug.ini configuration. Extra files from the ZIP distribution (LICENSE, .pdb, contrib/, docs) should be removed to maintain the package's historical minimal footprint.

Applied to files:

  • bucket/php84-xdebug.json
πŸ“š Learning: 2025-08-28T14:59:45.810Z
Learnt from: Sh4rK
Repo: ScoopInstaller/Versions PR: 2437
File: bucket/cuda12.9.json:16-23
Timestamp: 2025-08-28T14:59:45.810Z
Learning: In the ScoopInstaller/Versions repository, CUDA manifests follow established patterns by version series: CUDA 11.x versions use installer scripts with `cuda_*` and `lib*` wildcards, while older versions (9.x, 10.x) use simpler `$dir\\*\\$name` patterns. Consistency across versions in the same series is preferred over individual script improvements.

Applied to files:

  • bucket/php84-xdebug.json
πŸ“š Learning: 2025-11-07T10:15:21.033Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Versions PR: 2564
File: bucket/olive-editor.json:24-24
Timestamp: 2025-11-07T10:15:21.033Z
Learning: In Scoop manifest JSON files, PowerShell commands in arrays like `pre_install` require backslashes to be escaped as `\\` in the JSON. After JSON parsing, `"$dir\\file.exe"` correctly becomes `$dir\file.exe` in PowerShell. This is proper JSON escaping, not an error.

Applied to files:

  • bucket/php84-xdebug.json
πŸ“š Learning: 2025-11-11T14:02:01.033Z
Learnt from: AndisGrossteins
Repo: ScoopInstaller/Versions PR: 2575
File: bucket/perl-pdl.json:5-5
Timestamp: 2025-11-11T14:02:01.033Z
Learning: In bucket/perl-pdl.json, Strawberry Perl PDL stopped releasing 32-bit versions after 5.32.1.1, while 64-bit continues to receive updates. The manifest correctly uses the latest 64-bit version as the global version field since Scoop schema doesn't support architecture-specific version properties.

Applied to files:

  • bucket/php84-xdebug.json
πŸ”‡ Additional comments (5)
bucket/php84-xdebug.json (5)

20-20: Verify glob pattern robustness; consider explicit error handling.

The glob pattern fix at line 20 correctly avoids hardcoding the version. However, there is no validation if the pattern matches zero or multiple DLLs. A silent failure (no DLL found) or picking an unexpected file (multiple matches) could leave the installation in a broken state.

Consider adding a pre-check to confirm exactly one match:

# Safer approach with validation:
$dllPath = Get-ChildItem -Path $dir -Filter 'php_xdebug-*-ts-vs17-x86_64.dll' | Select-Object -First 1
if ($null -eq $dllPath) {
    throw "No matching DLL found in $dir"
}
Rename-Item -Path $dllPath.FullName -NewName 'php_xdebug.dll' -Force

Alternatively, a glob count check before the rename would catch unexpected matches early:

$matches = @(Get-ChildItem -Path $dir -Filter 'php_xdebug-*-ts-vs17-x86_64.dll')
if ($matches.Count -ne 1) {
    throw "Expected exactly 1 DLL, found $($matches.Count)"
}
Rename-Item -Path $matches[0].FullName -NewName 'php_xdebug.dll' -Force

Would you like to add this validation?


33-34: βœ“ Checkver regex correctly captures base version.

The regex php_xdebug-([\\d.]+)-8\\.4-ts-vs17-x86_64\\.zip correctly extracts only the base version (e.g., 3.5.0) from the ZIP filename, which aligns with GitHub release tag naming. This fix resolves the prior issue where 3.5.0-8.4 was being captured and breaking autoupdate URLs.


21-21: βœ“ Cleanup command correctly preserves DLL and removes extras.

The Remove-Item "$dir\\*" -Exclude *.dll -Recurse -Force command correctly removes all non-DLL files (LICENSE, .pdb, contrib/, docs), maintaining the package's minimal historical footprint as intended. Based on learnings, this behavior is expected and correct.


15-16: URL is accessible and ZIP contains the correct DLL; hash value cannot be independently verified.

The GitHub release URL downloads successfully and contains php_xdebug-3.5.0-8.4-ts-vs17-x86_64.dll with supporting files (.pdb, .ini, documentation). However, Xdebug's official pages and GitHub release notes do not publish checksums for this asset, making independent hash verification impossible. Ensure the hash value d0cfa372aa92cea7c7dd19639e5137c364fe5593701655c62fba7c873bc956b5 was computed locally from the actual downloaded file and is correct for your deployment environment.


43-44: The regex pattern is correct. Xdebug GitHub releases do include hashes in the sha256:<64-hex-chars> format, and the pattern sha256:([a-fA-F0-9]{64}).+?$basename properly captures the hash and matches until the filename. The $basename variable is a standard Scoop autoupdate feature that expands to the download filename, so this approach will work as intended for autoupdate.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Dec 12 '25 12:12 coderabbitai[bot]

All changes look good.

Wait for review from human collaborators.

php84-xdebug

  • [x] Lint
  • [x] Description
  • [x] License
  • [x] Hashes
  • [x] Checkver
  • [x] Autoupdate
  • [x] Autoupdate Hash Extraction

Check the full log for details.

github-actions[bot] avatar Dec 12 '25 12:12 github-actions[bot]

https://xdebug.org/ was down for quite a while today.

The site seems to be working normally now. Switching to GitHub releases for this doesn't really seem necessary.

z-Fng avatar Dec 14 '25 02:12 z-Fng

https://xdebug.org/ was down for quite a while today.

The site seems to be working normally now. Switching to GitHub releases for this doesn't really seem necessary.

Closing this as per the comment above.

z-Fng avatar Dec 15 '25 21:12 z-Fng