Skip to content

fix(Workspace): Purge and remove transport files via package workspace paths - #16936

Open
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:fix/16929-package-purge-workspace-paths
Open

fix(Workspace): Purge and remove transport files via package workspace paths#16936
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:fix/16929-package-purge-workspace-paths

Conversation

@Ibochkarev

@Ibochkarev Ibochkarev commented Mar 28, 2026

Copy link
Copy Markdown
Collaborator

What changed and why

Purge and Remove looked for transport zips and unpacked dirs under core_path/packages/ only. Manually uploaded packages (often without a provider) live under the workspace path + packages/, so purge reported success while files remained (#16929).

This PR adds TransportPackageFilesystemTrait with resolveTransportPaths() and shared zip/tree cleanup used by Purge and Remove.

How to test

core/vendor/bin/phpunit -c _build/test/phpunit.xml --filter 'TransportPackageFilesystemTrait|PackagesPurgeRemove'

Upload multiple versions of a package without a provider, run Purge Old Packages, confirm older signatures and workspace packages/ artifacts are gone.

Related issue(s)/PR(s)

Resolves #16929

Compatibility notes

Package workspace and filesystem layout. Applies to uploads with and without a transport provider.

Breaking change assessment

No public API changes. Purge/remove now delete from resolved workspace paths; behavior change only for packages not stored under core/packages/.

Test coverage

PHPUnit for path resolution and purge/remove flows; phpunit.xml registers Tests/Processors/Workspace.

Contributors

None beyond author.

AI tool use

Cursor helped normalize this PR description to the repository template.

…paths

Resolve transport zip and unpacked directory paths from the package workspace
(aligned with modTransportPackage transport layout), with fallback to core
packages when no workspace row exists. Share filesystem cleanup via
TransportPackageFilesystemTrait; add PHPUnit coverage for path resolution
and purge/remove flows.

Resolves modxcms#16929
@Ibochkarev
Ibochkarev force-pushed the fix/16929-package-purge-workspace-paths branch from 99ce539 to 1bb6c08 Compare August 2, 2026 04:10
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.

Unable to bulk purge uploaded packages

1 participant