[PHP-DEV] Allow to easily retrieve non-default INI settings / GH PR 17459

Hi

this email concerns my PR sapi/cli: Extend `--ini` to print INI settings changed from the builtin default by TimWolla · Pull Request #17459 · php/php-src · GitHub, which extended the cli-SAPI’s `--ini` flag to print any INI settings that differ from the built-in default. There was some discussion around which flag to use, which didn't result in particularly strong opinions, with the PR being merged in the current state, given there is plenty of time until feature freeze for follow-ups.

After the merge, this came up again and I'm now reaching out to Internals for other folks to weigh in. Those of you who have an opinion about the flag (and possible BC concerns with using the existing `--ini` flag), please comment on the PR (or this ML thread). If necessary I can do a small RFC / straw poll about this, but I hope that the feature is sufficiently simple to not require a formal process :slight_smile:

Best regards
Tim Düsterhus

Hi,

On Thu, Feb 6, 2025 at 9:57 AM Tim Düsterhus <tim@bastelstu.be> wrote:

Hi

this email concerns my PR https://github.com/php/php-src/pull/17459,
which extended the cli-SAPI’s --ini flag to print any INI settings
that differ from the built-in default. There was some discussion around
which flag to use, which didn’t result in particularly strong opinions,
with the PR being merged in the current state, given there is plenty of
time until feature freeze for follow-ups.

After the merge, this came up again and I’m now reaching out to
Internals for other folks to weigh in. Those of you who have an opinion
about the flag (and possible BC concerns with using the existing --ini
flag), please comment on the PR (or this ML thread). If necessary I can
do a small RFC / straw poll about this, but I hope that the feature is
sufficiently simple to not require a formal process :slight_smile:

As I mentioned in the PR I don’t see a reason why that option should be extended to also contain diff which will be mostly quite useless if one just want to see the configuration files. I can see why someone would want the diff functionality but it should be probably using a different option or the previously suggested --ini=diff. Personally I don’t really mind what it is, just not using the same one.

Cheers

Jakub

this email concerns my PR sapi/cli: Extend `--ini` to print INI settings changed from the builtin default by TimWolla · Pull Request #17459 · php/php-src · GitHub,
which extended the cli-SAPI’s `--ini` flag to print any INI settings
that differ from the built-in default. There was some discussion around
which flag to use, which didn't result in particularly strong opinions,

Even before this change, the `php --ini` output was not very
"plumbing-friendly", so I don't think there are scripts that parse the
`php --ini` output.

If we are really looking to change or add a new flag, I think a new
`php --ini-list-modified` or `php --ini-show-modified` might be a good
fit.

`php --help` lists the `--ini` flag as `Show configuration file
names`, so with a new flag, we don't change the semantics of the `php
--ini` flag.

Thank you,
Ayesh.

Hi

Am 2025-02-06 09:55, schrieb Tim Düsterhus:

this email concerns my PR sapi/cli: Extend `--ini` to print INI settings changed from the builtin default by TimWolla · Pull Request #17459 · php/php-src · GitHub, which extended the cli-SAPI’s `--ini` flag to print any INI settings that differ from the built-in default. There was some discussion around which flag to use, which didn't result in particularly strong opinions, with the PR being merged in the current state, given there is plenty of time until feature freeze for follow-ups.

After the merge, this came up again and I'm now reaching out to Internals for other folks to weigh in. Those of you who have an opinion about the flag (and possible BC concerns with using the existing `--ini` flag), please comment on the PR (or this ML thread). If necessary I can do a small RFC / straw poll about this, but I hope that the feature is sufficiently simple to not require a formal process :slight_smile:

For reference, I created a PR to update the flag to `--ini=diff` at: sapi/cli: Print non-default INI settings for `--ini=diff` by TimWolla · Pull Request #17762 · php/php-src · GitHub

Best regards
Tim Düsterhus