5

Is there anything but Assetic (which I cannot use because of PHP version) that can do asset management?

EDIT: This is about web application assets, like javascript and css, a library to manage and minify them for production, be that on the run or with precompiled assets.

Draiken
  • 3,805
  • 2
  • 30
  • 48
  • 2
    Which features do you need for your asset management? Asset management can start here and end there, so would be good if you could actually share that in your question. – hakre Jul 18 '11 at 17:29
  • There are a [host of asset management systems written in PHP](http://sourceforge.net/search/?q=asset+management&fq%5B%5D=trove%3A183). However, this site is designed to help you find answers to specific programming problems. Perhaps the [Superuser](http://superuser.com/) site can provide a useful answer to your question. – George Cummins Jul 18 '11 at 17:34
  • @George Assets in the context of Assetic refer to web assets like JavaScript and CSS files, Sprites, Icons, etc. It does not relate to Inventories like probably most of the scripts you linked refer to. Hence, the question is much more related to http://stackoverflow.com/questions/5505065/fuelphp-asset-error or http://stackoverflow.com/questions/4001482/php-asset-packaging-library or http://stackoverflow.com/questions/3626101/whats-the-point-of-yiis-assetmanager. – Gordon Jul 18 '11 at 17:40
  • I am looking for something like the Ruby's Sprockets or Jammit, for PHP. I've looked around and found nothing but Assetic. I am asking to find if anyone else had this problem and found a good solution for php 5.2.x – Draiken Jul 18 '11 at 18:01

1 Answers1

1

Your best bet is probably to backport Assetic to PHP 5.2. The use and namespace statements would need to be replaced with an autoload function and a call to spl_autoload_register().

It looks pretty comprehensive, although it might lack the ability to reference an externally hosted script, like calling jQuery from a CDN.

Personally, I use the Smarty template engine, and some prefilter/postfilter functions to handle stylesheet and javascript includes. A similar trick might be possible in another template system, if you're using one.

Terence Johnson
  • 1,637
  • 1
  • 16
  • 21
  • Yeah we use Smarty here too, and I am using `sacy` to use the asset compilation now! Gonna mark this as correct since it's probably the only solution for 5.2.x – Draiken Sep 06 '11 at 17:50