Atomic core and packages
#41
Posted 13 January 2012 - 11:01 PM
#42
Posted 17 January 2012 - 04:44 PM
But some problems with the current Yii structure arise, when thinking about package management.
Usually a package manager deploys the files into a single directory, in case of composer it's 'vendor' by default.
Currently components, modules, commands, themes and widgets reside in different places across your application, I think with the current config options you'd not be able to customize an app in a way, that it would be able to handle modules, widgets and themes from a common parent directory.
But in general, where should Yii's package manager place the files?
... when thinking about it, can modules be configured to run from outside 'modules'? But nevertheless the issue still applies for themes and commands.
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#43
Posted 17 January 2012 - 05:00 PM
#44
Posted 19 January 2012 - 03:51 AM
Quote
Composer is a shiny new tool from the Symfony community, which aims to fix the dependency hell that we have right now in Symfony2. Also, Composer will become the core dependency manager for Symfony 2.1 when it's released. But you don't need to wait until then - you can use it for your Symfony 2.0 projects too. And today we'll show you how.
A detailed blog posting about composer and Symfony2
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#45
Posted 20 February 2012 - 07:02 AM
<extension>
<url value="http://blablabla" />
<type value="widget" />
<copy todir="ext.blabla" />
</extension>
Well ... If yii users start to use phing we can do something like that (this is my build.xml for Myii project):
<target name="extensions">
<echo msg="clean extensions directory" />
<exec command="rm -rf dist/app/protected/extensions/*" />
<foreach list="lyiightbox, queryii, scrolltop" param="module" target="install-module">
<property name="module-name" value="${module}" />
</foreach>
</target>
<target name="install-module">
<exec command="wget https://github.com/s.../zipball/master --directory-prefix=dist/app/protected/extensions/"/>
<unzip file="dist/app/protected/extensions/master" todir="dist/app/protected/extensions/">
<fileset dir=".">
<include name="master"/>
</fileset>
</unzip>
<exec command="rm -rf dist/app/protected/extensions/master" />
</target>
And phing automatically can download extensions from yii site and then install them inside our application.
#46
Posted 20 February 2012 - 07:07 AM
#47
Posted 27 February 2012 - 07:01 AM
scrolltop,
lyiightbox,
queryii,
it work!
#48
Posted 29 February 2012 - 07:58 AM
Can't it be done using regular Yaml or JSON ?
#50
Posted 29 February 2012 - 08:25 AM
All your application use some extensions? Every time you download them? Well..: you can schedule all task, and create a phing file (build.xml) that will do all the task in one single command. Is like yiic. But yiic stay to yii like phing stay to php.
I have a phing command the rewrite database permission. So, if i need to install my application in a database called "dbjacmoe" with user "jac" and password "moe" i do this:
$ phing database
Database name [dbtest]?
Database username [dbuser]?
Database password [dbpassword]?
I do not open any file. Phing do this for me.
#51
Posted 29 February 2012 - 08:41 AM
Does Phing require shell access?
That could be a problem on some hosts.
How will it handle upgrades?
And migrations?
#52
Posted 29 February 2012 - 08:52 AM
#53
Posted 29 February 2012 - 08:59 AM
$ pear channel-discover pear.phing.org
$ pear install phing/phing
#54
Posted 29 February 2012 - 09:08 AM
That way, you don't need to mess around with a PEAR repository in a central location.
<edit>
Doesn't seem to have a Pyrus package, but it can be installed as stand-alone, so it's great.
</edit>
#55
Posted 02 March 2012 - 04:18 AM
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#56
Posted 02 March 2012 - 04:27 AM
But what is a Github service hook, and why would you want to make use of it?
#57
Posted 02 March 2012 - 05:13 AM
See also: http://groups.google...8f86aea57?hl=en
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#59
Posted 07 March 2012 - 05:47 PM
////////////////
// EDIT:
Needed to test this.
Just a plain skeleton app with one dead simple unit test taken from the first yii book. Took me a while to figure out how to configure dependencies, but now it works and they run unit tests for me whenever I commit something (using different php and different yii versions).
http://travis-ci.org...r/yiiTravisTest
As a side note, looks like symfony is already using this service:
http://travis-ci.org...symfony/symfony
#60
Posted 22 March 2012 - 11:45 AM
I also like the idea of separating the core code from other, somehow secondary, parts like AR or Zii. Maybe one just needs to build a JSON API thus a widget like Zii would be useless there. I know that, just being there, does not affect the performance in any way but it is nicer and cleaner to have only what you need.
Thinking at where the packages would be downloaded/stored - would this be next to the framework, like official Widgets and AR classes are now or in the "extensions" folder of each Yii application? I think the answer is open to debate. While packages like AR, database drivers and widgets could sit nicely next to the framework files, packages with modules would better be in the "extensions" folder of the application.
I agree with @samdark that it would be helpful if the framework would also come in a "core only" package. A feature of the download page allowing users to get what packages they need at the download time, just like JQuery UI does, would be great.

Help

This topic is locked













