File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ class ClearCommand extends AbstractCommand
23
23
*
24
24
* @var string
25
25
*/
26
- protected $ signature = 'aimeos:clear
27
- {site? : Site codes to clear the Aimeos content cache for like "default unittest" (none for all)}
28
- ' ;
26
+ protected $ signature = 'aimeos:clear ' ;
29
27
30
28
/**
31
29
* The console command description.
@@ -42,19 +40,11 @@ class ClearCommand extends AbstractCommand
42
40
*/
43
41
public function handle ()
44
42
{
43
+ $ this ->info ( 'Clearing Aimeos cache ' , 'v ' );
44
+
45
45
$ context = $ this ->getLaravel ()->make ( 'Aimeos\Shop\Base\Context ' )->get ( false , 'command ' );
46
46
$ context ->setEditor ( 'aimeos:clear ' );
47
47
48
- $ fcn = function ( \Aimeos \MShop \Context \Item \Iface $ lcontext )
49
- {
50
- $ cache = new \Aimeos \MAdmin \Cache \Proxy \Standard ( $ lcontext );
51
- $ lcontext ->setCache ( $ cache );
52
-
53
- $ this ->info ( sprintf ( 'Clearing Aimeos cache for site "%1$s" ' , $ lcontext ->getLocale ()->getSiteItem ()->getCode () ), 'v ' );
54
-
55
- \Aimeos \MAdmin::create ( $ lcontext , 'cache ' )->getCache ()->clear ();
56
- };
57
-
58
- $ this ->exec ( $ context , $ fcn , $ this ->argument ( 'site ' ) );
48
+ \Aimeos \MAdmin::create ( $ context , 'cache ' )->getCache ()->clear ();
59
49
}
60
50
}
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ class ClearCommandTest extends AimeosTestAbstract
4
4
{
5
5
public function testSetupCommand ()
6
6
{
7
- $ this ->assertEquals ( 0 , $ this ->artisan ( 'aimeos:clear ' , array ( ' site ' => ' unittest ' ) ) );
7
+ $ this ->assertEquals ( 0 , $ this ->artisan ( 'aimeos:clear ' ) );
8
8
}
9
9
}
You can’t perform that action at this time.
0 commit comments