-
Notifications
You must be signed in to change notification settings - Fork 7.9k
php.ini: set variables_order to EGPCS #10182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
php.ini: set variables_order to EGPCS #10182
Conversation
the provided defaults contradicts the documentation so we update the defaults accordingly.
There is a comment in the ini files:
So it makes sense to me to not include If you still want to change it, please target the "master" branch, and send email to the internals mailing list for discussion. |
👍 i sent a mail to the mailing list to discuss this. lets see. |
If not, we should remove that comment. :) By the way, I'm not pressing "approve and run", since this change wouldn't be checked anyway. The commit message could have been started with |
which php.ini is used for the tests? i noticed, that some tests override this setting to include |
That depends on the environment; I don't think our CI uses any particular php.ini files (except for AppVeyor, but that only declares some extensions, and a few OPcache related settings). |
This is a strange part of the comment, and I doubt this is the case anymore, since we build applications differently that we did 13 years ago. It's now a common practice to inject ENV vars into your application instead of using local config files for production. Additionally, |
I have changed the target and updated the comments to more honestly reflect reality. This looks like a reasonable change to make to me, if no objections are raised in the next few days I'll merge into master only. |
This needs RM approval as per: https://externals.io/message/128453 |
; Development Value: "EGPCS" | ||
; Production Value: "EGPCS"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly these lines should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other close by and related settings declare here their defaults, ini and production values, so it seems fine to follow that pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They only do that when any of them differ from the built-in default.
more messy github edits
No it does not, the feature freeze has no impact on bug fixes. This is a bug fix, the original issue stated the documentation and code were out of alignment, aligning them cannot be considered a feature under normal circumstances. |
They were not. The built-in default is This is changing the behavior for anyone who uses the supplied |
Example ini files occupy a strange space, somewhere between documentation and code, but not really either documentation or code. Whatever fixing them so they correctly reflect documentation and internal defaults is, it cannot be a feature, nothing is added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if no objections are raised in the next few days I'll merge into master only.
I am hereby formally objecting to the merge of this PR and given the previous description of:
There is a performance penalty paid for the registration of these arrays and because ENV is not as commonly used as the others, ENV is not recommended on productions servers.
I am requesting an RFC to discuss whether this performance penalty still exists, still is relevant, and if ENV should continue not to be recommended on production servers.
heyho,
during development i encountered some issues with $_ENV and cli scripts invoked like this:
which was odd, because on my debian box this worked fine but on a macos install via homebrew it was not working. we noticed that variables_order was set to
GPCS
and thus ommitting the $_ENV superglobal i required to have theCONFIG_TARGET
set.after some digging around, i found the formular for php on homebrew with its source for the default configuration:
https://github.com/Homebrew/homebrew-core/blob/56299f3dac37eaf9fe0b1e187b889f559a74be26/Formula/php.rb#L219
the default for the
variables_order
is defined asECPGS
in the documentation but both thephp.ini-production
andphp.ini-development
had those set toGPCS
which contradicts the docs.the current dockerhub image also uses EGPCS as a sane default
so i figured the right thing to do is to update both php.ini files according to the documentation.