? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
22 May 2017

Summary of Changes

For those of us that daily have to edit configuration.php files manually, the current ordering of the object properties is random

Some items are together, but other items (like db host user password) are spread throughout the file.

Joomla doesnt care what order the properties are in

But people like me who daily edit manually configuration.php files, having the properties in a a-z order would greatly help workflow.

Testing Instructions

Apply patch, save Joomla Global Config, see that configuration.php contents are now in a-z order.

Documentation Changes Required

None.

Full b/c, no issues there.

avatar PhilETaylor PhilETaylor - open - 22 May 2017
avatar PhilETaylor PhilETaylor - change - 22 May 2017
Status New Pending
avatar PhilETaylor PhilETaylor - change - 22 May 2017
Title
Sort configuration.php proerties in alphabetical order
Sort configuration.php properties in alphabetical order
avatar PhilETaylor PhilETaylor - edited - 22 May 2017
avatar joomla-cms-bot joomla-cms-bot - change - 22 May 2017
Category External Library Libraries
avatar brianteeman
brianteeman - comment - 22 May 2017

personally I would prefer it if they are grouped - just as they are https://github.com/joomla/joomla-cms/blob/staging/installation/configuration.php-dist

avatar mbabker
mbabker - comment - 22 May 2017

?

It introduces inconsistency to how the Registry API dumps objects, and I'd say it's a behavior that isn't one that should be forced.

If you really want to pursue this...

  • The sort option needs to be supported in all formatters
  • It should probably be a configurable option that gets passed in when you instruct the Registry to export the contents to a file format
  • Callers to that function then need to pass the right option

personally I would prefer it if they are grouped

That can't be done efficiently with what is in essence a code generator. I'd rather us use a proper Registry structure for the config though (so you have a `public $database => array('name' => 'db-name'); type structure) but that would be a massive B/C break as it relates to the configuration keys.

avatar PhilETaylor
PhilETaylor - comment - 22 May 2017

Yes I know we always disagree, but this is 3 lines of code change instead of huge amounts of change.

This class does more than just save configuration.php, it converts any registry object to a php class, and so has to be reuseable.

In fact the ordering should be configurable as well.

avatar PhilETaylor
PhilETaylor - comment - 22 May 2017

In fact the ordering should be configurable as well.

Like @mbabker says :)

So good idea, but bad implementation. Will revisit this when Im not so busy or stressed.

avatar PhilETaylor PhilETaylor - change - 22 May 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-05-22 15:49:18
Closed_By PhilETaylor
Labels Added: ? ?
avatar PhilETaylor PhilETaylor - close - 22 May 2017

Add a Comment

Login with GitHub to post a comment