stechstudio / laravel-env-security

Securely manage Laravel .env files for different deployment environments
MIT License
75 stars 9 forks source link

Laravel 9.32 Compatibility #25

Closed bubba-h57 closed 1 year ago

bubba-h57 commented 1 year ago

Laravel v9.32.0 brought the release of two new Laravel Foundation Artisan commands: env:encrypt and env:decrypt These commands collide with our commands.

bubba-h57 commented 1 year ago

Changing the command namespace is a "breaking" change, it is not backward compatible.

jszobody commented 1 year ago

Would it be worth making this backward compatible?

class EncryptCompat extends Encrypt {
    protected $signature = 'env:encrypt
                            {environment? : Which environment file you wish to encrypt}
                            {--c|compress : Override configuration and require compression.}';
}

Register that (and similar other commands) with the previous command signature, and this keeps the package working for everyone who isn't on Laravel 9.32 yet. Thoughts?

bubba-h57 commented 1 year ago

It isn't worth it to me. Just make it a major release and anyone that wants to use <9.32 can simply stick with their current composer.json.

jszobody commented 1 year ago

I think we can find a better command space than sts-env. For users of this package outside our own organization, "sts" holds no meaning, won't be easy to remember, and might feel like an odd thing to make part of every command.

My first thought is to use the full package name. env-security:encrypt or some variation like envsec:encrypt. Still unfortunately more typing than our current commands, it would be nice to keep them short.

Alternatively, we could find different nouns entirely so we could keep the command space like env:put/env:get or env:store/env:retrieve. Not sure if that is better from a DX perspective or not.