php - Assetic + YUI Compressor in symfony 2: is this a bug? -
i have tested yui compressor in command line (on windows) , seems work fine.
but .css created assetic not compressed, , comes message on top (inside .css!):
/* [exception] 500 | internal server error | runtimeexception [message] [1] runtimeexception: @ n/a in e:\websites\symfony2\public_html\symfony\vendor\assetic\src\assetic\filter\yui\basecompressorfilter.php line 81 @ assetic\filter\yui\basecompressorfilter->compress('
is configuration problem? or bug in assetic?
here's code used inside twig template:
{% stylesheets '@companybundlenamebundle/resources/public/css/style.css' filter='yui_css' %} <link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" /> {% endstylesheets %}
i have same problem... (the problem seems present on windows) way found, dirty :
1 - specify java executable path in config file (at same place of yui jar declaration path)
yui_css: jar: "%kernel.root_dir%\\resources\\java\\yuicompressor.jar" java: "c:\\program files\\java\\jre6\\bin\\java.exe"
2 - open assetic\util\process.php file change "proc_open" line (line 123 version) in "run" method original line :
$process = proc_open($this->commandline, $descriptors, $pipes, $this->cwd, $this->env, $this->options);
modified line :
$process = proc_open('"'.$this->commandline.'"', $descriptors, $pipes, $this->cwd, $this->env, $this->options);
and it's works... not real solution...
if has more info... :)
Comments
Post a Comment