Don't check for .git in the isDevelopment() function
The function isDevelopment() checks if there's a .git folder present. The function controls for example mysql strict mode and whether deprecations throw errors (more about deprecations in ticket #2240 (closed)). But it's not crazy for a live site to have a .git folder.
Previous discussion at https://github.com/civicrm/civicrm-core/pull/17276. Where it stalled was not really on whether using .git is wrong, it was on what it should do instead. Summary of alternates:
- Use the Environment setting at System Settings - Debugging.
- There may be some differences between what that setting is actually for and what this function gets used for.
- Also switching to this setting has some side effects which aren't blockers but would need to be dealt with (test suite, buildkit defaults).
- Instead of "is dev", have a way to tell "for testing" and "not for testing".
- CIVICRM_UF(?)
- Use whatever the symfony environment is set to.
@mattwire @AlanDixon @MikeyMJCO @artfulrobot