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

How to skip requiring mpdf? #123

Closed
rubenheymans opened this Issue Nov 6, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@rubenheymans

rubenheymans commented Nov 6, 2014

mpdf is required in yii2-grid, but I'm not going to use this, that's a lot of code (161Mb) I don't need
there are lots of kartik extensions that are required by other extensions that I don't really need (e.g. star rating)
Is it possible to remove them from the composer files?
If people need them they should add them to their root composer file manually

@kartik-v

This comment has been minimized.

Owner

kartik-v commented Nov 6, 2014

Will try to consolidate this - give me some time. Where possible I will try to exclude or make packages optional. It will require some validation and exception handling to be included in the code - else the extension will break without the dependency.

In some cases the entire package is required (for example yii2-widgets is one package - and unless each component of yii2-widgets is separated into various packages - you cannot separate the classes you require in package). This is the reason, I stopped adding any new widget to yii2-widgets and created other packages separately (like yii2-slider, yii2-daterange etc.)

Except for the mpdf third party library - most such dependent packages are small in size. You should normally not be worried, because these anyway will not be used in code if you are not using the related functionality.

@kartik-v kartik-v added the enhancement label Nov 6, 2014

@kartik-v

This comment has been minimized.

Owner

kartik-v commented Nov 7, 2014

Check #127. Resolved via upgrade to release v2.3.0.

@kartik-v kartik-v closed this Nov 7, 2014

@kartik-v kartik-v changed the title from require mpdf to How to skip requiring mpdf? Nov 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment