Skip to content

fix: removes unused polyfills from replace section #2858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kevin-kortum-trustedshops
Copy link
Contributor

1. Why is this change necessary?

shopware5 has chosen to add polyfill replacements for libraries that are not used or not relevant to be replaced. While there is nothing wrong with it skipping polyfills, if there a package requiring it, there will be a conflict.

Considering #2853 there might be use cases where someone would like to add shopware5 as a dev requirement, but will fail if there is conflicts due to the polyfill. Although time has told that this is very unlikely (or was never reported) the docs of symfony/polyfill https://github.com/symfony/polyfill?tab=readme-ov-file#design recommend only to replace them if provided by the package or if they can safely be skipped e.g. of an unsupported php version.

2. What does this change do, exactly?

Instead of not installing polyfills, it will not install those into the vendor directory. For PHP 7.4 it will increase the vendor directory by ~33% (42 MB) as for PHP 8.2 only by ~0,12% (2 MB).

3. Describe each step to reproduce the issue or behaviour.

Please refer to composer/composer#12412 .

4. Please link to the relevant issues (if any).

#2853

5. Which documentation changes (if any) need to be made because of this PR?

None required

6. Checklist

  • I have written tests and verified that they fail without my change
  • I have squashed any insignificant commits
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

Copy link

Warnings
⚠️ The Pull Request doesn't contain any changes to the Upgrade file

@mitelg mitelg enabled auto-merge June 25, 2025 08:08
@mitelg mitelg merged commit 5a8facc into shopware5:5.7 Jun 25, 2025
25 checks passed
@kevin-kortum-trustedshops kevin-kortum-trustedshops deleted the fix/drop-polyfills-in-replace branch June 25, 2025 08:33
@mitelg
Copy link
Contributor

mitelg commented Jun 25, 2025

thanks for your contribution @kevin-kortum-trustedshops 👍🎉💙

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.

Drop polyfill replace composer.json
2 participants