diff --git a/4dev/tests/Logging/CoreLibsLoggingErrorMessagesTest.php b/4dev/tests/Logging/CoreLibsLoggingErrorMessagesTest.php
index 3c21d245..3393415d 100644
--- a/4dev/tests/Logging/CoreLibsLoggingErrorMessagesTest.php
+++ b/4dev/tests/Logging/CoreLibsLoggingErrorMessagesTest.php
@@ -96,9 +96,9 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
public function testErrorMessageLevelOk(string $level, string $str, string $expected): void
{
$log = new \CoreLibs\Logging\Logging([
- 'log_file_id' => 'testErrorMessages',
+ 'log_file_id' => 'testErrorMessagesLevelOk',
'log_folder' => self::LOG_FOLDER,
- 'log_level' => Level::Debug,
+ 'log_level' => Level::Error,
]);
$em = new \CoreLibs\Logging\ErrorMessage($log);
$em->setMessage(
@@ -128,9 +128,9 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
public function testErrorMessageOk(): void
{
$log = new \CoreLibs\Logging\Logging([
- 'log_file_id' => 'testErrorMessages',
+ 'log_file_id' => 'testErrorMessagesOk',
'log_folder' => self::LOG_FOLDER,
- 'log_level' => Level::Debug
+ 'log_level' => Level::Error
]);
$em = new \CoreLibs\Logging\ErrorMessage($log);
$em->setErrorMsg(
@@ -314,7 +314,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
* Undocumented function
*
* @dataProvider providerErrorMessageLog
- * @testdox Test Log writing [$_dataName]
+ * @testdox Test Log writing with log level Error [$_dataName]
*
* @param string $id
* @param string $level
@@ -324,7 +324,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
* @param string $expected
* @return void
*/
- public function testErrorMessageLog(
+ public function testErrorMessageLogErrorLevel(
string $id,
string $level,
string $str,
@@ -333,7 +333,63 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
string $expected
): void {
$log = new \CoreLibs\Logging\Logging([
- 'log_file_id' => 'testErrorMessages',
+ 'log_file_id' => 'testErrorMessagesLogError',
+ 'log_folder' => self::LOG_FOLDER,
+ 'log_level' => Level::Notice,
+ 'log_per_run' => true
+ ]);
+ $em = new \CoreLibs\Logging\ErrorMessage($log);
+ $em->setErrorMsg(
+ $id,
+ $level,
+ $str,
+ message: $message,
+ log_error: $log_error
+ );
+ $file_content = '';
+ if (is_file($log->getLogFolder() . $log->getLogFile())) {
+ $file_content = file_get_contents(
+ $log->getLogFolder() . $log->getLogFile()
+ ) ?: '';
+ }
+ // if error, if null or false, it will not be logged
+ if ($level == 'error' && ($log_error === null || $log_error === false)) {
+ $this->assertStringNotContainsString(
+ $expected,
+ $file_content
+ );
+ } else {
+ $this->assertStringContainsString(
+ $expected,
+ $file_content
+ );
+ }
+ }
+
+ /**
+ * Undocumented function
+ *
+ * @dataProvider providerErrorMessageLog
+ * @testdox Test Log writing with log Level Debug [$_dataName]
+ *
+ * @param string $id
+ * @param string $level
+ * @param string $str
+ * @param string|null $message
+ * @param bool|null $log_error
+ * @param string $expected
+ * @return void
+ */
+ public function testErrorMessageLogErrorDebug(
+ string $id,
+ string $level,
+ string $str,
+ ?string $message,
+ ?bool $log_error,
+ string $expected
+ ): void {
+ $log = new \CoreLibs\Logging\Logging([
+ 'log_file_id' => 'testErrorMessagesLogDebug',
'log_folder' => self::LOG_FOLDER,
'log_level' => Level::Debug,
'log_per_run' => true
@@ -352,8 +408,8 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
$log->getLogFolder() . $log->getLogFile()
) ?: '';
}
- // if n
- if ($level == 'error' && ($log_error === null || $log_error === false)) {
+ // if error, and log is debug level, only explicit false are not logged
+ if ($level == 'error' && $log_error === false) {
$this->assertStringNotContainsString(
$expected,
$file_content
diff --git a/composer.lock b/composer.lock
index 79d6b7fe..79ec40b0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -481,16 +481,16 @@
},
{
"name": "doctrine/deprecations",
- "version": "v1.1.1",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
+ "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
"shasum": ""
},
"require": {
@@ -522,9 +522,9 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
- "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
+ "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
},
- "time": "2023-06-03T09:27:29+00:00"
+ "time": "2023-09-27T20:04:15+00:00"
},
{
"name": "felixfbecker/advanced-json-rpc",
@@ -1180,16 +1180,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.10.35",
+ "version": "1.10.36",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3"
+ "reference": "ffa3089511121a672e62969404e4fddc753f9b15"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3",
- "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa3089511121a672e62969404e4fddc753f9b15",
+ "reference": "ffa3089511121a672e62969404e4fddc753f9b15",
"shasum": ""
},
"require": {
@@ -1238,7 +1238,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-19T15:27:56+00:00"
+ "time": "2023-09-29T14:07:45+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
@@ -2254,16 +2254,16 @@
},
{
"name": "symfony/string",
- "version": "v6.3.2",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "53d1a83225002635bca3482fcbf963001313fb68"
+ "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68",
- "reference": "53d1a83225002635bca3482fcbf963001313fb68",
+ "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339",
+ "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339",
"shasum": ""
},
"require": {
@@ -2320,7 +2320,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.3.2"
+ "source": "https://github.com/symfony/string/tree/v6.3.5"
},
"funding": [
{
@@ -2336,7 +2336,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-05T08:41:27+00:00"
+ "time": "2023-09-18T10:38:32+00:00"
},
{
"name": "tysonandre/var_representation_polyfill",
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index dfce511e..0bc6c671 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -441,17 +441,17 @@
},
{
"name": "doctrine/deprecations",
- "version": "v1.1.1",
- "version_normalized": "1.1.1.0",
+ "version": "1.1.2",
+ "version_normalized": "1.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
+ "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
"shasum": ""
},
"require": {
@@ -469,7 +469,7 @@
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
},
- "time": "2023-06-03T09:27:29+00:00",
+ "time": "2023-09-27T20:04:15+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -485,7 +485,7 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
- "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
+ "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
},
"install-path": "../doctrine/deprecations"
},
@@ -1179,17 +1179,17 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.10.35",
- "version_normalized": "1.10.35.0",
+ "version": "1.10.36",
+ "version_normalized": "1.10.36.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3"
+ "reference": "ffa3089511121a672e62969404e4fddc753f9b15"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3",
- "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa3089511121a672e62969404e4fddc753f9b15",
+ "reference": "ffa3089511121a672e62969404e4fddc753f9b15",
"shasum": ""
},
"require": {
@@ -1198,7 +1198,7 @@
"conflict": {
"phpstan/phpstan-shim": "*"
},
- "time": "2023-09-19T15:27:56+00:00",
+ "time": "2023-09-29T14:07:45+00:00",
"bin": [
"phpstan",
"phpstan.phar"
@@ -2351,17 +2351,17 @@
},
{
"name": "symfony/string",
- "version": "v6.3.2",
- "version_normalized": "6.3.2.0",
+ "version": "v6.3.5",
+ "version_normalized": "6.3.5.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "53d1a83225002635bca3482fcbf963001313fb68"
+ "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68",
- "reference": "53d1a83225002635bca3482fcbf963001313fb68",
+ "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339",
+ "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339",
"shasum": ""
},
"require": {
@@ -2381,7 +2381,7 @@
"symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^5.4|^6.0"
},
- "time": "2023-07-05T08:41:27+00:00",
+ "time": "2023-09-18T10:38:32+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2420,7 +2420,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.3.2"
+ "source": "https://github.com/symfony/string/tree/v6.3.5"
},
"funding": [
{
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index ed03b6ec..781a5937 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -65,9 +65,9 @@
'dev_requirement' => true,
),
'doctrine/deprecations' => array(
- 'pretty_version' => 'v1.1.1',
- 'version' => '1.1.1.0',
- 'reference' => '612a3ee5ab0d5dd97b7cf3874a6efe24325efac3',
+ 'pretty_version' => '1.1.2',
+ 'version' => '1.1.2.0',
+ 'reference' => '4f2d4f2836e7ec4e7a8625e75c6aa916004db931',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/deprecations',
'aliases' => array(),
@@ -191,9 +191,9 @@
'dev_requirement' => true,
),
'phpstan/phpstan' => array(
- 'pretty_version' => '1.10.35',
- 'version' => '1.10.35.0',
- 'reference' => 'e730e5facb75ffe09dfb229795e8c01a459f26c3',
+ 'pretty_version' => '1.10.36',
+ 'version' => '1.10.36.0',
+ 'reference' => 'ffa3089511121a672e62969404e4fddc753f9b15',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpstan',
'aliases' => array(),
@@ -347,9 +347,9 @@
'dev_requirement' => true,
),
'symfony/string' => array(
- 'pretty_version' => 'v6.3.2',
- 'version' => '6.3.2.0',
- 'reference' => '53d1a83225002635bca3482fcbf963001313fb68',
+ 'pretty_version' => 'v6.3.5',
+ 'version' => '6.3.5.0',
+ 'reference' => '13d76d0fb049051ed12a04bef4f9de8715bea339',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),
diff --git a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php b/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php
index 07cb43b6..bad5070a 100644
--- a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php
+++ b/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php
@@ -11,6 +11,7 @@ use function array_reduce;
use function assert;
use function debug_backtrace;
use function sprintf;
+use function str_replace;
use function strpos;
use function strrpos;
use function substr;
@@ -138,7 +139,7 @@ class Deprecation
// first check that the caller is not from a tests folder, in which case we always let deprecations pass
if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
- $path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR;
+ $path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $package) . DIRECTORY_SEPARATOR;
if (strpos($backtrace[0]['file'], $path) === false) {
return;
diff --git a/vendor/doctrine/deprecations/phpcs.xml b/vendor/doctrine/deprecations/phpcs.xml
deleted file mode 100644
index f115e43d..00000000
--- a/vendor/doctrine/deprecations/phpcs.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
" . $log->prAr($em->getErrorMsg()) . ""; print "