Skip to content

Conversation

@kenjis
Copy link
Member

@kenjis kenjis commented Feb 20, 2024

Description
Closes #7388

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • User guide updated
  • [] Conforms to style guide

@kenjis kenjis added the documentation Pull requests for documentation only label Feb 20, 2024
Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After millions of days. 🌞

Comment on lines 33 to 34
within the class files, or stored in a database using the :ref:`Settings <settings>`
library.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explanation is misleading because the Setting library does not affect the instantiation of Config objects.
I will reconsider.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settings can replace config() in application code, but not config() in the framework code.
So I removed the description.

It is perfectly fine to read and write the values of custom Config classes added (or added properties to existing config classes) by a dev with setting().

But even if we use setting() within an app to allow Cookie config to be stored in the database, it does not affect the code that retrieves the values as config(CookieConfig::class) in the framework code.

@kenjis
Copy link
Member Author

kenjis commented Mar 15, 2024

If there are no objections, I will merge this within a couple of days.

Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kenjis kenjis merged commit b8adef6 into codeigniter4:develop Mar 18, 2024
@kenjis kenjis deleted the docs-about-config-classes branch March 18, 2024 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

What are Config Files and how do we improve Config?

2 participants