Merge pull request #563 from arabcoders/dev

Minor changes to how we log some data for better tracing
This commit is contained in:
Abdulmohsen
2024-11-08 00:00:45 +03:00
committed by GitHub
17 changed files with 1223 additions and 1179 deletions

4
FAQ.md
View File

@@ -436,6 +436,10 @@ $ docker exec -ti watchstate console system:env --list
| HTTP_PORT | string | Change the `HTTP` listen port. | `"8080"` | | HTTP_PORT | string | Change the `HTTP` listen port. | `"8080"` |
| FPM_PORT | string | Change the `PHP-FPM` listen port. | `"9000"` | | FPM_PORT | string | Change the `PHP-FPM` listen port. | `"9000"` |
> [!NOTE]
> You need to restart the container after changing these environment variables. those variables are not managed by the
> WatchState tool, they are managed by the container itself.
--- ---
### How to add webhooks? ### How to add webhooks?

184
composer.lock generated
View File

@@ -192,16 +192,16 @@
}, },
{ {
"name": "league/container", "name": "league/container",
"version": "4.2.2", "version": "4.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/container.git", "url": "https://github.com/thephpleague/container.git",
"reference": "ff346319ca1ff0e78277dc2311a42107cc1aab88" "reference": "72f9bebe7bd623007782a40f5ec305661ab706d8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/container/zipball/ff346319ca1ff0e78277dc2311a42107cc1aab88", "url": "https://api.github.com/repos/thephpleague/container/zipball/72f9bebe7bd623007782a40f5ec305661ab706d8",
"reference": "ff346319ca1ff0e78277dc2311a42107cc1aab88", "reference": "72f9bebe7bd623007782a40f5ec305661ab706d8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -262,7 +262,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/thephpleague/container/issues", "issues": "https://github.com/thephpleague/container/issues",
"source": "https://github.com/thephpleague/container/tree/4.2.2" "source": "https://github.com/thephpleague/container/tree/4.2.3"
}, },
"funding": [ "funding": [
{ {
@@ -270,7 +270,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-13T13:12:53+00:00" "time": "2024-10-23T12:06:58+00:00"
}, },
{ {
"name": "league/route", "name": "league/route",
@@ -1566,16 +1566,16 @@
}, },
{ {
"name": "symfony/cache", "name": "symfony/cache",
"version": "v6.4.12", "version": "v6.4.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/cache.git", "url": "https://github.com/symfony/cache.git",
"reference": "a463451b7f6ac4a47b98dbfc78ec2d3560c759d8" "reference": "36fb8aa88833708e9f29014b6f15fac051a8b613"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/a463451b7f6ac4a47b98dbfc78ec2d3560c759d8", "url": "https://api.github.com/repos/symfony/cache/zipball/36fb8aa88833708e9f29014b6f15fac051a8b613",
"reference": "a463451b7f6ac4a47b98dbfc78ec2d3560c759d8", "reference": "36fb8aa88833708e9f29014b6f15fac051a8b613",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1642,7 +1642,7 @@
"psr6" "psr6"
], ],
"support": { "support": {
"source": "https://github.com/symfony/cache/tree/v6.4.12" "source": "https://github.com/symfony/cache/tree/v6.4.14"
}, },
"funding": [ "funding": [
{ {
@@ -1658,7 +1658,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-16T16:01:33+00:00" "time": "2024-11-05T15:34:40+00:00"
}, },
{ {
"name": "symfony/cache-contracts", "name": "symfony/cache-contracts",
@@ -1738,16 +1738,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.4.12", "version": "v6.4.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", "url": "https://api.github.com/repos/symfony/console/zipball/897c2441ed4eec8a8a2c37b943427d24dba3f26b",
"reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1812,7 +1812,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.4.12" "source": "https://github.com/symfony/console/tree/v6.4.14"
}, },
"funding": [ "funding": [
{ {
@@ -1828,7 +1828,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-20T08:15:52+00:00" "time": "2024-11-05T15:34:40+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -1899,16 +1899,16 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v6.4.8", "version": "v6.4.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "8d7507f02b06e06815e56bb39aa0128e3806208b" "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e",
"reference": "8d7507f02b06e06815e56bb39aa0128e3806208b", "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1959,7 +1959,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8" "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13"
}, },
"funding": [ "funding": [
{ {
@@ -1975,7 +1975,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-05-31T14:49:08+00:00" "time": "2024-09-25T14:18:03+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@@ -2055,16 +2055,16 @@
}, },
{ {
"name": "symfony/http-client", "name": "symfony/http-client",
"version": "v6.4.12", "version": "v6.4.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-client.git", "url": "https://github.com/symfony/http-client.git",
"reference": "fbebfcce21084d3e91ea987ae5bdd8c71ff0fd56" "reference": "05d88cbd816ad6e0202edd9a9963cb9d615b8826"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/fbebfcce21084d3e91ea987ae5bdd8c71ff0fd56", "url": "https://api.github.com/repos/symfony/http-client/zipball/05d88cbd816ad6e0202edd9a9963cb9d615b8826",
"reference": "fbebfcce21084d3e91ea987ae5bdd8c71ff0fd56", "reference": "05d88cbd816ad6e0202edd9a9963cb9d615b8826",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2128,7 +2128,7 @@
"http" "http"
], ],
"support": { "support": {
"source": "https://github.com/symfony/http-client/tree/v6.4.12" "source": "https://github.com/symfony/http-client/tree/v6.4.14"
}, },
"funding": [ "funding": [
{ {
@@ -2144,7 +2144,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-20T08:21:33+00:00" "time": "2024-11-05T16:39:55+00:00"
}, },
{ {
"name": "symfony/http-client-contracts", "name": "symfony/http-client-contracts",
@@ -2226,16 +2226,16 @@
}, },
{ {
"name": "symfony/lock", "name": "symfony/lock",
"version": "v6.4.8", "version": "v6.4.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/lock.git", "url": "https://github.com/symfony/lock.git",
"reference": "1387f50285c23607467c1f05b258bde65f1ab276" "reference": "a69c3dd151ab7e14925f119164cfdf65d55392a4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/1387f50285c23607467c1f05b258bde65f1ab276", "url": "https://api.github.com/repos/symfony/lock/zipball/a69c3dd151ab7e14925f119164cfdf65d55392a4",
"reference": "1387f50285c23607467c1f05b258bde65f1ab276", "reference": "a69c3dd151ab7e14925f119164cfdf65d55392a4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2285,7 +2285,7 @@
"semaphore" "semaphore"
], ],
"support": { "support": {
"source": "https://github.com/symfony/lock/tree/v6.4.8" "source": "https://github.com/symfony/lock/tree/v6.4.13"
}, },
"funding": [ "funding": [
{ {
@@ -2301,20 +2301,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-05-31T14:49:08+00:00" "time": "2024-10-25T15:19:46+00:00"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v6.4.12", "version": "v6.4.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3" "reference": "25214adbb0996d18112548de20c281be9f27279f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/3f94e5f13ff58df371a7ead461b6e8068900fbb3", "url": "https://api.github.com/repos/symfony/process/zipball/25214adbb0996d18112548de20c281be9f27279f",
"reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3", "reference": "25214adbb0996d18112548de20c281be9f27279f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2346,7 +2346,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v6.4.12" "source": "https://github.com/symfony/process/tree/v6.4.14"
}, },
"funding": [ "funding": [
{ {
@@ -2362,7 +2362,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-17T12:47:12+00:00" "time": "2024-11-06T09:25:01+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@@ -2449,16 +2449,16 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v7.1.5", "version": "v7.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", "url": "https://api.github.com/repos/symfony/string/zipball/61b72d66bf96c360a727ae6232df5ac83c71f626",
"reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2516,7 +2516,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v7.1.5" "source": "https://github.com/symfony/string/tree/v7.1.6"
}, },
"funding": [ "funding": [
{ {
@@ -2532,20 +2532,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-20T08:28:38+00:00" "time": "2024-09-25T14:20:29+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v6.4.11", "version": "v6.4.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "ee14c8254a480913268b1e3b1cba8045ed122694" "reference": "93c09246038178717a9c14b809ea8151ffcf7091"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/ee14c8254a480913268b1e3b1cba8045ed122694", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/93c09246038178717a9c14b809ea8151ffcf7091",
"reference": "ee14c8254a480913268b1e3b1cba8045ed122694", "reference": "93c09246038178717a9c14b809ea8151ffcf7091",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2601,7 +2601,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v6.4.11" "source": "https://github.com/symfony/var-dumper/tree/v6.4.14"
}, },
"funding": [ "funding": [
{ {
@@ -2617,20 +2617,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-08-30T16:03:21+00:00" "time": "2024-11-05T15:34:40+00:00"
}, },
{ {
"name": "symfony/var-exporter", "name": "symfony/var-exporter",
"version": "v7.1.2", "version": "v7.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-exporter.git", "url": "https://github.com/symfony/var-exporter.git",
"reference": "b80a669a2264609f07f1667f891dbfca25eba44c" "reference": "90173ef89c40e7c8c616653241048705f84130ef"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c", "url": "https://api.github.com/repos/symfony/var-exporter/zipball/90173ef89c40e7c8c616653241048705f84130ef",
"reference": "b80a669a2264609f07f1667f891dbfca25eba44c", "reference": "90173ef89c40e7c8c616653241048705f84130ef",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2677,7 +2677,7 @@
"serialize" "serialize"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-exporter/tree/v7.1.2" "source": "https://github.com/symfony/var-exporter/tree/v7.1.6"
}, },
"funding": [ "funding": [
{ {
@@ -2693,20 +2693,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-06-28T08:00:31+00:00" "time": "2024-09-25T14:20:29+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v6.4.12", "version": "v6.4.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "762ee56b2649659380e0ef4d592d807bc17b7971" "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/762ee56b2649659380e0ef4d592d807bc17b7971", "url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
"reference": "762ee56b2649659380e0ef4d592d807bc17b7971", "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2749,7 +2749,7 @@
"description": "Loads and dumps YAML files", "description": "Loads and dumps YAML files",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/yaml/tree/v6.4.12" "source": "https://github.com/symfony/yaml/tree/v6.4.13"
}, },
"funding": [ "funding": [
{ {
@@ -2765,7 +2765,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-17T12:47:12+00:00" "time": "2024-09-25T14:18:03+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
@@ -3565,20 +3565,20 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git", "url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "c3c55a0f6643119fa8699577cc83ca6256d98ab5" "reference": "54f5b5d225a5c90b86985bb4c563e9b284364687"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/c3c55a0f6643119fa8699577cc83ca6256d98ab5", "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/54f5b5d225a5c90b86985bb4c563e9b284364687",
"reference": "c3c55a0f6643119fa8699577cc83ca6256d98ab5", "reference": "54f5b5d225a5c90b86985bb4c563e9b284364687",
"shasum": "" "shasum": ""
}, },
"conflict": { "conflict": {
"3f/pygmentize": "<1.2", "3f/pygmentize": "<1.2",
"admidio/admidio": "<4.3.10", "admidio/admidio": "<4.3.12",
"adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3",
"aheinze/cockpit": "<2.2", "aheinze/cockpit": "<2.2",
"aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.04.6", "aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.07.2",
"aimeos/ai-admin-jsonadm": "<2020.10.13|>=2021.04.1,<2021.10.6|>=2022.04.1,<2022.10.3|>=2023.04.1,<2023.10.4|==2024.04.1", "aimeos/ai-admin-jsonadm": "<2020.10.13|>=2021.04.1,<2021.10.6|>=2022.04.1,<2022.10.3|>=2023.04.1,<2023.10.4|==2024.04.1",
"aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.22|>=2022.04.1,<2022.10.13|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.04.7", "aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.22|>=2022.04.1,<2022.10.13|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.04.7",
"aimeos/ai-controller-frontend": "<2020.10.15|>=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.8|>=2023.04.1,<2023.10.9|==2024.04.1", "aimeos/ai-controller-frontend": "<2020.10.15|>=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.8|>=2023.04.1,<2023.10.9|==2024.04.1",
@@ -3590,6 +3590,7 @@
"alextselegidis/easyappointments": "<1.5", "alextselegidis/easyappointments": "<1.5",
"alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1",
"amazing/media2click": ">=1,<1.3.3", "amazing/media2click": ">=1,<1.3.3",
"ameos/ameos_tarteaucitron": "<1.2.23",
"amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/artax": "<1.0.6|>=2,<2.0.6",
"amphp/http": "<=1.7.2|>=2,<=2.1", "amphp/http": "<=1.7.2|>=2,<=2.1",
"amphp/http-client": ">=4,<4.4", "amphp/http-client": ">=4,<4.4",
@@ -3622,7 +3623,7 @@
"barrelstrength/sprout-forms": "<3.9", "barrelstrength/sprout-forms": "<3.9",
"barryvdh/laravel-translation-manager": "<0.6.2", "barryvdh/laravel-translation-manager": "<0.6.2",
"barzahlen/barzahlen-php": "<2.0.1", "barzahlen/barzahlen-php": "<2.0.1",
"baserproject/basercms": "<5.0.9", "baserproject/basercms": "<=5.1.1",
"bassjobsen/bootstrap-3-typeahead": ">4.0.2", "bassjobsen/bootstrap-3-typeahead": ">4.0.2",
"bbpress/bbpress": "<2.6.5", "bbpress/bbpress": "<2.6.5",
"bcosca/fatfree": "<3.7.2", "bcosca/fatfree": "<3.7.2",
@@ -3747,7 +3748,7 @@
"ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.03.5.1", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.03.5.1",
"ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
"ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15", "ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15",
"ezyang/htmlpurifier": "<4.1.1", "ezyang/htmlpurifier": "<=4.2",
"facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2",
"facturascripts/facturascripts": "<=2022.08", "facturascripts/facturascripts": "<=2022.08",
"fastly/magento2": "<1.2.26", "fastly/magento2": "<1.2.26",
@@ -3790,7 +3791,7 @@
"froxlor/froxlor": "<=2.2.0.0-RC3", "froxlor/froxlor": "<=2.2.0.0-RC3",
"frozennode/administrator": "<=5.0.12", "frozennode/administrator": "<=5.0.12",
"fuel/core": "<1.8.1", "fuel/core": "<1.8.1",
"funadmin/funadmin": "<=3.2|>=3.3.2,<=3.3.3", "funadmin/funadmin": "<=5.0.2",
"gaoming13/wechat-php-sdk": "<=1.10.2", "gaoming13/wechat-php-sdk": "<=1.10.2",
"genix/cms": "<=1.1.11", "genix/cms": "<=1.1.11",
"getformwork/formwork": "<1.13.1|==2.0.0.0-beta1", "getformwork/formwork": "<1.13.1|==2.0.0.0-beta1",
@@ -3889,6 +3890,7 @@
"laravel/fortify": "<1.11.1", "laravel/fortify": "<1.11.1",
"laravel/framework": "<6.20.44|>=7,<7.30.6|>=8,<8.75", "laravel/framework": "<6.20.44|>=7,<7.30.6|>=8,<8.75",
"laravel/laravel": ">=5.4,<5.4.22", "laravel/laravel": ">=5.4,<5.4.22",
"laravel/reverb": "<1.4",
"laravel/socialite": ">=1,<2.0.10", "laravel/socialite": ">=1,<2.0.10",
"latte/latte": "<2.10.8", "latte/latte": "<2.10.8",
"lavalite/cms": "<=9|==10.1", "lavalite/cms": "<=9|==10.1",
@@ -3907,6 +3909,7 @@
"lms/routes": "<2.1.1", "lms/routes": "<2.1.1",
"localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2",
"luyadev/yii-helpers": "<1.2.1", "luyadev/yii-helpers": "<1.2.1",
"maestroerror/php-heic-to-jpg": "<1.0.5",
"magento/community-edition": "<2.4.5|==2.4.5|>=2.4.5.0-patch1,<2.4.5.0-patch10|==2.4.6|>=2.4.6.0-patch1,<2.4.6.0-patch8|>=2.4.7.0-beta1,<2.4.7.0-patch3", "magento/community-edition": "<2.4.5|==2.4.5|>=2.4.5.0-patch1,<2.4.5.0-patch10|==2.4.6|>=2.4.6.0-patch1,<2.4.6.0-patch8|>=2.4.7.0-beta1,<2.4.7.0-patch3",
"magento/core": "<=1.9.4.5", "magento/core": "<=1.9.4.5",
"magento/magento1ce": "<1.9.4.3-dev", "magento/magento1ce": "<1.9.4.3-dev",
@@ -3920,9 +3923,10 @@
"matyhtf/framework": "<3.0.6", "matyhtf/framework": "<3.0.6",
"mautic/core": "<4.4.13|>=5,<5.1.1", "mautic/core": "<4.4.13|>=5,<5.1.1",
"mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1",
"maximebf/debugbar": "<1.19",
"mdanter/ecc": "<2", "mdanter/ecc": "<2",
"mediawiki/cargo": "<3.6.1", "mediawiki/cargo": "<3.6.1",
"mediawiki/core": "<1.36.2", "mediawiki/core": "<1.39.5|==1.40",
"mediawiki/matomo": "<2.4.3", "mediawiki/matomo": "<2.4.3",
"mediawiki/semantic-media-wiki": "<4.0.2", "mediawiki/semantic-media-wiki": "<4.0.2",
"melisplatform/melis-asset-manager": "<5.0.1", "melisplatform/melis-asset-manager": "<5.0.1",
@@ -4021,7 +4025,7 @@
"phenx/php-svg-lib": "<0.5.2", "phenx/php-svg-lib": "<0.5.2",
"php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5", "php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5",
"php-mod/curl": "<2.3.2", "php-mod/curl": "<2.3.2",
"phpbb/phpbb": "<3.2.10|>=3.3,<3.3.1", "phpbb/phpbb": "<3.3.11",
"phpems/phpems": ">=6,<=6.1.3", "phpems/phpems": ">=6,<=6.1.3",
"phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7",
"phpmailer/phpmailer": "<6.5", "phpmailer/phpmailer": "<6.5",
@@ -4029,7 +4033,7 @@
"phpmyadmin/phpmyadmin": "<5.2.1", "phpmyadmin/phpmyadmin": "<5.2.1",
"phpmyfaq/phpmyfaq": "<3.2.5|==3.2.5", "phpmyfaq/phpmyfaq": "<3.2.5|==3.2.5",
"phpoffice/common": "<0.2.9", "phpoffice/common": "<0.2.9",
"phpoffice/phpexcel": "<1.8", "phpoffice/phpexcel": "<1.8.1",
"phpoffice/phpspreadsheet": "<1.29.2|>=2,<2.1.1|>=2.2,<2.3", "phpoffice/phpspreadsheet": "<1.29.2|>=2,<2.1.1|>=2.2,<2.3",
"phpseclib/phpseclib": "<2.0.47|>=3,<3.0.36", "phpseclib/phpseclib": "<2.0.47|>=3,<3.0.36",
"phpservermon/phpservermon": "<3.6", "phpservermon/phpservermon": "<3.6",
@@ -4067,7 +4071,7 @@
"processwire/processwire": "<=3.0.229", "processwire/processwire": "<=3.0.229",
"propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7",
"propel/propel1": ">=1,<=1.7.1", "propel/propel1": ">=1,<=1.7.1",
"pterodactyl/panel": "<1.11.6", "pterodactyl/panel": "<1.11.8",
"ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2", "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2",
"ptrofimov/beanstalk_console": "<1.7.14", "ptrofimov/beanstalk_console": "<1.7.14",
"pubnub/pubnub": "<6.1", "pubnub/pubnub": "<6.1",
@@ -4084,7 +4088,7 @@
"rap2hpoutre/laravel-log-viewer": "<0.13", "rap2hpoutre/laravel-log-viewer": "<0.13",
"react/http": ">=0.7,<1.9", "react/http": ">=0.7,<1.9",
"really-simple-plugins/complianz-gdpr": "<6.4.2", "really-simple-plugins/complianz-gdpr": "<6.4.2",
"redaxo/source": "<=5.15.1", "redaxo/source": "<=5.17.1",
"remdex/livehelperchat": "<4.29", "remdex/livehelperchat": "<4.29",
"reportico-web/reportico": "<=8.1", "reportico-web/reportico": "<=8.1",
"rhukster/dom-sanitizer": "<1.0.7", "rhukster/dom-sanitizer": "<1.0.7",
@@ -4158,7 +4162,7 @@
"subhh/libconnect": "<7.0.8|>=8,<8.1", "subhh/libconnect": "<7.0.8|>=8,<8.1",
"sukohi/surpass": "<1", "sukohi/surpass": "<1",
"sulu/form-bundle": ">=2,<2.5.3", "sulu/form-bundle": ">=2,<2.5.3",
"sulu/sulu": "<1.6.44|>=2,<2.6.5", "sulu/sulu": "<1.6.44|>=2,<2.5.21|>=2.6,<2.6.5",
"sumocoders/framework-user-bundle": "<1.4", "sumocoders/framework-user-bundle": "<1.4",
"superbig/craft-audit": "<3.0.2", "superbig/craft-audit": "<3.0.2",
"swag/paypal": "<5.4.4", "swag/paypal": "<5.4.4",
@@ -4180,7 +4184,8 @@
"symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4",
"symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
"symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<5.3.15|>=5.4.3,<5.4.4|>=6.0.3,<6.0.4", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<5.3.15|>=5.4.3,<5.4.4|>=6.0.3,<6.0.4",
"symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", "symfony/http-client": ">=4.3,<5.4.46|>=6,<6.4.14|>=7,<7.1.7",
"symfony/http-foundation": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7",
"symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
"symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
"symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1",
@@ -4188,20 +4193,22 @@
"symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/polyfill": ">=1,<1.10", "symfony/polyfill": ">=1,<1.10",
"symfony/polyfill-php55": ">=1,<1.10", "symfony/polyfill-php55": ">=1,<1.10",
"symfony/process": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7",
"symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/routing": ">=2,<2.0.19", "symfony/routing": ">=2,<2.0.19",
"symfony/runtime": ">=5.3,<5.4.46|>=6,<6.4.14|>=7,<7.1.7",
"symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8",
"symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.4.10|>=7,<7.0.10|>=7.1,<7.1.3",
"symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9",
"symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
"symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8",
"symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2|>=5.4,<5.4.31|>=6,<6.3.8", "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2|>=5.4,<5.4.31|>=6,<6.3.8",
"symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12",
"symfony/symfony": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8", "symfony/symfony": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7",
"symfony/translation": ">=2,<2.0.17", "symfony/translation": ">=2,<2.0.17",
"symfony/twig-bridge": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8", "symfony/twig-bridge": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8",
"symfony/ux-autocomplete": "<2.11.2", "symfony/ux-autocomplete": "<2.11.2",
"symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/validator": "<5.4.43|>=6,<6.4.11|>=7,<7.1.4",
"symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
"symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
"symfony/webhook": ">=6.3,<6.3.8", "symfony/webhook": ">=6.3,<6.3.8",
@@ -4227,14 +4234,14 @@
"tobiasbg/tablepress": "<=2.0.0.0-RC1", "tobiasbg/tablepress": "<=2.0.0.0-RC1",
"topthink/framework": "<6.0.17|>=6.1,<=8.0.4", "topthink/framework": "<6.0.17|>=6.1,<=8.0.4",
"topthink/think": "<=6.1.1", "topthink/think": "<=6.1.1",
"topthink/thinkphp": "<=3.2.3", "topthink/thinkphp": "<=3.2.3|>=6.1.3,<=8.0.4",
"torrentpier/torrentpier": "<=2.4.3", "torrentpier/torrentpier": "<=2.4.3",
"tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2",
"tribalsystems/zenario": "<=9.7.61188", "tribalsystems/zenario": "<=9.7.61188",
"truckersmp/phpwhois": "<=4.3.1", "truckersmp/phpwhois": "<=4.3.1",
"ttskch/pagination-service-provider": "<1", "ttskch/pagination-service-provider": "<1",
"twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2", "twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2",
"twig/twig": "<1.44.8|>=2,<2.16.1|>=3,<3.11.1|>=3.12,<3.14", "twig/twig": "<3.11.2|>=3.12,<3.14.1",
"typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2",
"typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<10.4.46|>=11,<11.5.40|>=12,<12.4.21|>=13,<13.3.1", "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<10.4.46|>=11,<11.5.40|>=12,<12.4.21|>=13,<13.3.1",
"typo3/cms-core": "<=8.7.56|>=9,<=9.5.47|>=10,<=10.4.44|>=11,<=11.5.36|>=12,<=12.4.14|>=13,<=13.1", "typo3/cms-core": "<=8.7.56|>=9,<=9.5.47|>=10,<=10.4.44|>=11,<=11.5.36|>=12,<=12.4.14|>=13,<=13.1",
@@ -4253,6 +4260,7 @@
"ua-parser/uap-php": "<3.8", "ua-parser/uap-php": "<3.8",
"uasoft-indonesia/badaso": "<=2.9.7", "uasoft-indonesia/badaso": "<=2.9.7",
"unisharp/laravel-filemanager": "<2.6.4", "unisharp/laravel-filemanager": "<2.6.4",
"unopim/unopim": "<0.1.4",
"userfrosting/userfrosting": ">=0.3.1,<4.6.3", "userfrosting/userfrosting": ">=0.3.1,<4.6.3",
"usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
"uvdesk/community-skeleton": "<=1.1.1", "uvdesk/community-skeleton": "<=1.1.1",
@@ -4298,7 +4306,7 @@
"xataface/xataface": "<3", "xataface/xataface": "<3",
"xpressengine/xpressengine": "<3.0.15", "xpressengine/xpressengine": "<3.0.15",
"yab/quarx": "<2.4.5", "yab/quarx": "<2.4.5",
"yeswiki/yeswiki": "<4.1", "yeswiki/yeswiki": "<=4.4.4",
"yetiforce/yetiforce-crm": "<=6.4", "yetiforce/yetiforce-crm": "<=6.4",
"yidashi/yii2cmf": "<=2", "yidashi/yii2cmf": "<=2",
"yii2mod/yii2-cms": "<1.9.2", "yii2mod/yii2-cms": "<1.9.2",
@@ -4389,7 +4397,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-10-11T18:06:00+00:00" "time": "2024-11-07T09:04:54+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,6 @@ use Psr\Http\Message\ResponseInterface as iResponse;
use Psr\Http\Message\ServerRequestInterface as iRequest; use Psr\Http\Message\ServerRequestInterface as iRequest;
use Psr\Log\LoggerInterface as iLogger; use Psr\Log\LoggerInterface as iLogger;
use Psr\SimpleCache\CacheInterface as iCache; use Psr\SimpleCache\CacheInterface as iCache;
use Psr\SimpleCache\InvalidArgumentException;
final class Webhooks final class Webhooks
{ {
@@ -55,7 +54,6 @@ final class Webhooks
* @param array $args The request path arguments. * @param array $args The request path arguments.
* *
* @return iResponse The response object. * @return iResponse The response object.
* @throws InvalidArgumentException if cache key is invalid.
*/ */
#[Route(['POST', 'PUT'], Index::URL . '/{name:backend}/webhook[/]', name: 'backend.webhook')] #[Route(['POST', 'PUT'], Index::URL . '/{name:backend}/webhook[/]', name: 'backend.webhook')]
public function __invoke(iRequest $request, array $args = []): iResponse public function __invoke(iRequest $request, array $args = []): iResponse
@@ -74,7 +72,6 @@ final class Webhooks
* @param iRequest $request The incoming request object. * @param iRequest $request The incoming request object.
* *
* @return iResponse The response object. * @return iResponse The response object.
* @throws InvalidArgumentException if cache key is invalid.
*/ */
private function process(string $name, iRequest $request): iResponse private function process(string $name, iRequest $request): iResponse
{ {
@@ -202,14 +199,23 @@ final class Webhooks
'unique' => true, 'unique' => true,
EventsTable::COLUMN_REFERENCE => $itemId, EventsTable::COLUMN_REFERENCE => $itemId,
EventsTable::COLUMN_OPTIONS => [ EventsTable::COLUMN_OPTIONS => [
'tainted' => $entity->isTainted(),
Options::IMPORT_METADATA_ONLY => $metadataOnly, Options::IMPORT_METADATA_ONLY => $metadataOnly,
] Options::REQUEST_ID => ag($request->getServerParams(), 'X_REQUEST_ID'),
],
]); ]);
$this->write($request, Level::Info, 'Queued [{backend}: {event}] {item.type} [{item.title}].', [ $this->write(
$request,
Level::Info,
"Queued {tainted} request '{backend}: {event}' {item.type} '{item.title}' - 'state: {state}, progress: {has_progress}'. request_id '{req}'.",
[
'backend' => $entity->via, 'backend' => $entity->via,
'event' => ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT), 'event' => ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT),
'has_progress' => $entity->hasPlayProgress() ? 'Yes' : 'No', 'has_progress' => $entity->hasPlayProgress() ? 'Yes' : 'No',
'req' => ag($request->getServerParams(), 'X_REQUEST_ID', '-'),
'state' => $entity->isWatched() ? 'played' : 'unplayed',
'tainted' => $entity->isTainted() ? 'tainted' : 'untainted',
'item' => [ 'item' => [
'title' => $entity->getName(), 'title' => $entity->getName(),
'type' => $entity->type, 'type' => $entity->type,

View File

@@ -20,7 +20,8 @@ final class Index
public const array BLACK_LIST = [ public const array BLACK_LIST = [
'token', 'token',
'webhook.token', 'webhook.token',
'options.' . Options::ADMIN_TOKEN 'options.' . Options::ADMIN_TOKEN,
'options.' . Options::PLEX_USER_PIN,
]; ];
#[Get(self::URL . '[/]', name: 'backends')] #[Get(self::URL . '[/]', name: 'backends')]

View File

@@ -6,7 +6,9 @@ namespace App\Commands\Events;
use App\Command; use App\Command;
use App\Libs\Attributes\Route\Cli; use App\Libs\Attributes\Route\Cli;
use App\Libs\Config;
use App\Libs\Events\DataEvent; use App\Libs\Events\DataEvent;
use App\Libs\Options;
use App\Model\Events\Event; use App\Model\Events\Event;
use App\Model\Events\EventsRepository; use App\Model\Events\EventsRepository;
use App\Model\Events\EventsTable; use App\Model\Events\EventsTable;
@@ -50,8 +52,9 @@ final class DispatchCommand extends Command
registerEvents(); registerEvents();
$id = $input->getOption('id'); $debug = $input->getOption('debug') || Config::get('debug.enabled');
if (null !== $id) {
if (null !== ($id = $input->getOption('id'))) {
if (null === ($event = $this->repo->findById($id))) { if (null === ($event = $this->repo->findById($id))) {
$this->logger->error(r("Event with id '{id}' not found.", ['id' => $id])); $this->logger->error(r("Event with id '{id}' not found.", ['id' => $id]));
return self::FAILURE; return self::FAILURE;
@@ -61,15 +64,15 @@ final class DispatchCommand extends Command
$event->logs = []; $event->logs = [];
} }
$this->runEvent($event); $this->runEvent($event, debug: $debug);
return self::SUCCESS; return self::SUCCESS;
} }
return $this->runEvents(); return $this->runEvents(debug: $debug);
} }
protected function runEvents(): int protected function runEvents(bool $debug = false): int
{ {
$events = $this->repo->findAll([EventsTable::COLUMN_STATUS => Status::PENDING->value]); $events = $this->repo->findAll([EventsTable::COLUMN_STATUS => Status::PENDING->value]);
if (count($events) < 1) { if (count($events) < 1) {
@@ -104,7 +107,7 @@ final class DispatchCommand extends Command
return self::SUCCESS; return self::SUCCESS;
} }
private function runEvent(Event $event): void private function runEvent(Event $event, bool $debug = false): void
{ {
try { try {
$message = "Dispatching Event: '{event}' queued at '{date}'."; $message = "Dispatching Event: '{event}' queued at '{date}'.";
@@ -124,6 +127,9 @@ final class DispatchCommand extends Command
$event->status = Status::RUNNING; $event->status = Status::RUNNING;
$event->updated_at = (string)makeDate(); $event->updated_at = (string)makeDate();
$event->attempts += 1; $event->attempts += 1;
if (true === $debug) {
$event->options[Options::DEBUG_TRACE] = true;
}
$this->repo->save($event); $this->repo->save($event);
$ref = new DataEvent($event); $ref = new DataEvent($event);

View File

@@ -80,6 +80,14 @@ final class DirectMapper implements iImport
{ {
} }
/**
* @inheritdoc
*/
public function getOptions(array $options = []): array
{
return $this->options;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */
@@ -90,6 +98,16 @@ final class DirectMapper implements iImport
return $this; return $this;
} }
/**
* @inheritdoc
*/
public function withOptions(array $options = []): iImport
{
$instance = clone $this;
$instance->options = $options;
return $instance;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */

View File

@@ -70,6 +70,14 @@ final class MemoryMapper implements iImport
{ {
} }
/**
* @inheritdoc
*/
public function getOptions(array $options = []): array
{
return $this->options;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */
@@ -80,6 +88,16 @@ final class MemoryMapper implements iImport
return $this; return $this;
} }
/**
* @inheritdoc
*/
public function withOptions(array $options = []): iImport
{
$instance = clone $this;
$instance->options = $options;
return $instance;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */

View File

@@ -52,6 +52,14 @@ final class RestoreMapper implements iImport
{ {
} }
/**
* @inheritdoc
*/
public function getOptions(array $options = []): array
{
return $this->options;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */
@@ -62,6 +70,16 @@ final class RestoreMapper implements iImport
return $this; return $this;
} }
/**
* @inheritdoc
*/
public function withOptions(array $options = []): iImport
{
$instance = clone $this;
$instance->options = $options;
return $instance;
}
/** /**
* @inheritdoc * @inheritdoc
* @throws \JsonMachine\Exception\InvalidArgumentException If unexpected things happen while loading the JSON file. * @throws \JsonMachine\Exception\InvalidArgumentException If unexpected things happen while loading the JSON file.

View File

@@ -12,6 +12,12 @@ use Psr\Log\LoggerInterface;
interface ImportInterface extends Countable interface ImportInterface extends Countable
{ {
/**
* Get current options for the object.
* @return array
*/
public function getOptions(): array;
/** /**
* Set options for the current object. * Set options for the current object.
* *
@@ -21,6 +27,15 @@ interface ImportInterface extends Countable
*/ */
public function setOptions(array $options = []): self; public function setOptions(array $options = []): self;
/**
* Set options and return a new instance of the object.
*
* @param array $options An associative array of options to be set.
*
* @return self
*/
public function withOptions(array $options = []): self;
/** /**
* Preload data from database into the mapper. * Preload data from database into the mapper.
* *

View File

@@ -39,6 +39,7 @@ final class Options
public const string NO_CHECK = 'NO_CHECK'; public const string NO_CHECK = 'NO_CHECK';
public const string LOG_WRITER = 'LOG_WRITER'; public const string LOG_WRITER = 'LOG_WRITER';
public const string PLEX_USER_PIN = 'PLEX_USER_PIN'; public const string PLEX_USER_PIN = 'PLEX_USER_PIN';
public const string REQUEST_ID = 'REQUEST_ID';
private function __construct() private function __construct()
{ {

View File

@@ -111,15 +111,15 @@ final readonly class ProcessProgressEvent
try { try {
$opts = ag($backend, 'options', []); $opts = ag($backend, 'options', []);
if (ag($options, 'ignore-date')) { if (ag($options, Options::IGNORE_DATE)) {
$opts[Options::IGNORE_DATE] = true; $opts[Options::IGNORE_DATE] = true;
} }
if (ag($options, 'dry-run')) { if (ag($options, Options::DRY_RUN)) {
$opts[Options::DRY_RUN] = true; $opts[Options::DRY_RUN] = true;
} }
if (ag($options, 'trace')) { if (ag($options, Options::DEBUG_TRACE)) {
$opts[Options::DEBUG_TRACE] = true; $opts[Options::DEBUG_TRACE] = true;
} }

View File

@@ -96,15 +96,15 @@ final readonly class ProcessPushEvent
try { try {
$opts = ag($backend, 'options', []); $opts = ag($backend, 'options', []);
if (ag($options, 'ignore-date')) { if (ag($options, Options::IGNORE_DATE)) {
$opts[Options::IGNORE_DATE] = true; $opts[Options::IGNORE_DATE] = true;
} }
if (ag($options, 'dry-run')) { if (ag($options, Options::DRY_RUN)) {
$opts[Options::DRY_RUN] = true; $opts[Options::DRY_RUN] = true;
} }
if (ag($options, 'trace')) { if (ag($options, Options::DEBUG_TRACE)) {
$opts[Options::DEBUG_TRACE] = true; $opts[Options::DEBUG_TRACE] = true;
} }

View File

@@ -35,44 +35,52 @@ final readonly class ProcessRequestEvent
{ {
$e->stopPropagation(); $e->stopPropagation();
$entity = Container::get(iState::class)::fromArray($e->getData()); $entity = Container::get(iState::class)::fromArray($e->getData())
->setIsTainted((bool)ag($e->getOptions(), 'tainted', false));
if (null !== ($lastSync = ag(Config::get("servers.{$entity->via}", []), 'import.lastSync'))) { if (null !== ($lastSync = ag(Config::get("servers.{$entity->via}", []), 'import.lastSync'))) {
$lastSync = makeDate($lastSync); $lastSync = makeDate($lastSync);
} }
$message = r("Processing '{backend}: {title}' {tainted} request.", [ $message = r(
"Processing {tainted} request '{backend}: {event}' {title} - 'state: {played}, progress: {has_progress}'. request_id '{req}'.",
[
'backend' => $entity->via, 'backend' => $entity->via,
'req' => ag($e->getOptions(), Options::REQUEST_ID, '-'),
'played' => $entity->isWatched() ? 'played' : 'unplayed',
'title' => $entity->getName(), 'title' => $entity->getName(),
'event' => ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT, '??'), 'event' => ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT, '??'),
'tainted' => $entity->isTainted() ? 'tainted' : 'untainted', 'tainted' => $entity->isTainted() ? 'tainted' : 'untainted',
'has_progress' => $entity->hasPlayProgress() ? 'Yes' : 'No',
'lastSync' => $lastSync, 'lastSync' => $lastSync,
]); ]
);
$e->addLog($message); $e->addLog($message);
$this->logger->notice($message); $this->logger->notice($message);
if (ag($e->getOptions(), Options::DEBUG_TRACE)) {
$mapper = $this->mapper->withOptions(ag_set($this->mapper->getOptions(), Options::DEBUG_TRACE, true));
} else {
$mapper = $this->mapper;
}
$logger = clone $this->logger; $logger = clone $this->logger;
assert($logger instanceof Logger); assert($logger instanceof Logger);
$handler = ProxyHandler::create($e->addLog(...)); $handler = ProxyHandler::create($e->addLog(...));
$logger->pushHandler($handler); $logger->pushHandler($handler);
$mapper->setLogger($logger);
$oldLogger = $this->mapper->getLogger();
$this->mapper->setLogger($logger);
$metadataOnly = (bool)ag($e->getOptions(), Options::IMPORT_METADATA_ONLY); $metadataOnly = (bool)ag($e->getOptions(), Options::IMPORT_METADATA_ONLY);
$this->mapper->add($entity, [ $mapper->add($entity, [
Options::IMPORT_METADATA_ONLY => $metadataOnly, Options::IMPORT_METADATA_ONLY => $metadataOnly,
Options::STATE_UPDATE_EVENT => fn(iState $state) => queuePush($state), Options::STATE_UPDATE_EVENT => fn(iState $state) => queuePush($state),
'after' => $lastSync, 'after' => $lastSync,
]); ]);
$this->mapper->commit(); $mapper->commit();
$this->mapper->setLogger($oldLogger);
$handler->close(); $handler->close();
return $e; return $e;
} }
} }

View File

@@ -10,7 +10,7 @@ use App\Libs\Mappers\ImportInterface;
use Symfony\Component\Cache\Adapter\NullAdapter; use Symfony\Component\Cache\Adapter\NullAdapter;
use Symfony\Component\Cache\Psr16Cache; use Symfony\Component\Cache\Psr16Cache;
class DirectMapperTest extends AbstractTestsMapper class DirectMapperTest extends MapperAbstract
{ {
protected function setupMapper(): ImportInterface protected function setupMapper(): ImportInterface
{ {

View File

@@ -25,7 +25,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
abstract class AbstractTestsMapper extends TestCase abstract class MapperAbstract extends TestCase
{ {
protected array $testMovie = []; protected array $testMovie = [];
protected array $testEpisode = []; protected array $testEpisode = [];
@@ -569,4 +569,49 @@ abstract class AbstractTestsMapper extends TestCase
"getObjectsCount() should return 0 as as the episode number is 0 and shouldn't be processed." "getObjectsCount() should return 0 as as the episode number is 0 and shouldn't be processed."
); );
} }
public function test_mapper_setOptions()
{
$mapper = clone $this->mapper;
$mapper->setOptions([]);
$this->assertEmpty(
$mapper->getOptions(),
'getOptions() should return an empty array as we have not set any options yet.'
);
$mapper->setOptions(['test' => 'test']);
$this->assertSame(['test' => 'test'],
$mapper->getOptions(),
'getOptions() should return the options we have set.');
}
public function test_mapper_withOptions()
{
$mapper = clone $this->mapper;
$mapper->setOptions([]);
$this->assertNotSame(
spl_object_hash($mapper),
spl_object_hash($mapper->withOptions(['test' => 'test'])),
'withOptions() Any mutation should return a new object. and the spl_object_hash() should not be the same.'
);
$this->assertNotSame(
spl_object_id($mapper),
spl_object_hash($mapper->withOptions(['test' => 'test'])),
'withOptions() Any mutation should return a new object. and the spl_object_id() should not be the same.'
);
$this->assertEmpty(
$mapper->getOptions(),
'getOptions() should return an empty array as we have not set any options yet.'
);
$mapper = $mapper->withOptions(['test' => 'test']);
$this->assertSame(['test' => 'test'],
$mapper->getOptions(),
'getOptions() should return the options we have set.');
}
} }

View File

@@ -10,7 +10,7 @@ use App\Libs\Mappers\ImportInterface;
use Symfony\Component\Cache\Adapter\NullAdapter; use Symfony\Component\Cache\Adapter\NullAdapter;
use Symfony\Component\Cache\Psr16Cache; use Symfony\Component\Cache\Psr16Cache;
class MemoryMapperTest extends AbstractTestsMapper class MemoryMapperTest extends MapperAbstract
{ {
protected function setupMapper(): ImportInterface protected function setupMapper(): ImportInterface
{ {