PHP Version
7.4
CodeIgniter4 Version
4.3.3
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
No response
What happened?
I created a generator command like so:
php spark make:command TestCommandGenerator --type generator --command make:me-test
And updated the file like so:
public function run(array $params)
{
$this->component = 'Library';
$this->directory = 'Libraries';
$this->template = 'me.tpl.php';
$this->execute($params);
}
I have the generator template in the directory: app/Commands/Generators/Views/me.tpl.php. But when I try to use the command php spark make:me-test, I get the error message:
Invalid file: "CodeIgniter\Commands\Generators\Views\me.tpl.php"
Steps to Reproduce
- Create a new command:
php spark make:command TestCommandGenerator --type generator --command make:me-test.
- Create the generator template and place it within the
app/Commands/Generators/Views folder.
- Update the
run() method of the TestCommandGenerator.php to contain the name of the view template you created above: $this->template = ''; // name of file here
- Run the command
php spark make:me-test.
Expected Output
I expect that the view template file would be located within the app namespace instead of CodeIgniter.
Anything else?
No response
PHP Version
7.4
CodeIgniter4 Version
4.3.3
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter)Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
No response
What happened?
I created a generator command like so:
And updated the file like so:
I have the generator template in the directory:
app/Commands/Generators/Views/me.tpl.php. But when I try to use the commandphp spark make:me-test, I get the error message:Steps to Reproduce
php spark make:command TestCommandGenerator --type generator --command make:me-test.app/Commands/Generators/Viewsfolder.run()method of theTestCommandGenerator.phpto contain the name of the view template you created above:$this->template = ''; // name of file herephp spark make:me-test.Expected Output
I expect that the view template file would be located within the
appnamespace instead ofCodeIgniter.Anything else?
No response