for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class PublishSuperSakeCommmand extends SilverstripeCommand
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* @var string
*/
protected $name = 'console:publish';
protected $description = 'Copy the supersake to your webroot';
public function fire()
$this->writeSuperSakeFileToWebRoot();
}
protected function writeSuperSakeFileToWebRoot()
try {
file_put_contents(
BASE_PATH . '/supersake',
file_get_contents(BASE_PATH . '/console/publish/supersake')
);
$this->info('supersake file copied to webroot');
}catch(Exception $e) {
$this->error($e->getMessage());
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.