Skip to content

Validate app.ini about deprecated options #6498

@mrkeuz

Description

@mrkeuz

Describe the feature

It would be good to show some warning about DEPRECATION configs in app.ini.

Just faced with next issue. I rename [mailer][email] section in app.ini and email stopping work. After quick check, I find that PASSWD field was renamed to PASSWORD and it has not any records in CHANGELOG.md about this. Only about section rename.

So it will be good validate app.ini to some deprecated/unused option. Or at least warn about unused option for quickly validate successfully migration.

Also, this will avoid errors in the configuration and unnecessary issues on GitHub.

NOTE: Some options may be security importance so if some of them will silent back to default it can be potential risky.

Describe the solution you'd like

Make some schema for validation app.ini file and validate that all parameters are valid and applied. If not, show notification at start.

Describe alternatives you've considered

  • Make just list of acceptable section→parameter pairs. Can be extracted in automatic manner from orig app.ini. So without deprecation detection.
  • Validate current app.ini at least that all option actual.
  • Show warnings at start that section→parameter deprecated or unused.
  • Show warning if section renamed (exist only in orig app.ini)

Proof of concept: https://gist.github.com/mrkeuz/b200dc626531de60d98f625b2aff63c1

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions