Added configurable default value to Configure::read() #10890
Conversation
Sounds reasonable given the other reader methods also have this default argument. |
What use case do you see for this feature? Do you end up missing a config option on a given case? |
For BC reasons this could however go into 3.5 better |
Codecov Report
@@ Coverage Diff @@
## master #10890 +/- ##
============================================
- Coverage 94.94% 94.93% -0.01%
Complexity 12137 12137
============================================
Files 422 422
Lines 30168 30168
============================================
- Hits 28643 28641 -2
- Misses 1525 1527 +2
Continue to review full report at Codecov.
|
Moved to |
Lovely, that was on my TODO list for so long. Thanks for taking care of. |
@@ -16,4 +16,4 @@ | |||
// @license https://opensource.org/licenses/mit-license.php MIT License | |||
// +--------------------------------------------------------------------------------------------+ // | |||
//////////////////////////////////////////////////////////////////////////////////////////////////// | |||
3.4.9 | |||
3.4.10 |
ravage84
Jul 12, 2017
Member
You don't need to do that. This is taken careof when it get's released.
You don't need to do that. This is taken careof when it get's released.
dereuromark
Jul 12, 2017
Member
this is because of branch change. can be disregarded.
this is because of branch change. can be disregarded.
65c9018
into
cakephp:3.next
Thanks @h-moriya |
Add documentation for cakephp/cakephp#10890
default value to
Configure::read()
Configure::read('key','none');
=Configure::read('key') ?? 'none';
It works the same as
env ()