MrAnchovy / Kohana_Smarty3

Integration of Smarty v3 with the Kohana PHP Framework
25 stars 13 forks source link

Using composer #19

Closed eroux closed 10 years ago

eroux commented 10 years ago
seyfer commented 10 years ago

Lover-case files needs for 3.2 version compability

eroux commented 10 years ago

Sure. I believe, though, that following other Kohana modules conventions for git workflow would be good, see for instance the branches of https://github.com/shadowhand/email which are more or less the same as https://github.com/kohana/kohana ; I believe people should be able to get code according to the Kohana version they are using...

MrAnchovy commented 10 years ago

I have created composer.json in the master (2.x) branch and added to Packagist.

The lower case paths in classes was an error which has now been fixed in the 2.x branch, the 1.x branch is intended for Kohana < 3.3 (and does not have composer.json yet).

I have not yet added the Smarty dependency, and I won't remove the bundled Smarty code from the module as not everyone uses composer. I need to test having both alternatives, there will probably be a switch in config/smarty.php. Whatever happens, the bundled Smarty does need updating to a more recent version.

eroux commented 10 years ago

Thanx for this, this is a good first step! But the fact that smarty code is still present makes the module not using Composer (Composer is a tool for managing dependencies, which this version doesn't)... so it's a Composer module not using Composer... a very weird situation...

I'm using Kohana+Smarty on one part of the website and just Smarty on another, this means I'll have the Smarty code installed twice, in possibiy two different versions, which I obviously want to avoid.

Maybe making a small Makefile or some install instructions to put Smarty in the vendor/ directory would be enough for people not using Composer? If people are using Kohana+your module, they're certainly smart enough for this... What do you think?

MrAnchovy commented 10 years ago

I think the solution I've adopted works for all. There is still a bundled Smarty, but if you are using a Composer autoloader the bundled package will not be seen. This works in the following order:

MrAnchovy commented 10 years ago

Seems to work so closing.

eroux commented 10 years ago

Sorry, I missed your previous comment. Thank you very much for your developments, I'll try that!