User tests: Successful: Unsuccessful:
One of the changes in the Registry package's 2.0 branch is that the PHP formatter class now supports dumping data in its correct data type (in CMS 3.x and Framework 1.x the resulting PHP class always uses strings for the properties, Framework 2.x will now dump an integer as an integer and a boolean as true or false versus string 1 or string 0). Especially with boolean values, this actually makes it more clear what the property is, what it controls (manually editing public $offline
so it's true or false versus 1 or 0 to me makes more sense), and the type of data you can expect in the field.
This PR changes the step in the install app that writes the configuration.php
file and the filters in com_config
when editing the global configuration to use type aware values consistently for numeric and boolean properties.
Install the 4.0 branch with this PR applied. Note that properties such as $debug
, $offline
, and $shared_session
should now use boolean true/false versus 1/0 values when the file is written. Go to the global configuration, make a change (the change is up to you, it will be most noticeable for testing though if you change a value that should be boolean (a yes/no toggle) or numeric), and save the changes. Then manually inspect the configuration.php
file. The properties should be in their correct data type still.
In the documentation going forward, code examples should make more consistent use of the correct data types as this is in many cases more clear. However, this would be a best practice change and not something requiring developers make code changes; given PHP's roots as a loose typed system, existing code which works with numeric and boolean designed values will continue to function OK unless they are implementing strict checks.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_config Installation |
Milestone |
Added: |
Milestone |
Added: |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-29 17:07:33 |
Closed_By | ⇒ | wilsonge |