Mercurial > packages > magicforger
changeset 22:ee8ef14e158d main-dev
Now able to include through composer
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Wed, 26 Feb 2025 20:12:17 -0500 |
| parents | f0b0d014e448 |
| children | 827efbf4d73c |
| files | .hgignore composer.json src/Generator/Controller/ControllerGenerator.php src/Generator/Generator.php src/Generator/Requests/RequestGenerator.php |
| diffstat | 5 files changed, 11 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Wed Feb 26 19:45:08 2025 -0500 +++ b/.hgignore Wed Feb 26 20:12:17 2025 -0500 @@ -4,4 +4,5 @@ *.env.backup *.env.production .php-cs-fixer.cache +*.aichat
--- a/composer.json Wed Feb 26 19:45:08 2025 -0500 +++ b/composer.json Wed Feb 26 20:12:17 2025 -0500 @@ -1,7 +1,7 @@ { "name": "wizard/magicforger", + "version": "1.0.0", "description": "Magically makes all your CRUD in a smart and repeatable way.", - "version": "dev-default", "autoload": { "psr-4": { "Wizard\\MagicForger\\":"src/" @@ -9,8 +9,8 @@ }, "minimum-stability": "stable", "require": { - "laravel/framework": ">=10.3", - "doctrine/dbal": "^3.6" + "laravel/framework": ">=12", + "doctrine/dbal": "*" }, "extra": { "laravel": {
--- a/src/Generator/Controller/ControllerGenerator.php Wed Feb 26 19:45:08 2025 -0500 +++ b/src/Generator/Controller/ControllerGenerator.php Wed Feb 26 20:12:17 2025 -0500 @@ -64,11 +64,8 @@ /** * Get the path for the generated file. - * - * @param string|null $name - * @return string */ - protected function getPath(?string $name = null): string + protected function getPath($name = null) { return str_replace( ['App\\', '\\'],
--- a/src/Generator/Generator.php Wed Feb 26 19:45:08 2025 -0500 +++ b/src/Generator/Generator.php Wed Feb 26 20:12:17 2025 -0500 @@ -83,7 +83,7 @@ * * @return array */ - protected function getOptions() + protected function getOptions(): array { return array_merge(parent::getOptions(), [ ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, policy, resource controller, and form request classes for the table.'], @@ -99,15 +99,15 @@ * * @return void */ - protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output) + protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output):void { } - protected function getStub() + protected function getStub():void { } - protected function createController() + protected function createController(): void { $this->call('mf:controller', ['table' => $this->getTableInput(), '--fresh' => $this->option('fresh')]); }
--- a/src/Generator/Requests/RequestGenerator.php Wed Feb 26 19:45:08 2025 -0500 +++ b/src/Generator/Requests/RequestGenerator.php Wed Feb 26 20:12:17 2025 -0500 @@ -63,7 +63,7 @@ * * @return array */ - protected function getOptions() + protected function getOptions():array { return array_merge(parent::getOptions(), [ ['all', 'a', InputOption::VALUE_NONE, 'Generate all request classes for the table.'], @@ -77,7 +77,7 @@ * * @return void */ - protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output) + protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output):void { }
