assetic

How can I get Assetic to compile SCSS on Zend Framework on Windows?

巧了我就是萌 提交于 2019-12-19 12:04:01
问题 My site is on Zend Framework and uses Assetic to compile SCSS and minify it. It works wonderfully when I'm developing on Ubuntu. Sometimes I need to develop on Windows (WAMP) instead of Ubuntu. I haven't been able to get Assetic to work on Windows. I've found many Q&As about it but no answers seem to apply to me. E.g. I don't think I have a config.yml file anywhere. How to have Assetic + sass work with Symfony2 in Windows? How to use SCSS filter in Symfony2 under Windows? Here is an error:

Symfony2 +Vagrant performance - running slow - speeding up?

北慕城南 提交于 2019-12-18 17:36:08
问题 I have started using vagrant with Symfony2.* to develop Web projects. I am using Windows, performance is very slow, because nfs mount isn't supported. I've put cache into memory, which gave exotic boost, disabled xdebug (as posted here). However page still loads in more than 14 seconds in dev enviroment on windows machines. Any help would be appreciated. Symfony >=2.3, PHP >= 5.4, Windows 7, Dell Precission m6700 quad-core i7/16GB/SSD 回答1: I've had the same performance problems, although with

How to get the full url for an asset in Controller?

对着背影说爱祢 提交于 2019-12-17 21:43:30
问题 I need to generate some JSON content in controller and I need to get the full URL to an uploaded image situated here : /web/uploads/myimage.jpg . How can I get the full url of it? http://www.mywebsite.com/uploads/myimage.jpg 回答1: You can generate the url from the request object: $baseurl = $request->getScheme() . '://' . $request->getHttpHost() . $request->getBasePath(); You could make a twig extension that cuts the /web part of your path and uses the request to generate the base url. see

Display blob image in symfony 2

喜夏-厌秋 提交于 2019-12-14 03:53:04
问题 I need to display images stored in my database, from users in my symfony 2 application. I've searched and I found examples such as: Php Display Image Blob from Mysql The line: echo '<img src="data:image/jpeg;base64,'.base64_encode( $result['image'] ).'"/>'; It didn't worked for me. How to return an image file and display it in user's profile or a gallery page? 回答1: I created this action that searches the blob data in my table: Empleado . /** * @Route("/employee/photo/{id}", name="zk_time

Using Twig for dynamic Javascript files

天大地大妈咪最大 提交于 2019-12-12 07:59:37
问题 I'm working on a kind of dashboard mini site that has blocks with a certain functionality. Using symfony2 I have a dedicated route /instagram that gets an html fragment that shows all the images taken in our venue. I want to refresh this block every 10 minutes, so i need to run the following javascript, in a function with a setTimeout, omitted for clarity. jQuery('.gallery').load("/instagram", function() { jQuery('.gallery').cycle({ fx: 'fade' }); }); This code is in "

Assetic not creating combined links

强颜欢笑 提交于 2019-12-12 07:20:08
问题 Just having a few problems trying to get Assetic to generate the combined links in rendered webpages. The files themselves are being generated fine, but in the web page in the production environment, I'm continuing to see the seperate file URLs (which do not work in production, as those uncombined files aren't available). In a template, I have: {% stylesheets '@TBundle/Resources/public/css/bootstrap/bootstrap.css' '@TBundle/Resources/public/css/bootstrap/bootstrap-responsive.css' '@TBundle

Basset/Assetic + SASS wont compile imports (osx)

浪子不回头ぞ 提交于 2019-12-11 12:07:23
问题 I am using Basset which in turn uses assetic for code minification and concatenation. I have the latest sass installed, using sass -v tells me it is 3.2.12 I have a css>sass folder and inside that a partials folder. The main.scss imports 2 files from the partials folder. One for variables (colours, widths etc) and the other for layout. The partials begine with an underscore, so they should not be compiled (_variables.scss) . The main.scss looks like this: @import "partials/variables"; @import

Symfony InvalidArgumentException when running app/console

懵懂的女人 提交于 2019-12-11 11:59:10
问题 I have been developing a website using Symfony. Everything was good until earlier today I was adding some Fixtures using the DoctrineFixturesBundle and ran the "app/console" command. I received the following error: [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException] Symfony\\Bundle\\AsseticBundle\\EventListener\\RequestListener is not a valid class name for the "assetic.request_listener" service. I tried undoing the changes I made to the fixtures to find my mistake and

Assetic doesn't update styles without cache:clear

孤街醉人 提交于 2019-12-11 09:29:02
问题 I have an app.less that imports everything (less) else if I comment a line in app.less app styles doesn't render the commented part, but if I change something in that imported less file, anything changes, I have to do cache:clear and to clear the browser cache to see the new style loaded... 回答1: Assets that are imported from another stylesheet (less, sass, whatever) will not be recompiled when they change, even if you use php app/console assets:dump --watch . See another question on

Runtime error using assetic w/ Symfony 2 on shared hosting

蹲街弑〆低调 提交于 2019-12-11 05:59:33
问题 I'm on ICDSoft hosting, so my directory structure looks like: / private/ app/ bin/ src/ vendor/ www/ www/ bundles/ app.php When I try running $ app/console assetic:dump I get the following runtime error: [RuntimeException] The source file "/home/thesewingdiva/private/app/../web/bundles/majorproductionssewingdivasite/js/jquery-1.8.3.min.js" does not exist. Is there a way for me to tell assetic to look in ../www/www/bundles rather than ../web/bundles for the correct assets? 回答1: In app/config