friends-of-presta / fop_console

Prestashop Module providing a set of shell/terminal commands for developers (PrestaShop 1.7.5+)
Academic Free License v3.0
84 stars 35 forks source link

New command to scaffold a module: fop:module:generate #239

Closed luigimassa closed 2 years ago

luigimassa commented 2 years ago

This command scaffold new module.

Command

Arguments

jf-viguier commented 2 years ago

Thanks @luigimassa for your PR ! Nice work. We have a naming convention, the command should be fop:module:generate instead of fop:generate:module

The convention is fop:domain:command

jf-viguier commented 2 years ago

Is there a way to launch php-cs-fixer to .php.twig files ? There are some little fix (spaces, ...) to apply I guess

luigimassa commented 2 years ago

re are some little fix (spaces, ...) to apply

Ok, i fix it

SebSept commented 2 years ago

run vendor/bin/php-cs-fixer fix ./ add and commit the file and you're done (probably).


If it's not ok,

You can run vendor/bin/php-cs-fixer fix --dry-run -q ./ || echo 'nop :( if "nop :(" is printed, the file is not fixed.

vendor/bin/php-cs-fixer fix --dry-run --diff . shows the diff.

Just in case, because your vendor directory is maybe not right, delete it and run composer install

luigimassa commented 2 years ago

run vendor/bin/php-cs-fixer fix ./ add and commit the file and you're done (probably).

If it's not ok,

You can run vendor/bin/php-cs-fixer fix --dry-run -q ./ || echo 'nop :( if "nop :(" is printed, the file is not fixed.

vendor/bin/php-cs-fixer fix --dry-run --diff . shows the diff.

Just in case, because your vendor directory is maybe not right, delete it and run composer install

done

luigimassa commented 2 years ago

Yeah! :D

nenes25 commented 2 years ago

Great the tests are now ok ! Let's dive into the command behaviors tests now :smile: Thanks @luigimassa for your work :+1: !

SebSept commented 2 years ago

all tests are green 👍🏼 Is it ok to merge @nenes25 & @Kaudaj or do you think some things are mandatory before merging ?

The command may run without user interaction. I think this point should be resolved : "Check if it's a new module or not without asking the user (very easy with a simple file_get_exists)." point is mando

tom-combet commented 2 years ago

@SebSept Already resolved: https://github.com/friends-of-presta/fop_console/pull/239/commits/a5978415e8b45eaa2c8ad9f518e2631a4a210364 😉

Some of my requests haven't been resolved but they were not critical. Maybe the // TODO: Edit comments could be harmonized, it looks quite messy right now (there are 'xxxxxx' values, '????' values, // edit comment...).

SebSept commented 2 years ago

@SebSept Already resolved: a597841 wink

Some of my requests haven't been resolved but they were not critical. Maybe the // TODO: Edit could be harmonized, it looks quite messy right now (there are 'xxxxxx' values, '????' values, // edit comment...).

@luigimassa will fix this or do you prefer that the merge in the current state ?

luigimassa commented 2 years ago

please wait.... I do finish a big activity.

jf-viguier commented 2 years ago

thanks @luigimassa for your geat work,

tom-combet commented 2 years ago

No need to rush: quality > quickness!

luigimassa commented 2 years ago

Please can you merge?

tom-combet commented 2 years ago

@luigimassa Hi, please check the changes I requested 😉

SebSept commented 2 years ago

changes requested by @tom-combet are satisfied. I guess changes requested by @nenes25 are also satisfied.

I generated a module, there is no php errors, I think everything is alright...

SebSept commented 2 years ago

Is it ok for you @nenes25 ?

nenes25 commented 2 years ago

A huge thanks for this great job @luigimassa , well done !

luigimassa commented 2 years ago

Thank you guys!