Upgrade to DataTables v2.0 and migrate to NPM assets #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Major Update: DataTables v2.0 Migration
This PR modernizes the yii2-datatables extension by upgrading to DataTables v2.0 and migrating from deprecated Bower assets to NPM assets, ensuring better long-term maintainability and compatibility.
>=5.5.0to>=7.4.0~2.0.13to~2.0.50~1.10.15to^2.0bower-asset/*) to NPM assets (npm-asset/*)📦 Updated Dependencies
➕ Added Dependencies:
npm-asset/datatables.net: ^2.0 (Core DataTables)npm-asset/datatables.net-dt: ^2.0 (Default styling)npm-asset/datatables.net-jqui: ^2.0 (jQuery UI integration)npm-asset/datatables.net-bs: ^2.0 (Bootstrap 3 integration)npm-asset/datatables.net-bs4: ^2.0 (Bootstrap 4 integration)npm-asset/datatables.net-bs5: ^2.0 (Bootstrap 5 integration)npm-asset/datatables.net-plugins: ^2.0 (Additional plugins)➖ Removed Dependencies:
bower-asset/datatables(~1.10.15)bower-asset/datatables-plugins(~1.10.15)bower-asset/datatables.net-bs4(~1.10.15)🛠️ Technical Changes
Asset Bundle Updates:
DataTableBaseAsset.php:
@bower/datatables/mediato@npm/datatables.netDataTableBootstrapAsset.php:
\to/for cross-platform compatibility)DataTableDefaultAsset.php:
@npm/datatables.net-dtDataTableJuiAsset.php:
@npm/datatables.net-jquiDataTableAsset.php:
DataTableFaAsset.php:
Configuration Cleanup:
fxp-assetconfiguration block fromcomposer.json📚 Documentation Updates
✨ Benefits
🧪 Testing Checklist
📋 Migration Guide
Users updating to this version should:
composer updateto get updated dependenciesphp yii asset/clear🏷️ Version Impact
This should be released as a major version (v2.0.0) due to breaking changes in minimum requirements.
🔗 Related Issues