Skip to content

refactor(composer): cleanup and normalize composer.json - #3792

Open
nortej-hash wants to merge 2 commits into
apache:masterfrom
nortej-hash:feature-my-task
Open

refactor(composer): cleanup and normalize composer.json#3792
nortej-hash wants to merge 2 commits into
apache:masterfrom
nortej-hash:feature-my-task

Conversation

@nortej-hash

@nortej-hash nortej-hash commented Sep 2, 2026

Copy link
Copy Markdown
  • Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

@mergeable mergeable Bot added the php label Sep 2, 2026
@Jens-G

Jens-G commented Sep 2, 2026

Copy link
Copy Markdown
Member

Code review

Found 3 issues:

  1. "readme": "README.md" is removed. The PR is presented as a formatting cleanup, but this is a content change that neither the title nor the description mentions. The practical effect is nil -- Packagist auto-detects README.md for GitHub-hosted packages -- but the key was added deliberately in 384647d29 ("Version 0.12.0").

thrift/composer.json

Lines 7 to 9 in b8da62a

"license": "Apache-2.0",
"readme": "README.md",
"authors": [

  1. "minimum-stability": "stable" is removed. The same commit set this deliberately, changing it from "dev" to "stable" as part of making the PHP package release-ready. Composer's default is already stable, so behaviour does not change, but the explicit declaration goes away without a note.

thrift/composer.json

Lines 58 to 60 in b8da62a

},
"minimum-stability": "stable",
"extra": {

  1. authors[0].homepage is removed. Present since the file was first added; it drops the author-block link Packagist renders. Cosmetic, but likewise undisclosed.

thrift/composer.json

Lines 12 to 14 in b8da62a

"email": "dev@thrift.apache.org",
"homepage": "http://thrift.apache.org"
}

Each is harmless on its own. The ask is to either restore them or name them in the PR description, so that a reformat PR reviews as a reformat. The require/require-dev sets, autoload paths and archive.exclude are unchanged, and the 4-to-2-space reindent brings the file in line with .editorconfig's [*.json] indent_size = 2.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@Jens-G
Jens-G requested a review from sveneld September 3, 2026 20:44
The reformat also removed three keys. "readme": "README.md" and
"minimum-stability": "stable" were both set deliberately in 384647d
when the PHP package was made release-ready, and authors[0].homepage has
been there since the file was first added. None of the three changes
behaviour -- Packagist auto-detects README.md for GitHub-hosted packages,
and stable is Composer's default -- but a reformat should not drop them
silently.

Also adds the trailing newline that .editorconfig requires for every file
via insert_final_newline, and which the rewrite left off.

composer.json is now semantically identical to the one on master except
for the http -> https homepage update this PR already made, which the
author block now follows as well. composer validate passes.

Client: php

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Jens-G

Jens-G commented Sep 4, 2026

Copy link
Copy Markdown
Member

@sveneld Could you have a look from your side and merge if all is fine?

@sveneld

sveneld commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

I’ll look at it over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants