yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.91k forks source link

Maintaining core extensions separately #7812

Closed qiangxue closed 8 years ago

qiangxue commented 9 years ago

In order to enable faster version releases and make core extensions more scalable, we are thinking to maintain each core extension and application template separately in individual github projects. Below is a preliminary plan. Before we execute it, we would like to have it reviewed by everyone to make sure we do not omit anything important. Thank you!

Tasks

Ragazzo commented 9 years ago

should be done already long time ago :)

mtangoo commented 9 years ago

"API doc should be generated on-the-fly when releasing the core framework" How does this affect us who were generating Documentations locally? Will it need extra gym or it will just work? I can't see any problem to the proposed plan so far!

nicklasos commented 9 years ago

+1

i-sevostyanov commented 9 years ago

+ good idea

nineinchnick commented 9 years ago

So it's only about versioning? I mostly care about being able to clone everything at once to hack it.

Looks good to me.

lynicidn commented 9 years ago

:+1:

Ryadnov commented 9 years ago

:+1:

farmani commented 9 years ago

it should be done earlier but its nice to hear you and I believe that some new developer can join to developers team to focus on special extension and so new idea brings up by focusing on some specific part of a big project

SDKiller commented 9 years ago

Remove bower-asset/yii2-pjax from require section of framework composer.json and move framework/widgets/PjaxAsset.php and framework/widgets/Pjax.php to separate extension like bootstrap and jui.

Reasons:

But now it is even not possible to avoid bower-asset/yii2-pjax installation as it is required by framework's composer.json

harry-flipkod commented 9 years ago

+1

ghost commented 9 years ago

+1

zmilan commented 9 years ago

Good one :+1:

creocoder commented 9 years ago

@SDKiller

Remove bower-asset/yii2-pjax from require section of framework composer.json and move framework/widgets/PjaxAsset.php and framework/widgets/Pjax.php to separate extension like bootstrap and jui.

:+1: But... its not enough, all JS stuff should be removed to extensions include client side from validators, etc. But yes, currently main pain is fxp/composer-asset-plugin. And there is nothing in first post about that. So in general everything looks like simple cosmetic changes which will solve only small portion of troubles.

voskobovich commented 9 years ago

+1

lichunqiang commented 9 years ago

+1 for @creocoder

samdark commented 9 years ago

@SDKiller, @creocoder while I understand why you want to avoid using fxp/composer-asset-plugin, it can't be easily done in 2.0.x since it breaks backwards compatibility significantly.

tecnologiaterabyte commented 9 years ago

Excellent allow deploy fixes and enhancements fastest way. 👍

adamaltman commented 9 years ago

This proposal sounds good at first, from a code/test organization perspective. But if the goal is to really speed up releases, this only works if this structure empowers more people to contribute in more meaningful ways than currently possible, including reviewing and accepting pull requests.

