The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving to github
#10
Some pretty big-name projects still use php-script-based configuration for at least a portion of their configuration. THere are some things that are just easier to do in PHP than in the DB...

For instance, I just added a 'userspice/admin_groups' and it is set as an array. You *can* make this work within the DB, but to make sure the user enters the data appropriately you're going to have to write a special form with appropriate validation and etc. All that when they could have written "array(2,7,19)"...

The end result of having "fancy DB" configuration is that developers tend to hardcode their chosen defaults - to make it configurable is just too much of a pain. Whereas if I can write this code:

if (!$adminGroups = Config::get('userspice/admin_groups'))
$adminGroups = [2];

And not think about it anymore then I will make it a habit to *always* allow that kind of configuration override.

It may be worth thinking about leaving options open for code-based configuration...
  Reply


Messages In This Thread
Moving to github - by plb - 09-30-2016, 03:22 PM
Moving to github - by mudmin - 09-30-2016, 03:25 PM
Moving to github - by brian - 09-30-2016, 06:14 PM
Moving to github - by plb - 10-01-2016, 11:45 AM
Moving to github - by brian - 10-01-2016, 08:56 PM
Moving to github - by plb - 10-02-2016, 07:05 AM
Moving to github - by brian - 10-02-2016, 12:03 PM
Moving to github - by plb - 10-02-2016, 12:22 PM
Moving to github - by brian - 10-02-2016, 12:26 PM
Moving to github - by plb - 10-04-2016, 10:19 AM
Moving to github - by brian - 10-04-2016, 10:56 AM
Moving to github - by brian - 10-04-2016, 11:19 AM
Moving to github - by brian - 10-04-2016, 12:16 PM
Moving to github - by brian - 10-04-2016, 12:43 PM
Moving to github - by plb - 10-04-2016, 07:16 PM
Moving to github - by brian - 10-04-2016, 08:31 PM
Moving to github - by plb - 10-06-2016, 04:19 AM
Moving to github - by brian - 10-06-2016, 01:36 PM
Moving to github - by mudmin - 10-06-2016, 01:42 PM
Moving to github - by brian - 10-06-2016, 01:46 PM
Moving to github - by mudmin - 10-06-2016, 01:48 PM
Moving to github - by plb - 10-06-2016, 06:02 PM
Moving to github - by plb - 10-06-2016, 06:13 PM
Moving to github - by mudmin - 10-06-2016, 06:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)