diff --git a/composer.lock b/composer.lock index 9d50c360..e323dfd0 100644 --- a/composer.lock +++ b/composer.lock @@ -34,13 +34,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -235,26 +235,29 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.4", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", - "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=13" + }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "1.4.10 || 2.0.3", + "doctrine/coding-standard": "^9 || ^12 || ^13", + "phpstan/phpstan": "1.4.10 || 2.1.11", "phpstan/phpstan-phpunit": "^1.0 || ^2", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", "psr/log": "^1 || ^2 || ^3" }, "suggest": { @@ -274,9 +277,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.4" + "source": "https://github.com/doctrine/deprecations/tree/1.1.5" }, - "time": "2024-12-07T21:18:45+00:00" + "time": "2025-04-07T20:06:18+00:00" }, { "name": "doctrine/instantiator", @@ -440,16 +443,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", "shasum": "" }, "require": { @@ -488,7 +491,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" }, "funding": [ { @@ -496,7 +499,7 @@ "type": "tidelift" } ], - "time": "2024-11-08T17:47:46+00:00" + "time": "2025-04-29T12:36:36+00:00" }, { "name": "netresearch/jsonmapper", @@ -551,16 +554,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -603,9 +606,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "phan/phan", @@ -860,16 +863,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.1", + "version": "5.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8" + "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", - "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/92dde6a5919e34835c506ac8c523ef095a95ed62", + "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62", "shasum": "" }, "require": { @@ -918,9 +921,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.2" }, - "time": "2024-12-07T09:39:29+00:00" + "time": "2025-04-13T19:20:35+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -982,16 +985,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299" + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299", - "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", "shasum": "" }, "require": { @@ -1023,22 +1026,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0" }, - "time": "2024-10-13T11:29:49+00:00" + "time": "2025-02-19T13:28:12+00:00" }, { "name": "phpstan/phpstan", - "version": "2.0.3", + "version": "2.1.17", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", - "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053", + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053", "shasum": "" }, "require": { @@ -1083,25 +1086,25 @@ "type": "github" } ], - "time": "2024-11-28T22:19:37+00:00" + "time": "2025-05-21T20:55:28+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4" + "reference": "468e02c9176891cc901143da118f09dc9505fc2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", - "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/468e02c9176891cc901143da118f09dc9505fc2f", + "reference": "468e02c9176891cc901143da118f09dc9505fc2f", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0" + "phpstan/phpstan": "^2.1.15" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", @@ -1128,9 +1131,9 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.1" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.3" }, - "time": "2024-11-28T21:56:36+00:00" + "time": "2025-05-14T10:56:57+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1453,16 +1456,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.22", + "version": "9.6.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" + "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", - "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/43d2cb18d0675c38bd44982a5d1d88f6d53d8d95", + "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95", "shasum": "" }, "require": { @@ -1473,7 +1476,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.1", + "myclabs/deep-copy": "^1.13.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=7.3", @@ -1536,7 +1539,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.23" }, "funding": [ { @@ -1547,12 +1550,20 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2024-12-05T13:48:26+00:00" + "time": "2025-05-02T06:40:34+00:00" }, { "name": "psr/container", @@ -2688,23 +2699,24 @@ }, { "name": "symfony/console", - "version": "v7.2.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^7.2" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -2761,7 +2773,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.1" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -2777,20 +2789,20 @@ "type": "tidelift" } ], - "time": "2024-12-11T03:49:26+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -2798,12 +2810,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -2828,7 +2840,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -2844,11 +2856,11 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2907,7 +2919,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -2927,7 +2939,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -2985,7 +2997,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -3005,7 +3017,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3066,7 +3078,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -3086,19 +3098,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -3146,7 +3159,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -3162,20 +3175,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", "shasum": "" }, "require": { @@ -3226,7 +3239,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" }, "funding": [ { @@ -3242,20 +3255,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-01-02T08:10:11+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -3268,12 +3281,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -3309,7 +3322,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -3325,20 +3338,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", "shasum": "" }, "require": { @@ -3396,7 +3409,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.0" + "source": "https://github.com/symfony/string/tree/v7.3.0" }, "funding": [ { @@ -3412,7 +3425,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:26+00:00" + "time": "2025-04-20T20:19:01+00:00" }, { "name": "theseer/tokenizer", @@ -3587,10 +3600,10 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], + "platform": {}, + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/www/admin/class_test.array.php b/www/admin/class_test.array.php index 2e826f4d..439252f3 100644 --- a/www/admin/class_test.array.php +++ b/www/admin/class_test.array.php @@ -51,6 +51,9 @@ $test_array = [ 'element_c' => [ 'type' => 'email' ], + 'element_d' => [ + 'type' => 'butter' + ], ], ]; @@ -60,6 +63,8 @@ echo "ARRAYSEARCHRECURSIVE(email, [array], type): " . DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array, 'type')) . "
"; echo "ARRAYSEARCHRECURSIVE(email, [array]['input'], type): " . DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array['input'], 'type')) . "
"; +echo "ARRAYSEARCHRECURSIVE(email, [array]['input'], wrong): " + . DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array['input'], 'wrong')) . "
"; // all return echo "ARRAYSEARCHRECURSIVEALL(email, [array], type): " . Dgs::printAr((array)ArrayHandler::arraySearchRecursiveAll('email', $test_array, 'type')) . "
"; @@ -68,7 +73,15 @@ echo "ARRAYSEARCHRECURSIVEALL(email, [array], type): " // simple search echo "ARRAYSEARCHSIMPLE([array], type, email): " - . (string)ArrayHandler::arraySearchSimple($test_array, 'type', 'email') . "
"; + . Dgs::prBl(ArrayHandler::arraySearchSimple($test_array, 'type', 'email')) . "
"; +echo "ARRAYSEARCHSIMPLE([array], type, not): " + . Dgs::prBl(ArrayHandler::arraySearchSimple($test_array, 'type', 'not')) . "
"; +echo "ARRAYSEARCHSIMPLE([array], type, [email,butter]): " + . Dgs::prBl(ArrayHandler::arraySearchSimple($test_array, 'type', ['email', 'butter'])) . "
"; +echo "ARRAYSEARCHSIMPLE([array], type, [email,not]): " + . Dgs::prBl(ArrayHandler::arraySearchSimple($test_array, 'type', ['email', 'not'])) . "
"; +echo "ARRAYSEARCHSIMPLE([array], type, [never,not]): " + . Dgs::prBl(ArrayHandler::arraySearchSimple($test_array, 'type', ['never', 'not'])) . "
"; $array_1 = [ 'foo' => 'bar' @@ -168,6 +181,31 @@ $data = [ $search = ['image', 'result_image', 'nothing', 'EMPTY']; $result = ArrayHandler::arraySearchKey($data, $search); print "ARRAYSEARCHKEY: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "
"; +$result = ArrayHandler::arraySearchKey($data, $search, true); +print "ARRAYSEARCHKEY: FLAT: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "
"; +$result = ArrayHandler::arraySearchKey($data, $search, true, true); +print "ARRAYSEARCHKEY: FLAT:PREFIX: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "
"; +$result = ArrayHandler::arraySearchKey($data, ["EMPTY"], true); +print "ARRAYSEARCHKEY: FLAT:PREFIX: Search: " . DgS::printAr(["EMPTY"]) . ", Found: " . DgS::printAr($result) . "
"; + +// $data = [ +// [ +// [name] => qrc_apcd, +// [value] => 5834367225, +// ], +// [ +// [name] => qrc_other, +// [value] => test, +// ], +// [ +// [name] => qrc_car_type, +// [value] => T33P17, +// ], +// [ +// [name] => qrc_deaer_store, +// [value] => 9990:001, +// ] +// ] // $test = [ // 'A' => [ @@ -265,6 +303,231 @@ print "array intersect key: " . DgS::printAr($keys) . ": " . DgS::printAr($out) print "array + suffix: " . DgS::printAr(ArrayHandler::arrayModifyKey($array, key_mod_suffix:'_attached')) . "
"; +print "
"; +$unsorted = [9, 5, 'A', 4, 'B', 6, 'c', 'C', 'a']; +$unsorted_keys = [ + 'A' => 9, 'B' => 5, 'C' => 'A', 'D' => 4, 'E' => 'B', 'F' => 6, 'G' => 'c', + 'H1' => 'D', 'B1' => 'd', 'H' => 'C', 'I' => 'a' +]; +print "Unsorted: " . DgS::printAr($unsorted) . "
"; +print "(sort): " . DgS::printAr(ArrayHandler::sortArray($unsorted)) . "
"; +print "(sort, lower): " . DgS::printAr(ArrayHandler::sortArray($unsorted, case_insensitive:true)) . "
"; +print "(sort, reverse): " . DgS::printAr(ArrayHandler::sortArray($unsorted, reverse:true)) . "
"; +print "(sort, lower, reverse): " + . DgS::printAr(ArrayHandler::sortArray($unsorted, case_insensitive:true, reverse:true)) . "
"; +print "(sort, keys): " . DgS::printAr(ArrayHandler::sortArray($unsorted_keys, maintain_keys:true)) . "
"; +print "(sort, keys, lower): " + . DgS::printAr(ArrayHandler::sortArray($unsorted_keys, maintain_keys:true, case_insensitive:true)) . "
"; + +print "
"; +$unsorted = [9 => 'A', 5 => 'B', 'A' => 'C', 4 => 'D', 'B' => 'E', 6 => 'F', 'c' => 'G', 'C' => 'H', 'a' => 'I']; +print "Unsorted Keys: " . DgS::printAr($unsorted) . "
"; +print "(sort): " . DgS::printAr(ArrayHandler::sortArray($unsorted)) . "
"; +print "(sort, keys): " . DgS::printAr(ArrayHandler::sortArray($unsorted, maintain_keys:true)) . "
"; +print "(kosrt): " . DgS::printAr(ArrayHandler::ksortArray($unsorted)) . "
"; +print "(kosrt, reverse): " . DgS::printAr(ArrayHandler::ksortArray($unsorted, reverse:true)) . "
"; +print "(kosrt, lower case, reverse): " + . DgS::printAr(ArrayHandler::ksortArray($unsorted, case_insensitive:true, reverse:true)) . "
"; + + +print "
"; +$nested = [ + 'B' => 'foo', 'a', '0', 9, + '1' => ['z', 'b', 'a'], + 'd' => ['zaip', 'bar', 'baz'] +]; +print "Nested: " . DgS::printAr($nested) . "
"; +print "(sort): " . DgS::printAr(ArrayHandler::sortArray($nested)) . "
"; +print "(ksort): " . DgS::printAr(ArrayHandler::ksortArray($nested)) . "
"; + +print "
"; + +$search_array = [ + 'table_lookup' => [ + 'match' => [ + ['param' => 'access_d_cd', 'data' => 'a_cd', 'time_validation' => 'on_load',], + ['param' => 'other_block', 'data' => 'b_cd'], + ['pflaume' => 'other_block', 'data' => 'c_cd'], + ['param' => 'third_block', 'data' => 'd_cd', 'time_validation' => 'cool'], + ['special' => 'other_block', 'data' => 'e_cd', 'time_validation' => 'other'], + ] + ] +]; +print "Search: " . DgS::printAr($search_array) . "
"; +print "Result (all): " . Dgs::printAr(ArrayHandler::findArraysMissingKey( + $search_array, + 'other_block', + 'time_validation' +)) . "
"; +print "Result (key): " . Dgs::printAr(ArrayHandler::findArraysMissingKey( + $search_array, + 'other_block', + 'time_validation', + 'pflaume' +)) . "
"; +print "Result (key): " . Dgs::printAr(ArrayHandler::findArraysMissingKey( + $search_array, + 'other_block', + ['data', 'time_validation'], + 'pflaume' +)) . "
"; + +print "
"; + +$search_array = [ + 'a' => [ + 'lookup' => 1, + 'value' => 'Foo', + 'other' => 'Bar', + ], + 'b' => [ + 'lookup' => 1, + 'value' => 'AAA', + 'other' => 'Other', + ], + 'c' => [ + 'lookup' => 0, + 'value' => 'CCC', + 'other' => 'OTHER', + ], + 'd' => [ + 'd-1' => [ + 'lookup' => 1, + 'value' => 'D SUB 1', + 'other' => 'Other B', + ], + 'd-2' => [ + 'lookup' => 0, + 'value' => 'D SUB 2', + 'other' => 'Other C', + ], + 'more' => [ + 'lookup' => 1, + 'd-more-1' => [ + 'lookup' => 1, + 'value' => 'D MORE SUB 1', + 'other' => 'Other C', + ], + 'd-more-2' => [ + 'lookup' => 0, + 'value' => 'D MORE SUB 0', + 'other' => 'Other C', + ], + ] + ] +]; + +print "Search: " . DgS::printAr($search_array) . "
"; +print "Result: " . DgS::printAr(ArrayHandler::selectArrayFromOption( + $search_array, + 'lookup', + 1, +)) . "
"; +print "Result: " . DgS::printAr(ArrayHandler::selectArrayFromOption( + $search_array, + 'lookup', + 1, + recursive:true +)) . "
"; +print "Result: " . DgS::printAr(ArrayHandler::selectArrayFromOption( + $search_array, + 'lookup', + 1, + recursive:true, + flat_separator:'-=-' +)) . "
"; +print "Result: " . DgS::printAr(ArrayHandler::selectArrayFromOption( + $search_array, + 'lookup', + 1, + recursive:true, + flat_result:false +)) . "
"; +print "Result: " . DgS::printAr(ArrayHandler::selectArrayFromOption( + $search_array, + 'other', + 'Other', + case_insensitive:false, +)) . "
"; + +$nestedTestData = [ + 'level1_a' => [ + 'name' => 'Level1A', + 'type' => 'parent', + 'children' => [ + 'child1' => [ + 'name' => 'Child1', + 'type' => 'child', + 'active' => true + ], + 'child2' => [ + 'name' => 'Child2', + 'type' => 'child', + 'active' => false + ] + ] + ], + 'level1_b' => [ + 'name' => 'Level1B', + 'type' => 'parent', + 'children' => [ + 'child3' => [ + 'name' => 'Child3', + 'type' => 'child', + 'active' => true, + 'nested' => [ + 'deep1' => [ + 'name' => 'Deep1', + 'type' => 'deep', + 'active' => true + ] + ] + ] + ] + ], + 'item5' => [ + 'name' => 'Direct', + 'type' => 'child', + 'active' => false + ] +]; + +$result = ArrayHandler::selectArrayFromOption( + $nestedTestData, + 'type', + 'child', + false, + false, + true, + true, + ':*' +); +print "*1*Result: " . DgS::printAr($result) . "
"; +$data = [ + 'parent1' => [ + 'name' => 'Parent1', + 'status' => 'ACTIVE', + 'children' => [ + 'child1' => [ + 'name' => 'Child1', + 'status' => 'active' + ] + ] + ] +]; + +$result = ArrayHandler::selectArrayFromOption( + $data, + 'status', + 'active', + false, // not strict + true, // case insensitive + true, // recursive + true, // flat result + '|' // custom separator +); +print "*2*Result: " . DgS::printAr($result) . "
"; + print ""; // __END__ diff --git a/www/admin/class_test.deprecated.helper.php b/www/admin/class_test.deprecated.helper.php index b629ff05..2eb1d83d 100644 --- a/www/admin/class_test.deprecated.helper.php +++ b/www/admin/class_test.deprecated.helper.php @@ -83,6 +83,9 @@ function mtParseCSV( 'UTF-8', $encoding ); + if ($string === false) { + return $lines; + } } if ($flag == 'INTERN') { // split with PHP function diff --git a/www/admin/class_test.json.php b/www/admin/class_test.json.php index 6c596280..21906015 100644 --- a/www/admin/class_test.json.php +++ b/www/admin/class_test.json.php @@ -67,6 +67,8 @@ print "J/S::E-JSON ERROR: " . $json_class::jsonGetLastError() . ": " . $json_cla $array = ['foo' => 'bar']; $output = Json::jsonConvertArrayTo($array); print "S::JSON: " . DgS::printAr($array) . " => " . $output . "
"; +$array = ['foo' => 'bar', 'sub' => ['other' => 'this', 'foo' => 'bar', 'set' => [12, 34, true]]]; +print "Pretty:
" . Json::jsonPrettyPrint($array) . "

"; print ""; diff --git a/www/admin/class_test.logging.php b/www/admin/class_test.logging.php index e1c71bfa..77a47426 100644 --- a/www/admin/class_test.logging.php +++ b/www/admin/class_test.logging.php @@ -82,6 +82,7 @@ $log->error('Cannot process data', ['error' => 'log']); $log->critical('Critical message', ['critical' => 'log']); $log->alert('Alert message', ['Alert' => 'log']); $log->emergency('Emergency message', ['Emergency' => 'log']); +error_log('TRIGGER ERROR LOG MANUAL: Emergency'); print "Log File: " . $log->getLogFile() . "
"; $log->setLogFlag(Flag::per_run); diff --git a/www/admin/class_test.randomkey.php b/www/admin/class_test.randomkey.php index 4416b63d..c0c531a3 100644 --- a/www/admin/class_test.randomkey.php +++ b/www/admin/class_test.randomkey.php @@ -38,13 +38,21 @@ $key_length = 10; $key_length_b = 5; $key_lenght_long = 64; print "S::RANDOMKEYGEN(auto): " . RandomKey::randomKeyGen() . "
"; -print "S::SETRANDOMKEYLENGTH($key_length): " . RandomKey::setRandomKeyLength($key_length) . "
"; -print "S::RANDOMKEYGEN($key_length): " . RandomKey::randomKeyGen() . "
"; +// print "S::SETRANDOMKEYLENGTH($key_length): " . RandomKey::setRandomKeyLength($key_length) . "
"; +print "S::RANDOMKEYGEN($key_length): " . RandomKey::randomKeyGen($key_length) . "
"; print "S::RANDOMKEYGEN($key_length_b): " . RandomKey::randomKeyGen($key_length_b) . "
"; -print "S::RANDOMKEYGEN($key_length): " . RandomKey::randomKeyGen() . "
"; +print "S::RANDOMKEYGEN($key_length): " . RandomKey::randomKeyGen($key_length) . "
"; print "S::RANDOMKEYGEN($key_lenght_long): " . RandomKey::randomKeyGen($key_lenght_long) . "
"; +print "S::RANDOMKEYGEN($key_lenght_long, list data): " + . RandomKey::randomKeyGen($key_lenght_long, ['A', 'B', 'C'], ['7', '8', '9']) . "
"; +print "S::RANDOMKEYGEN(auto): " . RandomKey::randomKeyGen() . "
"; +print "===
"; $_array = new CoreLibs\Create\RandomKey(); -print "C->RANDOMKEYGEN(auto): " . $_array->randomKeyGen() . "
"; +print "C->RANDOMKEYGEN(default): " . $_array->randomKeyGen() . "
"; +print "===
"; +// CHANGE key characters +$_array = new CoreLibs\Create\RandomKey(['A', 'F', 'B'], ['1', '5', '9']); +print "C->RANDOMKEYGEN(pre set): " . $_array->randomKeyGen() . "
"; print ""; diff --git a/www/admin/class_test.strings.php b/www/admin/class_test.strings.php index f1ffb689..95e4457a 100644 --- a/www/admin/class_test.strings.php +++ b/www/admin/class_test.strings.php @@ -14,6 +14,9 @@ require 'config.php'; $LOG_FILE_ID = 'classTest-string'; ob_end_flush(); +use CoreLibs\Convert\Strings; +use CoreLibs\Debug\Support as DgS; + $log = new CoreLibs\Logging\Logging([ 'log_folder' => BASE . LOG, 'log_file_id' => $LOG_FILE_ID, @@ -29,6 +32,7 @@ print '
Class Test Master
'; print '

' . $PAGE_NAME . '

'; $split = '4-4-4'; +$split_length = 4; $test_strings = [ '13', '1234', @@ -40,20 +44,59 @@ $test_strings = [ ]; foreach ($test_strings as $string) { - print "Convert: $string with $split to: " - . \CoreLibs\Convert\Strings::splitFormatString($string, $split) + print "A) Convert: $string with $split to: " + . Strings::splitFormatString($string, $split) . "
"; + try { + print "B) Convert: $string with $split_length to: " + . Strings::splitFormatStringFixed($string, $split_length) + . "
"; + } catch (Exception $e) { + print "Split not possible: " . $e->getMessage() . "
"; + } } $split = '2_2'; +$split_length = 2; $string = '1234'; -print "Convert: $string with $split to: " - . \CoreLibs\Convert\Strings::splitFormatString($string, $split) +print "A) Convert: $string with $split to: " + . Strings::splitFormatString($string, $split) + . "
"; +print "B) Convert: $string with $split_length to: " + . Strings::splitFormatStringFixed($string, $split_length, "_") . "
"; $split = '2-2'; $string = 'あいうえ'; -print "Convert: $string with $split to: " - . \CoreLibs\Convert\Strings::splitFormatString($string, $split) +try { + print "Convert: $string with $split to: " + . Strings::splitFormatString($string, $split) + . "
"; +} catch (\Exception $e) { + print "Cannot split string: " . $e->getMessage() . "
"; +} +print "B) Convert: $string with $split_length to: " + . Strings::splitFormatStringFixed($string, $split_length, "-") + . "
"; + +$string = 'ABCD12345568ABC13'; +$format = '2-4_5-2#4'; +$output = 'AB-CD12_34556-8A#BC13'; +print "A) Convert: $string with $format to: " + . Strings::splitFormatString($string, $format) + . "
"; + +// try other split calls +$string = "ABCDE"; +$split_length = 2; +$split_char = "-=-"; +print "Convert: $string with $split_length / $split_char to: " + . Strings::splitFormatStringFixed($string, $split_length, $split_char) + . "
"; +$string = "あいうえお"; +$split_length = 2; +$split_char = "-=-"; +print "Convert: $string with $split_length / $split_char to: " + . Strings::splitFormatStringFixed($string, $split_length, $split_char) . "
"; $test_splits = [ @@ -63,9 +106,40 @@ $test_splits = [ '2-3-4', ]; foreach ($test_splits as $split) { - print "$split with count: " . \CoreLibs\Convert\Strings::countSplitParts($split) . "
"; + print "$split with count: " . Strings::countSplitParts($split) . "
"; } +// check char list in list +$needle = "abc"; +$haystack = "abcdefg"; +print "Needle: " . $needle . ", Haysteck: " . $haystack . ": " + . DgS::prBl(Strings::allCharsInSet($needle, $haystack)) . "
"; +$needle = "abcz"; +print "Needle: " . $needle . ", Haysteck: " . $haystack . ": " + . DgS::prBl(Strings::allCharsInSet($needle, $haystack)) . "
"; + +print "Combined strings A: " + . Strings::buildCharStringFromLists(['A', 'B', 'C'], ['0', '1', '2']) . "
"; +print "Combined strings B: " + . Strings::buildCharStringFromLists([['F'], ['G'], 'H'], [['5', ['6']], ['0'], '1', '2']) . "
"; + +$input_string = "AaBbCc"; +print "Unique: " . Strings::removeDuplicates($input_string) . "
"; +print "Unique: " . Strings::removeDuplicates(strtolower($input_string)) . "
"; + +$regex_string = "/^[A-z]$/"; +print "Regex is: " . $regex_string . ": " . DgS::prBl(Strings::isValidRegex($regex_string)) . "
"; +$regex_string = "'//test{//'"; +print "Regex is: " . $regex_string . ": " . DgS::prBl(Strings::isValidRegex($regex_string)) . "
"; +print "Regex is: " . $regex_string . ": " . DgS::printAr(Strings::validateRegex($regex_string)) . "
"; +$regex_string = "/^[A-z"; +print "Regex is: " . $regex_string . ": " . DgS::prBl(Strings::isValidRegex($regex_string)) . "
"; +print "[A] LAST PREGE ERROR: " . preg_last_error() . " -> " + . (Strings::PREG_ERROR_MESSAGES[preg_last_error()] ?? '-') . "
"; +$preg_error = Strings::isValidRegex($regex_string); +print "[B] LAST PREGE ERROR: " . preg_last_error() . " -> " + . Strings::getLastRegexErrorString() . " -> " . preg_last_error_msg() . "
"; + print ""; // __END__