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

schmunk42 commented 9 years ago

@samdark :smile:

I'd also strongly recommend to replace all unbound version constraints, eg. with 1.*, 2.*, i.e. here

    "swiftmailer/swiftmailer": "*",
    "fzaninotto/faker": "*",
    "cebe/indent": "*"
samdark commented 9 years ago

It seems all tests and docs are fine now...

pana1990 commented 9 years ago

@samdark i think tool-api-doc.md, tutorial-mailing.md, tests tutorials should be move to extension repository appropriate

What do you think about it?

samdark commented 9 years ago

Mailing was already moved. Some parts of it left as is because overall mailing is not an extension, only swiftmailer adapter is.

samdark commented 9 years ago

Will check tool-api-doc.md.

SDKiller commented 9 years ago

There is one drawback after moving tests and docs to corresponding extensions' repos - unlike framework docs and tests, extensions' ones are downloaded by composer. And update runs each time docs and tests are changed (as for the docs - it happens frequently enough). It also takes additional disk space (for some extensions - more than extension code itself), docs also are dowloaded with existing translations - imagine some time there will be 20-30 languages.

janisto commented 9 years ago

All packages should have .gitattributes file. When you download stable packages, all extra files are excluded, but they are included for dev.

Example: https://github.com/janisto/yii2-timepicker/blob/master/.gitattributes

samdark commented 9 years ago

Good idea. @janisto want to work on a pull request?

janisto commented 9 years ago

I can do a pull request during the weekend. A bit too busy today.

klimov-paul commented 9 years ago

Status of GIT attributes setup:

janisto commented 9 years ago

👍🍻🍺

klimov-paul commented 9 years ago

What about 'README.md', 'LICENCE.md', 'CHANGELOG.md', should these files be kept?

janisto commented 9 years ago

I would keep those.

samdark commented 9 years ago

Yes, these should be kept.

samdark commented 9 years ago

https://github.com/yiisoft/yii2/commit/46cd63fd284de21466699b97fe0684009ed401af

samdark commented 9 years ago

Done with the rest of GIT attributes.

amnah commented 9 years ago

I installed yii2-app-basic using composer create-project, but it excluded the .gitignore file (I assume because of the newly added .gitattributes file)

Is that supposed to happen? I found it weird when I noticed that my vendor dir got committed.

samdark commented 9 years ago

Right. .gitignore should not be in .gitattributes... At least for apps.

samdark commented 9 years ago

Fixed.

pana1990 commented 9 years ago

i think that Translation status should should take into due consideration status docs from extensions.

what do you think about it?

samdark commented 9 years ago

What do you mean?

pana1990 commented 9 years ago

here : https://github.com/yiisoft/yii2/blob/master/docs/internals/translation-status.md

It should have the status docs from extensions.

sorry for my english.

samdark commented 9 years ago

Yes. Should be updated...

dynasource commented 9 years ago

is it possible to further minimize yii's composer.json, ie. by making composer libraries such as cebe/markdown as suggestion instead of a requirement?

samdark commented 9 years ago

@dynasource only by throwing out Markdown and HtmlPurifier helpers, MaskedInput etc.

RusAlex commented 9 years ago

My 2 cents here. Yes it would be great to have packages not only as separate repositories, but in future as separate components which can be used without core.

At moment, when your project based on Yii 1.x , and when it's big enough, you wont have time to re-write whole project at once. And this situation makes me more careful in selecting packages I will use.

One main ides now is to start replacing app parts which are depends on Yii 1.x with stand alone components where it could. And leave Yii only several global responsibilities: Handle request, render result.

I see this the only way possible in projects with big code base grow and being rewriten seamlesly not in a "full rewrite" way.

And I hope Yii will get rid of this problem in future.

Thanks

creocoder commented 9 years ago

@RusAlex

My 2 cents here. Yes it would be great to have packages not only as separate repositories, but in future as separate components which can be used without core.

As I understand it completely contradicts the philosophy of Yii. This framework of tightly coupled components with lots of conscious violation of many OOP principles (like SOLID) for practice reasons. If short independent components from Yii will not be interested to anyone who build systems with independent components. Yii is interesting as full stack framework and only as full stack.

And I hope Yii will get rid of this problem in future.

I bet that this never will happen.

RusAlex commented 9 years ago

Anyway I could use it as I wrote for Handling Request and Response. Then I will be free in selecting other App components. Yii allows it.

creocoder commented 9 years ago

@RusAlex

Anyway I could use it as I wrote for Handling Request and Response.

I could do so to, but never will do that. Just check http://stackphp.com/ . If you want free set of components you usually want microframework. Like Silex. Yii is full stack. Its different. And you know, choosing Yii for handling Request and Response only is really not smart option because there is much more better tools for that. Every tool have it niche.

RusAlex commented 9 years ago

While there are good built in features to make simple and nice CRUDs fast it will make sense =)

Agree Yii is a tool and it must be used wisely as any other.

vbsessa commented 8 years ago

+1 Actually, i'm really looking forward the changes proposed in the wiki, titled "ideas for 2.1". They seem nice and ambicious.

samdark commented 8 years ago

@cebe anything left for this one?

cebe commented 8 years ago

@samdark automation of releases. I'd like to keep this open until done.

cebe commented 8 years ago

also docs are not 100% fine. E.g. guide for extension is not rendered anywhere.

cebe commented 8 years ago

closing this now. extension docs generation will be part of the new website.

cebe commented 8 years ago

docs about project structure, versioning etc are now in https://github.com/yiisoft/yii2/blob/master/docs/internals/README.md