-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Requirements free version of Yii 2 #8452
Comments
we have a similar discussion already, could not find the issue so I will keep this open. |
Nice to hear it. |
See #10557 (comment) I suppose this issue does not actually require stripping |
Current While using small codebase and many packages may look flexibile it has a drawbacks:
Of course there should be some balance to be maintained here. I can see no reason for exracting such packages like |
I propose introduction of following new repositories:
We should also consider how to deal (if we will actuall) with following dependencies:
|
New repositories may be created even now without waiting for We can use If we create new repositories beforehand, developers may participate in 2.1 development inside those smaller repos (very crucial for |
What do you (yii2 team) think about putting sources into |
Agree with @klimov-paul package suggestions 1—4.
@hiqsol what's the benefit? |
@samdark it is commonly (and very widely) used to separate source files from auxiliary files. |
It makes no sense. Actually back at alpha state there was an
That is true of course. However, there are application, which do not allow HTML code input and do not show any user-made content without My opinion: |
agree. It should be slimmed down to a minimum. Developer should get maximum flexibility. |
Although I may make sense. Originally both framework and extensions like |
Makes sense. It should be included into default templates though. |
Moved masked input into https://github.com/yiisoft/yii2-maskedinput. |
I've said it in other places, but first and foremost all asset bundles need to be moved out of the core, since those are generating the most friction and require an additional plugin during installation. If you get a black text on white background saying "Hello Yii 2.1!" we can re-add the asset layer on top. |
So here's my approach for moving assets out of the core... Goal: Running Yii 2.1 application without asset-manager, inlcuding code-generation via Gii WebUI. I had to fork the core, gii and bootstrap for removing all For still getting the required assets, I installed foxy in my project and added the previously removed On a Luckily, to use the exisiting asset-bundles, you can add an alias to your application: All this together (#14832, yiisoft/yii2-gii#301, yiisoft/yii2-bootstrap#212) leads to the above goal. You can try out an example here: https://github.com/schmunk42/foxy-roxy-rabbit There needs to be more work done (moving code into repos, etc...), but before changing too much, I wanted to hear some feedback, if this could be the asset approach for 2.1. The only downside is that you need When not installing foxy and the gii package, you can run ie. a CLI or REST application without any asset packages and only a handful of dependencies. |
I can not see how usage of the 'Foxy' solves this issue. It is an alternative approach for asset installation. For me "requirements free version" means package, which provides its full functionality without extra libaries to be installed. It may lack some minor features providing 'suggest' section in Usage of separated packages for assets brings back the issue about version dependecy tracking and possible version conflicts. To solve the issue all external asset depended code (JQuery depended) should be moved to separated package. After then we can consider in which way this package should deal with assets. Since for Yii is tired to JQuery library, which is relatively simple, I would suggest that by default Moving to CDN can not be done at 2.x, but can be at 2.1. |
Yeah, moving to CDNs should be okay. Dropping composer asset managers can make widget developer's life harder but it will happen - sooner or later. I'd prefer it to happen in 2.1. |
Yes, both should be moved out of the core.
Moving to CDN by default is an absolut no-go, IMHO, please see this blog posting for a description of security issues. |
* JQuery usage removed from `yii\web\View` * assets moved to 'jquery' * `GridViewClientScript` extracted * `PunycodeAsset` moved to `jquery` * `ActiveFormClientScript` extracted * client validators extracted * UPGRADE added * fix unit tests * fix JS unit tests * path to captcha client validator fixed * `ActiveFormClientScript::defaultClientValidatorMap()` added * UPGRADE note extended * `CompareValidator` adjusted * `View::registerCsrfMetaTags()` restored
Repository has been split. Following new packages extracted: Dependency of the assets is no longer affects main repo, it affects only extensions like "yiisoft/yii2-jquery" or "yiisoft/yii2-bootstrap". Now "yiisoft/yii2" depends only on PSR repos and "cebe/markdown". I consider this list of requirements can not be shorten (at least it does not make sense). |
I want to create console only yii2 based application.
And I don't want all those bower assets and other dependencies to be installed.
Don't you mind if I create (and maintain on Packagist) requirements free version of yii2 core code?
It's going to be exact copy of yiisoft/yii2-framework with only composer.json changed.
I've already tried: https://github.com/sol-hiqdev/bare-yii2
It works fine for me and could be useful for others.
Do you plan to split your framework to smaller parts for similar purposes?
The text was updated successfully, but these errors were encountered: