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

Improve RenameModule command #172

Closed tom-combet closed 2 years ago

tom-combet commented 2 years ago

What's new

tom-combet commented 2 years ago

/!\ Need your help /!\

@SebSept @okom3pom @jf-viguier @nenes25

image

Could you test the command and tell if you get this annoying bunch of warnings about not found translations when new module installation begins? Do you know how to suppress them?

SebSept commented 2 years ago

Did you run the command with -vvv ? I have this warnings using this mode.

ghost commented 2 years ago

I also have the warings, I am looking to remove them

tom-combet commented 2 years ago

@SebSept Nope, I don't use -vvv when I call the command.

@okom3pom Still have them too. Do you still think it's about VSCode configuration? I get the two first warnings when I perform 'pr:mo install' too but it's normal since the two translations are related to the just created module:

image

So I conclude it's related to RenameModule command. However, I don't see why: the command does a classical installation with the Module install method...

tom-combet commented 2 years ago

Resolved thanks to @okom3pom : warnings disappear when using pr:mo install command!

SebSept commented 2 years ago

I'm sorry but I won't have time to review this PR soon.

tom-combet commented 2 years ago

I'm sorry but I won't have time to review this PR soon.

Actually, it's not even finished yet, so no worries.

nenes25 commented 2 years ago

Hello,

Do we really need so much files ? ( + 123 files ) Why is the whole module ps_linklist added in tests/resources ?

tom-combet commented 2 years ago

Hello,

Do we really need so much files ? ( + 123 files ) Why is the whole module ps_linklist added in tests/resources ?

Hmm, in fact you're right, that's too much 😅 ... I'll create simpler modules for tests.

nenes25 commented 2 years ago

Hello,

Sorry to bother you about abut this But as my point of view no test module should be versioned in this repository. If we use another module hosted on github why not creating a bash script which will clone or download it in the right place before launching the tests ?

Great work about the test by the way we should try to do the same for all commands :smile: !

tom-combet commented 2 years ago

@nenes25 Ah yes great idea, should be even better! By the way, would you know why PHP-CS-Fixer workflow won't pass? I'm running it locally without any errors.

EDIT: Rebasing fixed PHP-CS-Fixer errors, as we changed license headers.

tom-combet commented 2 years ago

@nenes25 PHPUnit workflow will now checkout the test modules before running the tests! There is still one downside I just noticed: we can't test it locally anymore before committing. This problem can be resolved by cloning test modules repositories and add tests/Resources/modules in .gitignore. OK for this?

nenes25 commented 2 years ago

@Kaudaj LGTM even if we need manual action in local to test :+1:

SebSept commented 2 years ago

I just read a part of the code, looks good ! That's more than a improvement ! It's pleasant to read "Separate 'find and replace' logic in a dedicated tool" ;)

Because reviewing the whole code is a long work, maybe, just testing the command and the tests is enough ... just an idea. As I wrote, I don't have time to review the whole code for now. But I can test in 10 days, not before.

tom-combet commented 2 years ago

I just read a part of the code, looks good ! That's more than a improvement ! It's pleasant to read "Separate 'find and replace' logic in a dedicated tool" ;)

I was sure it would make you happy haha!

Because reviewing the whole code is a long work, maybe, just testing the command and the tests is enough ... just an idea. As I wrote, I don't have time to review the whole code for now. But I can test in 10 days, not before.

For the code logic, I agree: running the command and running tests one or two times should validate the PR. However, about code syntax and organization, I'd prefer reviewers validate it before merging to avoid code smells. But again: this PR is far from critical, you have time! It would be great to merge it before next release but for now, it's not urgent.

tom-combet commented 2 years ago

For me, module install or unistall is not in the scope of this command.

@jf-viguier Installation of new module is now optional: use --install-new-module or -i!

SebSept commented 2 years ago

@Kaudaj : can you resolve the conflicts ? As soon as it's done, I'll merge.

tom-combet commented 2 years ago

@SebSept Ok nice, I try to do it this weekend!

tom-combet commented 2 years ago

@SebSept Done, ready to merge! 😃