fuel / parser

Fuel PHP Framework - v1.x template parser package adapters
http://fuelphp.com
64 stars 45 forks source link

Mustache could use an update. #61

Closed bobthecow closed 11 years ago

bobthecow commented 11 years ago

Fuel/Parser includes Mustache.php (yay :smile:) but it's 8 versions out of date (boo :frowning:).

It's a fairly straightforward upgrade path, so I'm happy to provide a pull request, but I'm not quite sure what the best way to upgrade is.

Mustache.php v2.x consists of quite a few more files than v1.x, so it probably shouldn't be directly included in the repo. It also needs an autoloader: it either uses Composer, or some other PSR-0 compatible autoloader, or it ships with its own autoloader which could be used.

To complicate things a bit more, it looks like Fuel's headed toward using Composer for everything, and Composer solves both of the above problems. How will this move play out for Fuel/Parser?

Should I...

  1. hold off on a pull request until the Composer changes make it further into the pipeline?
  2. send a pull request to use the same "drop it in the vendor folder" strategy that the Twig integration currently uses?
  3. something else entirely?
WanWizard commented 11 years ago

I would say:

Remove the current Mustache installation from the Parser package, Use Composer to install Mustache if you want to use that (as of 1.6 we start the gradual move to Composer, it already contains a composer.json in the fuel root), and change View_Mustache to use the composer package.

In the same process the other supported template engines should be looked at as well. I'm sure for Twig there's a composer package, perhaps for the others too.

WanWizard commented 11 years ago

PR merged.