Skip to content

Conversation

@stevenrombauts
Copy link
Contributor

This PR stops creating VersionDeleted audit records if the versions are being removed because the we're deleting the package.

It just moves the creation of the record from VersionListener::preRemove to VersionRepository::remove()

$versionRepo = $this->doctrine->getRepository(Version::class);
foreach ($package->getVersions() as $version) {
$versionRepo->remove($version);
$versionRepo->remove($version, true);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be false? And I'd probably set it to false in CleanSpamPackagesCommand.php:69 as well as this is useless noise in the DB.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops. This should be false, yep. Seeing how that is the entire point of the PR 😅

Also updated that in CleanSpamPackagesCommand now.

@stevenrombauts stevenrombauts force-pushed the only-track-package-delete branch from 8769578 to 6c32230 Compare December 10, 2025 16:19
@Seldaek Seldaek merged commit a272098 into main Dec 10, 2025
6 checks passed
@Seldaek Seldaek deleted the only-track-package-delete branch December 10, 2025 20:12
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.

5 participants