Skip to content

Conversation

@stevenrombauts
Copy link
Contributor

Adds a packagist:transfer-ownership command to change maintainers for multiple packages at once.

@stevenrombauts stevenrombauts self-assigned this Nov 7, 2025
$package->addMaintainer($maintainer);
}

$this->doctrine->getManager()->persist(AuditRecord::packageTransferred($package, null, $oldMaintainers, array_values($maintainers)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about packages that were already own by the new maintainers ? Should they actually be marked as transferred to the same maintainers ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my understanding, this transfer command is only necessary when people no longer have access, and it's highly unlikely that current maintainers remain in place. Besides that, storing all old and new maintainers also tells us exactly what arguments the command was used with?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When applying that to a whole vendor namespace, the existing packages might have different maintainers. Maybe one of them already has only the new maintainers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think what we could do here is at least check that the old and new arent' an exact match and if they are skip transferring that package as that's a noop. I'll add that post merge.

@stevenrombauts stevenrombauts marked this pull request as ready for review November 7, 2025 16:07
@Seldaek Seldaek merged commit d8a93d5 into main Nov 8, 2025
6 checks passed
Seldaek added a commit that referenced this pull request Nov 8, 2025
@Seldaek
Copy link
Member

Seldaek commented Nov 8, 2025

Alright cool, works well :) https://packagist.org/audit-log?type%5B%5D=package_transferred

@Seldaek Seldaek deleted the ownership-transfer branch November 8, 2025 13:01
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.

4 participants