Also, I wonder is it possible that core changes break some extension compatibility? (As I understand the core may not depend on an extension, but an extension may depend on the core. Unless I'm wrong there.) And who is responsible in that scenario for regaining compatibility? And how would they be aware? What would be the behavior of the CI for a pull request? Does it mean that when someone changes an extension that relies on a particular core api, that they must also submit tests to the core to ensure that api persists in future versions of the core?

dynasource commented 9 years ago

Good decision. Eventually it had to be done, so starting now is wize.

With respect to external parts like Pjax. I advocate to put these in separate extensions too because of either limitations / or not using it / or the use of alternative packages like i.e Intercooler.

About the fxp/composer-asset-plugin. This significant limitation on proper behavior of composer is also something that deserves attention on short term. If I could choose one thing to do first, it would be this.

samdark commented 9 years ago

@adamaltman the current issues are

  1. git subsplit from main repo to read only copies. It is extremely slow.
  2. we can't release extensions independently.

Proposed change solves it.

Compatibility between extension / framework versions could be achieved if extension will specify framework version in its requirements. We're going to do it as well.

CI will work for extensions i.e. extension will be tested with framework version specified in its composer.json. It's nowadays rarely required to change core code in order to fix something in extensions afterwards. If it's the case, extension release has to wait for framework release.

samdark commented 9 years ago

@dynasource I'm afraid it could not be done in 2.0.x... Or probably I don't see how to do it w/o breaking changes. Anyway, it's a separate issue and it's better to discuss it separately.

adamaltman commented 9 years ago

Yes, @samdark for issues 1 and 2, it's good. :+1:

qiangxue commented 9 years ago

@SDKiller Thanks for pointing out the issue with pjax. I think we handle this in a separate issue because it involves breaking BC. In this issue, we will focus on resolving this subsplit issue and make sure no BC is broken.

The following changes will need to be made for this issue:

samdark commented 9 years ago
  1. Decide on how to build/display docs for individual extensions.
  2. Decide on how to build/display API docs for extensions.
lynicidn commented 9 years ago

@qiangxue minimizing dependencies

samdark commented 9 years ago

@lynicidn that's separate issue.

lynicidn commented 9 years ago

how u want check requirments? in all extensions put requirments.php ? https://github.com/yiisoft/yii2/blob/master/apps/advanced/requirements.php#L124

qiangxue commented 9 years ago

I think requirement checker should be made in application templates only. Or perhaps we should simply rely on composer dependency to check them.

lynicidn commented 9 years ago

may be need add interface for checker and check before put in vendor/autoload.php ? If i don't use mailer or imagine - why i should have it in template ? Logicaly check it before configure

qiangxue commented 9 years ago

Let's discuss about requirement checking in a separate issue. I hope we can make this subsplit change during the weekend. We will adjust other issues found later.

lynicidn commented 9 years ago

@qiangxue ok, thx for answer

johonunu commented 9 years ago

:+1:

Also, I am on board with @creocoder about "fxp/composer-asset-plugin". This needs a better alternative/solution.

grikdotnet commented 9 years ago

Authors of 3rd party libs will just not update compatibility list with each major release of each core extension they depend on. Users will stick with old versions or get into package conflicts, as it happens with unofficial OS repositories. You may want to bind core extensions major releases to releases of the framework and discourage 3rd party libraries authors to bind to minor releases.

samdark commented 9 years ago

A guide would solve it. One can specify ~2.0.3 and it should work properly till 2.1 release.

samdark commented 9 years ago

@johonunu it's another issue that deserves its own ticket and discussion.

robregonm commented 9 years ago

Agreed!

qiangxue commented 9 years ago

I listed the tasks to be done in the first post.

Need help to finish these tasks...

cebe commented 9 years ago

adjust yii2-dev to keep BC

@qiangxue what do you mean with this?

samdark commented 9 years ago

I can handle moving docs.

samdark commented 9 years ago

@qiangxue we need write permissions to former read only repos.

qiangxue commented 9 years ago

@samdark Done. I also think we probably can get rid of the auto subsplit of yii2-framework. Will do this after we finish this issue first.

qiangxue commented 9 years ago

adjust yii2-dev to keep BC

Sorry, no need BC for yii2-dev. I mainly want to still have a way to develop both the core and extensions. Right now we have a problem because when you install an extension, it will bring in yii2-framework while we actually should work on yii2 repo.

janisto commented 9 years ago

👍

cebe commented 9 years ago

I also think we probably can get rid of the auto subsplit of yii2-framework. Will do this after we finish this issue first.

why and how? If it is only about speed, I have thought a lot about how to improve the subsplit speed. We can fix that speed problem.

cebe commented 9 years ago

status of moving the tests:

samdark commented 9 years ago

Status of moving docs:

schmunk42 commented 9 years ago

:+1: asked for it in 2013 ;) https://github.com/yiisoft/yii2/issues/379#issuecomment-29099296

samdark commented 9 years ago

@schmunk42 good ideas have to cool down a bit before settiling into enough number of minds to be applied :)

shaan360 commented 9 years ago

Cool its going to be cleaner :+1:

SDKiller commented 9 years ago

Probably it is also nesessary to specify major versions for 3rd-party dependencies

Related https://github.com/yiisoft/yii2/issues/7848