Skip to content

SIMPLE: Add PHP version identifier to php.ini file #20755

@Yousha

Description

@Yousha

Description

Problem:
Currently, php.ini config file does NOT contain any explicit reference to which PHP version it is associated with. This creates several challenges:

  • When users have multiple PHP versions installed (7.4, 8.0, 8.1, 8.2, 8.3), it's difficult to determine which php.ini file belongs to which version without running php --version or checking directory structures.
  • During server migrations or deployments, admins might accidentally use an php.ini file from a different PHP version.
  • Can be used by php.ini analyzers/scanner when accepting files.

Solution:
Add a version identifier comment at the top of the php.ini file, similar to how many config files include metadata.

; php.ini configuration file
; PHP Version: 8.5.0

[PHP]
; ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions