After resolve https://github.com/glayzzle/php-parser/issues/117 we can output die and exit. Should we output always exit as good pretty practice or not?
I wouldn't convert one alias to the other. I didn't find any styleguide that prefers one over the other.
@czosel maybe you are right, let's issue open, and ask community about this:
What I find great about prettier when it comes to javascript is that it removes or at least greatly reduces ambiguity about formatting etc. PHP in itself has failed to _keep it simple_ by having more than one way of doing it. The prettier plugin has the chanse to "fix" this.
I don't care much if it's exit or die I just feel that if ambiguity and abstraction noise can be reduced it should.
Apparently there are a few more built in functions with aliases. http://php.net/manual/en/aliases.php
One possibility could be to add an option about persisting aliases, but if so I'm still in favor of replacing the aliases as the default.
In my opinion it's not the prettier's job to replace developer choices.
It's here just to format code.
@mathieutu thanks for response, just vote :smile:
I think we can close this issue, because we don't convert by default. Use phpcs to disable usage exit or die in your code base
Most helpful comment
@czosel maybe you are right, let's issue open, and ask community about this: