Skip to content

Deprecate PHP Version: Fix .puprc parse check in info command#49

Merged
jonwaldstein merged 3 commits into
mainfrom
ENG-222/fix-pup-info-parse
Jun 5, 2026
Merged

Deprecate PHP Version: Fix .puprc parse check in info command#49
jonwaldstein merged 3 commits into
mainfrom
ENG-222/fix-pup-info-parse

Conversation

@d4mation
Copy link
Copy Markdown
Contributor

@d4mation d4mation commented Feb 12, 2026

🎫 ENG-222

Summary

  • Fix bug in pup info where the .puprc parse check was passing the filename string '.puprc' to json_decode() instead of reading the file contents first, causing it to always report a parse error even for valid .puprc files.

Discovered while working on the TypeScript rewrite of the info command in #36.

Test plan

  • Run pup info in a project with a valid .puprc file — should show ✅ .puprc - exists
  • Run pup info in a project with an invalid .puprc file (e.g. malformed JSON) — should show ❌ .puprc - exists but could not be parsed: <error message>
  • Run pup info in a project with no .puprc file — should show ⚫ .puprc - does not exist

d4mation and others added 2 commits February 12, 2026 13:40
The info command was passing the filename string '.puprc' to
json_decode() instead of reading the file contents first, causing
it to always report a parse error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cast file_get_contents() return to string to satisfy PHPStan level 8,
since it returns string|false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@d4mation d4mation marked this pull request as ready for review February 12, 2026 18:45
@jonwaldstein jonwaldstein changed the base branch from base/ENG-222/deprecate-php-version to main June 5, 2026 21:03
@jonwaldstein jonwaldstein merged commit 0a124e7 into main Jun 5, 2026
2 checks passed
@jonwaldstein jonwaldstein deleted the ENG-222/fix-pup-info-parse branch June 5, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants