From 775ec96438ecf703f5485470d2c690c5352da362 Mon Sep 17 00:00:00 2001 From: alunys Date: Thu, 15 Sep 2016 10:41:08 +0200 Subject: [PATCH 1/2] Disable raise php limits from \CSSmin Unit tests can not be achieved due to max_execution_time set by default to 60 seconds from class \CSSmin. --- .../AssetFile/AssetFileFilter/CssAssetFileFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AssetsBundle/AssetFile/AssetFileFilter/CssAssetFileFilter.php b/src/AssetsBundle/AssetFile/AssetFileFilter/CssAssetFileFilter.php index 4f2e5d0..6a557d3 100644 --- a/src/AssetsBundle/AssetFile/AssetFileFilter/CssAssetFileFilter.php +++ b/src/AssetsBundle/AssetFile/AssetFileFilter/CssAssetFileFilter.php @@ -41,7 +41,7 @@ protected function getCSSmin() { if (!class_exists('CSSmin')) { throw new \LogicException('"CSSmin" class does not exist'); } - return $this->cssMin = new \CSSmin(); + return $this->cssMin = new \CSSmin(false); } } From 26f8917cbf98393dd043e32217e459af651b514f Mon Sep 17 00:00:00 2001 From: neilime Date: Thu, 6 Oct 2016 14:55:48 +0200 Subject: [PATCH 2/2] Change grey color by white --- src/AssetsBundle/Service/ToolsService.php | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/AssetsBundle/Service/ToolsService.php b/src/AssetsBundle/Service/ToolsService.php index 670d7ab..1352c86 100644 --- a/src/AssetsBundle/Service/ToolsService.php +++ b/src/AssetsBundle/Service/ToolsService.php @@ -33,9 +33,9 @@ public function renderAllAssets() //Start process $oConsole = $this->getConsole(); $oConsole->writeLine(''); - $oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine('Render all assets for ' . ($oAssetsBundleService->getOptions()->isProduction() ? 'production' : 'development'), \Zend\Console\ColorInterface::GREEN); - $oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine(''); //Empty cache directory @@ -43,7 +43,7 @@ public function renderAllAssets() $oConsole->writeLine(''); $oConsole->writeLine('Start rendering assets : ', \Zend\Console\ColorInterface::GREEN); - $oConsole->writeLine('-------------------------', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine('-------------------------', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine(''); $aUnwantedKeys = array( \AssetsBundle\AssetFile\AssetFile::ASSET_CSS => true, @@ -70,7 +70,7 @@ public function renderAllAssets() //If module has global assets if (array_intersect_key($aModuleConfig, $aUnwantedKeys)) { - $oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY); + $oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE); $oConsole->write('[' . $sModuleName . ']', \Zend\Console\ColorInterface::LIGHT_CYAN); $oConsole->write('[No controller]', \Zend\Console\ColorInterface::LIGHT_BLUE); $oConsole->write('[No action]' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE); @@ -87,7 +87,7 @@ public function renderAllAssets() //If controller has global assets if (array_intersect_key($aControllerConfig, $aUnwantedKeys)) { - $oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY); + $oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE); $oConsole->write('[' . $sModuleName . ']', \Zend\Console\ColorInterface::LIGHT_CYAN); $oConsole->write('[' . $sControllerName . ']', \Zend\Console\ColorInterface::LIGHT_BLUE); $oConsole->write('[No action]' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE); @@ -100,7 +100,7 @@ public function renderAllAssets() foreach (array_diff_key($aAssetsConfiguration[$sModuleName][$sControllerName], $aUnwantedKeys) as $sActionName => $aActionConfig) { //Render assets for action if (array_intersect_key($aActionConfig, $aUnwantedKeys)) { - $oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY); + $oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE); $oConsole->write('[' . $sModuleName . ']', \Zend\Console\ColorInterface::LIGHT_CYAN); $oConsole->write('[' . $sControllerName . ']', \Zend\Console\ColorInterface::LIGHT_BLUE); $oConsole->write('[' . $sActionName . ']' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE); @@ -112,7 +112,7 @@ public function renderAllAssets() } } //Render global assets - $oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY); + $oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE); $oConsole->write('[No module]', \Zend\Console\ColorInterface::LIGHT_CYAN); $oConsole->write('[No controller]', \Zend\Console\ColorInterface::LIGHT_BLUE); $oConsole->write('[No action]' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE); @@ -123,7 +123,7 @@ public function renderAllAssets() $oAssetsBundleService->renderAssets($oMvcEvent); $oConsole->writeLine(''); - $oConsole->writeLine('---------------', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine('---------------', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine('Assets rendered', \Zend\Console\ColorInterface::GREEN); $oConsole->writeLine(''); @@ -139,9 +139,9 @@ public function emptyCache($bDisplayConsoleMessage = true) if ($bDisplayConsoleMessage) { $oConsole = $this->getConsole(); $oConsole->writeLine(''); - $oConsole->writeLine('========================', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine('========================', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine('Empty cache', \Zend\Console\ColorInterface::GREEN); - $oConsole->writeLine('========================', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine('========================', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine(''); } @@ -160,7 +160,7 @@ public function emptyCache($bDisplayConsoleMessage = true) } } if ($bDisplayConsoleMessage) { - $oConsole->writeLine(' * Cache directory is empty', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine(' * Cache directory is empty', \Zend\Console\ColorInterface::WHITE); } // Retrieve Asset File Filters Manager @@ -180,7 +180,7 @@ public function emptyCache($bDisplayConsoleMessage = true) } } if ($bDisplayConsoleMessage) { - $oConsole->writeLine(' * "' . $oFilter->getAssetFileFilterName() . '" filter cache directory is empty', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine(' * "' . $oFilter->getAssetFileFilterName() . '" filter cache directory is empty', \Zend\Console\ColorInterface::WHITE); } } } @@ -196,7 +196,7 @@ public function emptyCache($bDisplayConsoleMessage = true) } } if ($bDisplayConsoleMessage) { - $oConsole->writeLine(' * Config cache directory is empty', \Zend\Console\ColorInterface::GRAY); + $oConsole->writeLine(' * Config cache directory is empty', \Zend\Console\ColorInterface::WHITE); $oConsole->writeLine(''); }