Skip to content

Commit 6716c5a

Browse files
committed
Adjust property name
1 parent 89c96f5 commit 6716c5a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

app/Config/Exceptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class Exceptions extends BaseConfig
6060
* Use this option to temporarily cease the warnings and instead log those.
6161
* This option also works for user deprecations.
6262
*/
63-
public bool $logDeprecationsOnly = true;
63+
public bool $logDeprecations = true;
6464

6565
/**
6666
* --------------------------------------------------------------------------
6767
* LOG LEVEL THRESHOLD FOR DEPRECATIONS
6868
* --------------------------------------------------------------------------
69-
* If `$logDeprecationsOnly` is set to `true`, this sets the log level
69+
* If `$logDeprecations` is set to `true`, this sets the log level
7070
* to which the deprecation will be logged. This should be one of the log
7171
* levels recognized by PSR-3.
7272
*

system/Debug/Exceptions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public function __construct(ExceptionsConfig $config, $request, ResponseInterfac
8383
if (! isset($this->config->sensitiveDataInTrace)) {
8484
$this->config->sensitiveDataInTrace = [];
8585
}
86-
if (! isset($this->config->logDeprecationsOnly, $this->config->deprecationLogLevel)) {
87-
$this->config->logDeprecationsOnly = false;
86+
if (! isset($this->config->logDeprecations, $this->config->deprecationLogLevel)) {
87+
$this->config->logDeprecations = false;
8888
$this->config->deprecationLogLevel = LogLevel::WARNING;
8989
}
9090
}
@@ -164,7 +164,7 @@ public function errorHandler(int $severity, string $message, ?string $file = nul
164164
return true;
165165
}
166166

167-
if (! $this->config->logDeprecationsOnly || (bool) env('CODEIGNITER_SCREAM_DEPRECATIONS')) {
167+
if (! $this->config->logDeprecations || (bool) env('CODEIGNITER_SCREAM_DEPRECATIONS')) {
168168
throw new ErrorException($message, 0, $severity, $file, $line);
169169
}
170170

tests/system/Debug/ExceptionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testDeprecationsOnPhp81DoNotThrow(): void
5959
{
6060
$config = new ExceptionsConfig();
6161

62-
$config->logDeprecationsOnly = true;
62+
$config->logDeprecations = true;
6363
$config->deprecationLogLevel = 'error';
6464

6565
$this->exception = new Exceptions($config, Services::request(), Services::response());
@@ -83,7 +83,7 @@ public function testSuppressedDeprecationsAreLogged(): void
8383
{
8484
$config = new ExceptionsConfig();
8585

86-
$config->logDeprecationsOnly = true;
86+
$config->logDeprecations = true;
8787
$config->deprecationLogLevel = 'error';
8888

8989
$this->exception = new Exceptions($config, Services::request(), Services::response());

user_guide_src/source/general/errors/012.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ class Exceptions extends BaseConfig
99
{
1010
// ... other properties
1111

12-
public bool $logDeprecationsOnly = true;
12+
public bool $logDeprecations = true;
1313
public string $deprecationLogLevel = LogLevel::WARNING; // this should be one of the log levels supported by PSR-3
1414
}

user_guide_src/source/installation/upgrade_430.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ The following files received significant changes (including deprecations or visu
178178
and it is recommended that you merge the updated versions with your application:
179179

180180
* ``app/Config/Exceptions.php``
181-
* Two additional public properties were added: ``$logDeprecationsOnly`` and ``$deprecationLogLevel``.
181+
* Two additional public properties were added: ``$logDeprecations`` and ``$deprecationLogLevel``.
182182
* ``app/Config/Routes.php``
183183
* Due to the fact that the approach to running Spark Commands has changed, there is no longer a need to load the internal routes of the framework.
184184

0 commit comments

Comments
 (0)