Skip to content

Conversation

@sathwikre
Copy link
Contributor

Fixes #46764

The Symfony HttpClient packages currently include Test directories in Joomla release archives. These folders contain test-only classes and are not required in production distributions.

This change updates the build system to exclude:

  • libraries/vendor/symfony/http-client-contracts/Test
  • libraries/vendor/symfony/http-client/Test

As a result, release packages no longer ship unnecessary test files, reducing package size and avoiding unintended exposure of test code.

@brianteeman
Copy link
Contributor

This is not the correct way to do it. see this example

https://github.com/joomla/joomla-cms/blob/5.4-dev/build/build.php#L129-L130

@sathwikre
Copy link
Contributor Author

Thanks for the guidance. I’ve updated the build cleanup rules to follow the existing pattern as suggested.

@brianteeman
Copy link
Contributor

I think you will find it better to make the change here

https://github.com/joomla/joomla-cms/blob/5.4-dev/build/build.php#L169-L173

run_and_check('rm -rf libraries/vendor/symfony/*/Test');

That way it will also pick up libraries\vendor\symfony\service-contracts\Test

@sathwikre
Copy link
Contributor Author

Thanks for the suggestion. I’ve updated the build cleanup to use a wildcard removal for Symfony Test directories, following the existing cleanup pattern.

@sathwikre
Copy link
Contributor Author

Thanks for the guidance. I’ve updated the cleanup section so the Symfony */Test directories are removed before the */Tests rule, and I’ve removed the extra comment as suggested.
This now follows the existing ordering pattern and also correctly handles additional Symfony test folders like service-contracts/Test.

Please let me know if anything else needs adjusting.

@muhme muhme changed the title Exclude Symfony HTTP client test folders from release packages [5.4] Exclude Symfony HTTP client test folders from release packages Jan 29, 2026
…ild.php


Reordered Symfony vendor cleanup rules to match existing grouping as suggested in PR review.

Co-authored-by: Brian Teeman <[email protected]>
@sathwikre
Copy link
Contributor Author

I’ve applied your suggested change and committed the updated ordering. Thanks for the review!

@brianteeman
Copy link
Contributor

sorry I must have made a mistake - please put the tab back and remove the empty line

image

Then it should be complete

@sathwikre
Copy link
Contributor Author

Fixed formatting as requested (tab restored, empty line removed).
Ready for final review. Thanks!

@richard67 richard67 added the bug label Jan 29, 2026
@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 2798e8e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46765.

@sathwikre
Copy link
Contributor Author

Thanks for testing and confirming. Ready for merge when convenient.

@465645
Copy link

465645 commented Jan 30, 2026

I have tested this item ✅ successfully on 2798e8e

I have tested this PR successfully
Joomla Version: 5.4.3-dev
PHP Version: 8.2.12
OS: Windows 11
Environment: XAMPP
Test Results
All Test directories were properly identified
The wildcard pattern approach works correctly
No errors during testing


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46765.

@ompatwa000-svg
Copy link

I have tested this item ✅ successfully on 2798e8e

According to I study and anlyze the code according to that i will say given code is correct and i will propose that if you can add some comands in clean_checkout function so that it can remove libraries/vendor/symfony/http-client-contracts/Test.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46765.

@sathwikre
Copy link
Contributor Author

Thanks for testing and the suggestion 👍

The directory libraries/vendor/symfony/http-client-contracts/Test is already covered by the existing wildcard cleanup:

libraries/vendor/symfony/*/Test

This was added intentionally to handle current and future Symfony packages consistently, so no additional command should be required.

@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46765.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 3, 2026
@richard67 richard67 added this to the Joomla! 5.4.3 milestone Feb 3, 2026
@sathwikre
Copy link
Contributor Author

Thanks everyone. Marking as ready for merge.

@muhme
Copy link
Contributor

muhme commented Feb 4, 2026

✅ Final test before merge with JBT

  • Checked update and full package ZIPs from nighlty build contains directories Test with files and subdirectories:
    ./libraries/vendor/symfony/validator/Test
    ./libraries/vendor/symfony/translation-contracts/Test
    ./libraries/vendor/symfony/var-dumper/Test
    ./libraries/vendor/symfony/http-client/Test
    ./libraries/vendor/symfony/service-contracts/Test
    ./libraries/vendor/symfony/http-client-contracts/Test
    
  • Applied PR with Patch Tester
  • php build/build.php --exclude-gzip --exclude-zstd --remote=HEAD
  • Verified that full and update ZIP packages no longer contain any Test folders.

Note: Checked also for Test/Tests/test/tests

  • Found only ./libraries/vendor/php-tuf/php-tuf/tests remaining
    • PHP-TUF is our forked and patched version of the original PHP-TUF client

@muhme muhme merged commit 84927fd into joomla:5.4-dev Feb 4, 2026
69 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Feb 4, 2026
@muhme
Copy link
Contributor

muhme commented Feb 4, 2026

Thank you @sathwikre for your contribution. Thank you @brianteeman for support. Thank you @465645, @ompatwa000-svg and @brianteeman for testing.,

richard67 added a commit to richard67/joomla-cms that referenced this pull request Feb 4, 2026
richard67 added a commit to richard67/joomla-cms that referenced this pull request Feb 4, 2026
Bodge-IT pushed a commit that referenced this pull request Feb 5, 2026
Add deleted files and folders from PR #46765 (#46831)
sathwikre pushed a commit to sathwikre/joomla-cms that referenced this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test files in distributed package

7 participants