From a11f18687bdfd9f15f7643e9c24acf81bbb8185e Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 6 May 2011 17:23:13 -0700 Subject: [PATCH 1/9] [AsseticBundle] moved base path to object property --- .../AsseticBundle/Command/DumpCommand.php | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php index dc0b28d8ff..3b9a2cafb5 100644 --- a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php +++ b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php @@ -26,6 +26,8 @@ use Symfony\Component\Console\Output\OutputInterface; */ class DumpCommand extends Command { + private $basePath; + protected function configure() { $this @@ -36,20 +38,23 @@ class DumpCommand extends Command ; } + protected function initialize(InputInterface $input, OutputInterface $output) + { + parent::initialize($input, $output); + + $this->basePath = $input->getArgument('write_to') ?: $this->container->getParameter('assetic.write_to'); + } + protected function execute(InputInterface $input, OutputInterface $output) { - if (!$basePath = $input->getArgument('write_to')) { - $basePath = $this->container->getParameter('assetic.write_to'); - } - $am = $this->container->get('assetic.asset_manager'); if ($input->getOption('watch')) { - return $this->watch($am, $basePath, $output, $this->container->getParameter('kernel.debug')); + return $this->watch($am, $output, $this->container->getParameter('kernel.debug')); } foreach ($am->getNames() as $name) { - $this->dumpAsset($am->get($name), $basePath, $output); + $this->dumpAsset($am->get($name), $output); } } @@ -59,12 +64,11 @@ class DumpCommand extends Command * This method includes an infinite loop the continuously polls the asset * manager for changes. * - * @param LazyAssetManager $am The asset manager - * @param string $basePath The base directory to write to - * @param OutputInterface $output The command output - * @param Boolean $debug Debug mode + * @param LazyAssetManager $am The asset manager + * @param OutputInterface $output The command output + * @param Boolean $debug Debug mode */ - protected function watch(LazyAssetManager $am, $basePath, OutputInterface $output, $debug = false) + protected function watch(LazyAssetManager $am, OutputInterface $output, $debug = false) { if (!$debug) { throw new \RuntimeException('The --watch option is only available in debug mode.'); @@ -74,7 +78,7 @@ class DumpCommand extends Command $prop = $refl->getProperty('assets'); $prop->setAccessible(true); - $cache = sys_get_temp_dir().'/assetic_watch_'.substr(sha1($basePath), 0, 7); + $cache = sys_get_temp_dir().'/assetic_watch_'.substr(sha1($this->basePath), 0, 7); if (file_exists($cache)) { $previously = unserialize(file_get_contents($cache)); } else { @@ -86,7 +90,7 @@ class DumpCommand extends Command try { foreach ($am->getNames() as $name) { if ($asset = $this->checkAsset($am, $name, $previously)) { - $this->dumpAsset($asset, $basePath, $output); + $this->dumpAsset($asset, $output); } } @@ -136,15 +140,14 @@ class DumpCommand extends Command /** * Writes an asset. * - * @param AssetInterface $asset An asset - * @param string $basePath The base directory to write to - * @param OutputInterface $output The command output + * @param AssetInterface $asset An asset + * @param OutputInterface $output The command output * * @throws RuntimeException If there is a problem writing the asset */ - protected function dumpAsset(AssetInterface $asset, $basePath, OutputInterface $output) + protected function dumpAsset(AssetInterface $asset, OutputInterface $output) { - $target = rtrim($basePath, '/').'/'.str_replace('_controller/', '', $asset->getTargetUrl()); + $target = rtrim($this->basePath, '/').'/'.str_replace('_controller/', '', $asset->getTargetUrl()); if (!is_dir($dir = dirname($target))) { $output->writeln('[dir+] '.$dir); if (false === @mkdir($dir, 0777, true)) { From 918ece8baf57fec253f54d46426e52db177f019b Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 6 May 2011 19:11:56 -0700 Subject: [PATCH 2/9] [AsseticBundle] moved asset manager to object property --- .../AsseticBundle/Command/DumpCommand.php | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php index 3b9a2cafb5..d2a834ef10 100644 --- a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php +++ b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php @@ -27,6 +27,7 @@ use Symfony\Component\Console\Output\OutputInterface; class DumpCommand extends Command { private $basePath; + private $am; protected function configure() { @@ -43,18 +44,17 @@ class DumpCommand extends Command parent::initialize($input, $output); $this->basePath = $input->getArgument('write_to') ?: $this->container->getParameter('assetic.write_to'); + $this->am = $this->container->get('assetic.asset_manager'); } protected function execute(InputInterface $input, OutputInterface $output) { - $am = $this->container->get('assetic.asset_manager'); - if ($input->getOption('watch')) { - return $this->watch($am, $output, $this->container->getParameter('kernel.debug')); + return $this->watch($output, $this->container->getParameter('kernel.debug')); } - foreach ($am->getNames() as $name) { - $this->dumpAsset($am->get($name), $output); + foreach ($this->am->getNames() as $name) { + $this->dumpAsset($this->am->get($name), $output); } } @@ -64,11 +64,10 @@ class DumpCommand extends Command * This method includes an infinite loop the continuously polls the asset * manager for changes. * - * @param LazyAssetManager $am The asset manager - * @param OutputInterface $output The command output - * @param Boolean $debug Debug mode + * @param OutputInterface $output The command output + * @param Boolean $debug Debug mode */ - protected function watch(LazyAssetManager $am, OutputInterface $output, $debug = false) + protected function watch(OutputInterface $output, $debug = false) { if (!$debug) { throw new \RuntimeException('The --watch option is only available in debug mode.'); @@ -88,15 +87,15 @@ class DumpCommand extends Command $error = ''; while (true) { try { - foreach ($am->getNames() as $name) { - if ($asset = $this->checkAsset($am, $name, $previously)) { + foreach ($this->am->getNames() as $name) { + if ($asset = $this->checkAsset($name, $previously)) { $this->dumpAsset($asset, $output); } } // reset the asset manager - $prop->setValue($am, array()); - $am->load(); + $prop->setValue($this->am, array()); + $this->am->load(); file_put_contents($cache, serialize($previously)); $error = ''; @@ -114,16 +113,15 @@ class DumpCommand extends Command /** * Checks if an asset should be dumped. * - * @param LazyAssetManager $am The asset manager - * @param string $name The asset name - * @param array &$previously An array of previous visits + * @param string $name The asset name + * @param array &$previously An array of previous visits * * @return AssetInterface|Boolean The asset if it should be dumped */ - protected function checkAsset(LazyAssetManager $am, $name, array &$previously) + protected function checkAsset($name, array &$previously) { - $formula = $am->hasFormula($name) ? serialize($am->getFormula($name)) : null; - $asset = $am->get($name); + $formula = $this->am->hasFormula($name) ? serialize($this->am->getFormula($name)) : null; + $asset = $this->am->get($name); $mtime = $asset->getLastModified(); if (isset($previously[$name])) { From 547610a631e94791c4b0b042b6c20d10cf2b1c9e Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 6 May 2011 19:13:07 -0700 Subject: [PATCH 3/9] [AsseticBundle] moved debug flag to object property --- src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php index d2a834ef10..38d8c3717d 100644 --- a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php +++ b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php @@ -28,6 +28,7 @@ class DumpCommand extends Command { private $basePath; private $am; + private $debug; protected function configure() { @@ -45,12 +46,13 @@ class DumpCommand extends Command $this->basePath = $input->getArgument('write_to') ?: $this->container->getParameter('assetic.write_to'); $this->am = $this->container->get('assetic.asset_manager'); + $this->debug = $this->container->getParameter('assetic.debug'); } protected function execute(InputInterface $input, OutputInterface $output) { if ($input->getOption('watch')) { - return $this->watch($output, $this->container->getParameter('kernel.debug')); + return $this->watch($output); } foreach ($this->am->getNames() as $name) { @@ -65,11 +67,10 @@ class DumpCommand extends Command * manager for changes. * * @param OutputInterface $output The command output - * @param Boolean $debug Debug mode */ - protected function watch(OutputInterface $output, $debug = false) + protected function watch(OutputInterface $output) { - if (!$debug) { + if (!$this->debug) { throw new \RuntimeException('The --watch option is only available in debug mode.'); } From 9e19cac3c032380ceaf01bf7c8f989e7c20ed518 Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 6 May 2011 19:16:32 -0700 Subject: [PATCH 4/9] [AsseticBundle] rearranged execute() method --- .../AsseticBundle/Command/DumpCommand.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php index 38d8c3717d..433572820f 100644 --- a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php +++ b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php @@ -51,13 +51,19 @@ class DumpCommand extends Command protected function execute(InputInterface $input, OutputInterface $output) { - if ($input->getOption('watch')) { - return $this->watch($output); + if (!$input->getOption('watch')) { + foreach ($this->am->getNames() as $name) { + $this->dumpAsset($this->am->get($name), $output); + } + + return; } - foreach ($this->am->getNames() as $name) { - $this->dumpAsset($this->am->get($name), $output); + if (!$this->debug) { + throw new \RuntimeException('The --watch option is only available in debug mode.'); } + + $this->watch($output); } /** @@ -70,10 +76,6 @@ class DumpCommand extends Command */ protected function watch(OutputInterface $output) { - if (!$this->debug) { - throw new \RuntimeException('The --watch option is only available in debug mode.'); - } - $refl = new \ReflectionClass('Assetic\\AssetManager'); $prop = $refl->getProperty('assets'); $prop->setAccessible(true); From f78be41355f8d16ba35c0a5b63c12b7dea6de228 Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 6 May 2011 19:22:04 -0700 Subject: [PATCH 5/9] [AsseticBundle] updated dump command to dump leaf assets per debug mode --- .../AsseticBundle/Command/DumpCommand.php | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php index 433572820f..b3f1c2870b 100644 --- a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php +++ b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php @@ -28,7 +28,6 @@ class DumpCommand extends Command { private $basePath; private $am; - private $debug; protected function configure() { @@ -46,20 +45,19 @@ class DumpCommand extends Command $this->basePath = $input->getArgument('write_to') ?: $this->container->getParameter('assetic.write_to'); $this->am = $this->container->get('assetic.asset_manager'); - $this->debug = $this->container->getParameter('assetic.debug'); } protected function execute(InputInterface $input, OutputInterface $output) { if (!$input->getOption('watch')) { foreach ($this->am->getNames() as $name) { - $this->dumpAsset($this->am->get($name), $output); + $this->dumpAsset($name, $output); } return; } - if (!$this->debug) { + if (!$this->am->isDebug()) { throw new \RuntimeException('The --watch option is only available in debug mode.'); } @@ -141,12 +139,37 @@ class DumpCommand extends Command /** * Writes an asset. * + * If the application or asset is in debug mode, each leaf asset will be + * dumped as well. + * + * @param string $name An asset name + * @param OutputInterface $output The command output + */ + protected function dumpAsset($name, OutputInterface $output) + { + $asset = $this->am->get($name); + $formula = $this->am->getFormula($name); + + // start by dumping the main asset + $this->doDump($asset, $output); + + // dump each leaf if debug + if (isset($formula[2]['debug']) ? $formula[2]['debug'] : $this->am->isDebug()) { + foreach ($asset as $leaf) { + $this->doDump($leaf, $output); + } + } + } + + /** + * Performs the asset dump. + * * @param AssetInterface $asset An asset * @param OutputInterface $output The command output * * @throws RuntimeException If there is a problem writing the asset */ - protected function dumpAsset(AssetInterface $asset, OutputInterface $output) + protected function doDump(AssetInterface $asset, OutputInterface $output) { $target = rtrim($this->basePath, '/').'/'.str_replace('_controller/', '', $asset->getTargetUrl()); if (!is_dir($dir = dirname($target))) { From 6f03a0871497b246dd94f4fd51d1461941de6fb9 Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Sat, 7 May 2011 07:14:48 -0700 Subject: [PATCH 6/9] [AsseticBundle] added the beginnings of a test class for the assetic:dump command --- .../Tests/Command/DumpCommandTest.php | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php diff --git a/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php b/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php new file mode 100644 index 0000000000..cc6e8ab00c --- /dev/null +++ b/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php @@ -0,0 +1,76 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Symfony\Bundle\AsseticBundle\Tests\Command; + +use Symfony\Bundle\AsseticBundle\Command\DumpCommand; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\NullOutput; + +class DumpCommandTest extends \PHPUnit_Framework_TestCase +{ + private $application; + private $definition; + private $kernel; + private $container; + private $am; + + protected function setUp() + { + if (!class_exists('Assetic\\AssetManager')) { + $this->markTestSkipped('Assetic is not available.'); + } + + $this->application = $this->getMockBuilder('Symfony\\Bundle\\FrameworkBundle\\Console\\Application') + ->disableOriginalConstructor() + ->getMock(); + $this->definition = $this->getMockBuilder('Symfony\\Component\\Console\\Input\\InputDefinition') + ->disableOriginalConstructor() + ->getMock(); + $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface'); + $this->container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface'); + $this->am = $this->getMockBuilder('Assetic\\Factory\\LazyAssetManager') + ->disableOriginalConstructor() + ->getMock(); + + $this->application->expects($this->any()) + ->method('getDefinition') + ->will($this->returnValue($this->definition)); + $this->definition->expects($this->any()) + ->method('getArguments') + ->will($this->returnValue(array())); + $this->definition->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue(array())); + $this->application->expects($this->any()) + ->method('getKernel') + ->will($this->returnValue($this->kernel)); + $this->kernel->expects($this->any()) + ->method('getContainer') + ->will($this->returnValue($this->container)); + $this->container->expects($this->once()) + ->method('get') + ->with('assetic.asset_manager') + ->will($this->returnValue($this->am)); + + $this->command = new DumpCommand(); + $this->command->setApplication($this->application); + } + + public function testEmptyAssetManager() + { + $this->am->expects($this->once()) + ->method('getNames') + ->will($this->returnValue(array())); + + $this->command->run(new ArrayInput(array()), new NullOutput()); + } +} From 520941d60d4825b8f30c1016839c119d305f233f Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Sat, 7 May 2011 07:31:31 -0700 Subject: [PATCH 7/9] [AsseticBundle] added test of dumping one asset --- .../Tests/Command/DumpCommandTest.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php b/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php index cc6e8ab00c..a8f1479a0c 100644 --- a/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php +++ b/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Console\Output\NullOutput; class DumpCommandTest extends \PHPUnit_Framework_TestCase { + private $writeTo; private $application; private $definition; private $kernel; @@ -29,6 +30,8 @@ class DumpCommandTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Assetic is not available.'); } + $this->writeTo = sys_get_temp_dir().'/assetic_dump'; + $this->application = $this->getMockBuilder('Symfony\\Bundle\\FrameworkBundle\\Console\\Application') ->disableOriginalConstructor() ->getMock(); @@ -56,6 +59,10 @@ class DumpCommandTest extends \PHPUnit_Framework_TestCase $this->kernel->expects($this->any()) ->method('getContainer') ->will($this->returnValue($this->container)); + $this->container->expects($this->any()) + ->method('getParameter') + ->with('assetic.write_to') + ->will($this->returnValue($this->writeTo)); $this->container->expects($this->once()) ->method('get') ->with('assetic.asset_manager') @@ -65,6 +72,14 @@ class DumpCommandTest extends \PHPUnit_Framework_TestCase $this->command->setApplication($this->application); } + protected function tearDown() + { + if (is_dir($this->writeTo)) { + array_map('unlink', glob($this->writeTo.'/*')); + rmdir($this->writeTo); + } + } + public function testEmptyAssetManager() { $this->am->expects($this->once()) @@ -73,4 +88,35 @@ class DumpCommandTest extends \PHPUnit_Framework_TestCase $this->command->run(new ArrayInput(array()), new NullOutput()); } + + public function testDumpOne() + { + $asset = $this->getMock('Assetic\\Asset\\AssetInterface'); + + $this->am->expects($this->once()) + ->method('getNames') + ->will($this->returnValue(array('test_asset'))); + $this->am->expects($this->once()) + ->method('get') + ->with('test_asset') + ->will($this->returnValue($asset)); + $this->am->expects($this->once()) + ->method('getFormula') + ->with('test_asset') + ->will($this->returnValue(array())); + $this->am->expects($this->once()) + ->method('isDebug') + ->will($this->returnValue(false)); + $asset->expects($this->once()) + ->method('getTargetUrl') + ->will($this->returnValue('test_asset.css')); + $asset->expects($this->once()) + ->method('dump') + ->will($this->returnValue('/* test_asset */')); + + $this->command->run(new ArrayInput(array()), new NullOutput()); + + $this->assertFileExists($this->writeTo.'/test_asset.css'); + $this->assertEquals('/* test_asset */', file_get_contents($this->writeTo.'/test_asset.css')); + } } From 539ae49f6223794230226b1bbf76ba85fc31c1d8 Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Sat, 7 May 2011 07:58:29 -0700 Subject: [PATCH 8/9] [AsseticBundle] added a test of dumping in debug mode --- .../Tests/Command/DumpCommandTest.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php b/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php index a8f1479a0c..372d5e10c8 100644 --- a/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php +++ b/src/Symfony/Bundle/AsseticBundle/Tests/Command/DumpCommandTest.php @@ -119,4 +119,47 @@ class DumpCommandTest extends \PHPUnit_Framework_TestCase $this->assertFileExists($this->writeTo.'/test_asset.css'); $this->assertEquals('/* test_asset */', file_get_contents($this->writeTo.'/test_asset.css')); } + + public function testDumpDebug() + { + $asset = $this->getMock('Assetic\\Asset\\AssetCollection'); + $leaf = $this->getMock('Assetic\\Asset\\AssetInterface'); + + $this->am->expects($this->once()) + ->method('getNames') + ->will($this->returnValue(array('test_asset'))); + $this->am->expects($this->once()) + ->method('get') + ->with('test_asset') + ->will($this->returnValue($asset)); + $this->am->expects($this->once()) + ->method('getFormula') + ->with('test_asset') + ->will($this->returnValue(array())); + $this->am->expects($this->once()) + ->method('isDebug') + ->will($this->returnValue(true)); + $asset->expects($this->once()) + ->method('getTargetUrl') + ->will($this->returnValue('test_asset.css')); + $asset->expects($this->once()) + ->method('dump') + ->will($this->returnValue('/* test_asset */')); + $asset->expects($this->once()) + ->method('getIterator') + ->will($this->returnValue(new \ArrayIterator(array($leaf)))); + $leaf->expects($this->once()) + ->method('getTargetUrl') + ->will($this->returnValue('test_leaf.css')); + $leaf->expects($this->once()) + ->method('dump') + ->will($this->returnValue('/* test_leaf */')); + + $this->command->run(new ArrayInput(array()), new NullOutput()); + + $this->assertFileExists($this->writeTo.'/test_asset.css'); + $this->assertFileExists($this->writeTo.'/test_leaf.css'); + $this->assertEquals('/* test_asset */', file_get_contents($this->writeTo.'/test_asset.css')); + $this->assertEquals('/* test_leaf */', file_get_contents($this->writeTo.'/test_leaf.css')); + } } From 545a7fdcb998e43bd71e87586f4f0f435b02123e Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Sat, 7 May 2011 08:06:48 -0700 Subject: [PATCH 9/9] [AsseticBundle] made some methods private --- src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php index b3f1c2870b..98d3bc28de 100644 --- a/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php +++ b/src/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php @@ -72,7 +72,7 @@ class DumpCommand extends Command * * @param OutputInterface $output The command output */ - protected function watch(OutputInterface $output) + private function watch(OutputInterface $output) { $refl = new \ReflectionClass('Assetic\\AssetManager'); $prop = $refl->getProperty('assets'); @@ -119,7 +119,7 @@ class DumpCommand extends Command * * @return AssetInterface|Boolean The asset if it should be dumped */ - protected function checkAsset($name, array &$previously) + private function checkAsset($name, array &$previously) { $formula = $this->am->hasFormula($name) ? serialize($this->am->getFormula($name)) : null; $asset = $this->am->get($name); @@ -145,7 +145,7 @@ class DumpCommand extends Command * @param string $name An asset name * @param OutputInterface $output The command output */ - protected function dumpAsset($name, OutputInterface $output) + private function dumpAsset($name, OutputInterface $output) { $asset = $this->am->get($name); $formula = $this->am->getFormula($name); @@ -169,7 +169,7 @@ class DumpCommand extends Command * * @throws RuntimeException If there is a problem writing the asset */ - protected function doDump(AssetInterface $asset, OutputInterface $output) + private function doDump(AssetInterface $asset, OutputInterface $output) { $target = rtrim($this->basePath, '/').'/'.str_replace('_controller/', '', $asset->getTargetUrl()); if (!is_dir($dir = dirname($target))) {