shivas / versioning-bundle

Simple way to version (semantic versioning 2.0.0) your Symfony2/3/4/5/6 application
MIT License
111 stars 30 forks source link

Update nikolaposa/version to version 4 #73

Closed kevin-lot closed 3 years ago

kevin-lot commented 3 years ago

@dontub

I have a question. Why do you keep the old version of nikolaposa/version (v2 and v3) ? dependencies of nikolaposa/version are:

So, to put it in a nutshell, If you want to keep shivas/versionning compatible with php 7.1, version 2 of nikolaposa/version is mandatory. Without it, only version 4 of nikolaposa/version is required.

dontub commented 3 years ago

I see no need to keep compatibility with PHP 7.1. When updating to nikolaposa/version v4, keeping compatibility with v2/v3 would make the code unnecessarily more complex.

kevin-lot commented 3 years ago

So I removed v2 and v3 of nikolaposa/version. I tried to update travis too.

kevin-lot commented 3 years ago

Sorry about the "else" and "elseif". This is a job conditionning, in my company, we don't allow to code with "else" or "elseif". :smile:

dontub commented 3 years ago

I'd suggest to add a method private function transformPreRelease(string $preRelease): ?string { ... }. This would allow to immediately return and thus to avoid the elses. WDYT?

Do you have time to update VersionBumpCommand, too?

kevin-lot commented 3 years ago

Do you have time to update VersionBumpCommand, too?

Done.

kevin-lot commented 3 years ago

I'd suggest to add a method private function transformPreRelease(string $preRelease): ?string { ... }. This would allow to immediately return and thus to avoid the elses. WDYT?

I have to take a look to do with methods. By the way, I think this is a good idea.

dontub commented 3 years ago

Thanks for contribution @kevin-lot!