You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Laravel config cache is great, but when it's enabled .env values are all null. We tend not to enable it on our dev environment, but on production. The use of the env() helper could easily slip into our code. A sniffer for it would be a good idea then.
The text was updated successfully, but these errors were encountered:
<!-- Ban some functions -->
<ruleref="Generic.PHP.ForbiddenFunctions">
<properties>
<propertyname="forbiddenFunctions"type="array">
<!-- https://github.com/flickerleap/phpcs/issues/1#issue-352498247 --><!-- DO NOT USE env() or getenv() because it will break laravel env/config caching -->
<elementkey="env"value="config"/>
<elementkey="getenv"value="config"/>
</property>
</properties>
</rule>
<ruleref="Generic.PHP.ForbiddenFunctions">
<exclude-pattern>config/*.php</exclude-pattern>
</rule>
Laravel config cache is great, but when it's enabled
.env
values are all null. We tend not to enable it on our dev environment, but on production. The use of theenv()
helper could easily slip into our code. A sniffer for it would be a good idea then.The text was updated successfully, but these errors were encountered: