Skip to content

Refactor asset management: Migrate from Bower to NPM for package dependencies and update related documentation. #20368

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

Open
wants to merge 1 commit into
base: 2.2
Choose a base branch
from

Conversation

terabytesoftw
Copy link
Member

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

…dependencies and update related documentation.
@terabytesoftw terabytesoftw added 2.2 Yii 2.2 severity:BC breaking Either breaks backwards compatibility or fixed previously made breakage labels Apr 30, 2025
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.60%. Comparing base (c9ed100) to head (c311a1c).

Additional details and impacted files
@@             Coverage Diff              @@
##                2.2   #20368      +/-   ##
============================================
- Coverage     65.60%   65.60%   -0.01%     
  Complexity    11282    11282              
============================================
  Files           426      426              
  Lines         36818    36817       -1     
============================================
- Hits          24154    24153       -1     
  Misses        12664    12664              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@terabytesoftw terabytesoftw marked this pull request as ready for review April 30, 2025 22:09
instead of Composer. Yii uses the [Composer asset plugin](https://github.com/fxpio/composer-asset-plugin)
to enable managing these kinds of packages through Composer. If your extension depends on a Bower package, you can
simply list the dependency in `composer.json` like the following:
For JavaScript/CSS packages, Yii now uses [NPM](https://www.npmjs.com/) natively. If your extension depends on NPM packages,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
For JavaScript/CSS packages, Yii now uses [NPM](https://www.npmjs.com/) natively. If your extension depends on NPM packages,
For JavaScript/CSS packages, Yii uses [NPM](https://www.npmjs.com/) natively. If your extension depends on NPM packages,


For more details about asset management, please refer to the [Assets](structure-assets.md#bower-npm-assets) section.
In your extension's code, you can reference these assets from the node_modules directory. For example, in an asset
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In your extension's code, you can reference these assets from the node_modules directory. For example, in an asset
In your extension's code, you can reference these assets from the `node_modules` directory. For example, in an asset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.2 Yii 2.2 severity:BC breaking Either breaks backwards compatibility or fixed previously made breakage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants