From 8554cf714d1a0bdd42680d53d4f1f026db0d43ba Mon Sep 17 00:00:00 2001
From: Marko <52066939+HeX87@users.noreply.github.com>
Date: Fri, 10 Nov 2023 16:54:07 +0100
Subject: [PATCH] add authentication
---
.drone.yml | 5 +-
.idea/dataSources.xml | 4 +-
composer.lock | 458 +++++++++---------
config/services.yaml | 3 -
migrations/Version20231110153931.php | 33 ++
.../apiplatform/fonts/open-sans/400.css | 38 +-
.../apiplatform/fonts/open-sans/700.css | 38 +-
src/Command/HiltesExportCommand.php | 245 +++++-----
src/Command/HiltesImportCommand.php | 25 +-
src/Command/JtlExportCommand.php | 13 +-
src/Command/JtlImportCommand.php | 5 +-
src/Controller/OrdersController.php | 40 --
src/Entity/Order.php | 16 +-
src/Entity/Product.php | 8 +-
src/Entity/Stock.php | 23 +-
src/Entity/Warehouse.php | 3 +-
src/EventSubscriber/SlackNotifySubscriber.php | 43 +-
src/Helper/Ftp.php | 101 ++--
src/Helper/Hiltes.php | 7 +-
src/Helper/HiltesImport.php | 181 +++----
src/Helper/Jtl.php | 36 +-
src/Helper/Slack.php | 3 +-
src/Repository/OrderRepository.php | 26 +-
src/Repository/OrdersRepository.php | 105 ----
src/Repository/ProductRepository.php | 5 +-
src/Repository/StockRepository.php | 3 +-
src/Repository/WarehouseRepository.php | 4 +-
src/Security/ApiKeyAuthenticator.php | 2 +-
28 files changed, 699 insertions(+), 774 deletions(-)
create mode 100644 migrations/Version20231110153931.php
delete mode 100644 src/Controller/OrdersController.php
delete mode 100644 src/Repository/OrdersRepository.php
diff --git a/.drone.yml b/.drone.yml
index 69ae684..444af2b 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,6 +1,7 @@
kind: pipeline
name: default
+load: [docker, composer]
steps:
- name: install
image: composer
@@ -17,7 +18,9 @@ steps:
- chmod +x /usr/local/bin/phpcs
- chmod +x /usr/local/bin/phpcbf
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- - phpcs -d memory_limit=512M --extensions=php --standard=PSR2 ./src/
+
+ - phpcbf -w ./src/
+
- name: test
image: php:8.1
diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
index ffa1385..1297f1c 100644
--- a/.idea/dataSources.xml
+++ b/.idea/dataSources.xml
@@ -8,13 +8,13 @@
jdbc:mysql://127.0.0.1:3306
$ProjectFileDir$
-
+
mariadb
true
true
DDEV generated data source
org.mariadb.jdbc.Driver
- jdbc:mariadb://127.0.0.1:51773/db?user=db&password=db
+ jdbc:mariadb://127.0.0.1:55034/db?user=db&password=db
$ProjectFileDir$
diff --git a/composer.lock b/composer.lock
index c68d4f6..7720fa2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8,16 +8,16 @@
"packages": [
{
"name": "api-platform/core",
- "version": "v3.2.0",
+ "version": "v3.2.4",
"source": {
"type": "git",
"url": "https://github.com/api-platform/core.git",
- "reference": "de8d5835f0a349f80a32b268be893d8e2cf85a07"
+ "reference": "3ab7e8791bd836a7b2c64b0cb326654ba69e8257"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/api-platform/core/zipball/de8d5835f0a349f80a32b268be893d8e2cf85a07",
- "reference": "de8d5835f0a349f80a32b268be893d8e2cf85a07",
+ "url": "https://api.github.com/repos/api-platform/core/zipball/3ab7e8791bd836a7b2c64b0cb326654ba69e8257",
+ "reference": "3ab7e8791bd836a7b2c64b0cb326654ba69e8257",
"shasum": ""
},
"require": {
@@ -166,9 +166,9 @@
],
"support": {
"issues": "https://github.com/api-platform/core/issues",
- "source": "https://github.com/api-platform/core/tree/v3.2.0"
+ "source": "https://github.com/api-platform/core/tree/v3.2.4"
},
- "time": "2023-10-12T10:35:19+00:00"
+ "time": "2023-11-06T08:14:18+00:00"
},
{
"name": "doctrine/annotations",
@@ -1943,29 +1943,29 @@
},
{
"name": "laminas/laminas-code",
- "version": "4.12.0",
+ "version": "4.13.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-code.git",
- "reference": "36cbee228b427446419dd51944bdfb6bb8ddbcd0"
+ "reference": "7353d4099ad5388e84737dd16994316a04f48dbf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-code/zipball/36cbee228b427446419dd51944bdfb6bb8ddbcd0",
- "reference": "36cbee228b427446419dd51944bdfb6bb8ddbcd0",
+ "url": "https://api.github.com/repos/laminas/laminas-code/zipball/7353d4099ad5388e84737dd16994316a04f48dbf",
+ "reference": "7353d4099ad5388e84737dd16994316a04f48dbf",
"shasum": ""
},
"require": {
- "php": "~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"require-dev": {
- "doctrine/annotations": "^2.0.0",
+ "doctrine/annotations": "^2.0.1",
"ext-phar": "*",
- "laminas/laminas-coding-standard": "^2.3.0",
- "laminas/laminas-stdlib": "^3.6.1",
- "phpunit/phpunit": "^10.0.9",
+ "laminas/laminas-coding-standard": "^2.5.0",
+ "laminas/laminas-stdlib": "^3.17.0",
+ "phpunit/phpunit": "^10.3.3",
"psalm/plugin-phpunit": "^0.18.4",
- "vimeo/psalm": "^5.7.1"
+ "vimeo/psalm": "^5.15.0"
},
"suggest": {
"doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
@@ -2002,7 +2002,7 @@
"type": "community_bridge"
}
],
- "time": "2023-09-06T14:56:25+00:00"
+ "time": "2023-10-18T10:00:55+00:00"
},
{
"name": "league/csv",
@@ -2853,16 +2853,16 @@
},
{
"name": "symfony/asset",
- "version": "v6.3.0",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/asset.git",
- "reference": "b77a4cc8e266b7e0db688de740f9ee7253aa411c"
+ "reference": "b2382a403f2111836301623d89e9af3d84989525"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/asset/zipball/b77a4cc8e266b7e0db688de740f9ee7253aa411c",
- "reference": "b77a4cc8e266b7e0db688de740f9ee7253aa411c",
+ "url": "https://api.github.com/repos/symfony/asset/zipball/b2382a403f2111836301623d89e9af3d84989525",
+ "reference": "b2382a403f2111836301623d89e9af3d84989525",
"shasum": ""
},
"require": {
@@ -2902,7 +2902,7 @@
"description": "Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/asset/tree/v6.3.0"
+ "source": "https://github.com/symfony/asset/tree/v6.3.8"
},
"funding": [
{
@@ -2918,20 +2918,20 @@
"type": "tidelift"
}
],
- "time": "2023-04-21T14:41:17+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/cache",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
- "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da"
+ "reference": "ba33517043c22c94c7ab04b056476f6f86816cf8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/cache/zipball/6c1a3ea078c4d88ee892530945df63a87981b2da",
- "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da",
+ "url": "https://api.github.com/repos/symfony/cache/zipball/ba33517043c22c94c7ab04b056476f6f86816cf8",
+ "reference": "ba33517043c22c94c7ab04b056476f6f86816cf8",
"shasum": ""
},
"require": {
@@ -2940,7 +2940,7 @@
"psr/log": "^1.1|^2|^3",
"symfony/cache-contracts": "^2.5|^3",
"symfony/service-contracts": "^2.5|^3",
- "symfony/var-exporter": "^6.2.10"
+ "symfony/var-exporter": "^6.3.6"
},
"conflict": {
"doctrine/dbal": "<2.13.1",
@@ -2955,7 +2955,7 @@
},
"require-dev": {
"cache/integration-tests": "dev-master",
- "doctrine/dbal": "^2.13.1|^3.0",
+ "doctrine/dbal": "^2.13.1|^3|^4",
"predis/predis": "^1.1|^2.0",
"psr/simple-cache": "^1.0|^2.0|^3.0",
"symfony/config": "^5.4|^6.0",
@@ -2998,7 +2998,7 @@
"psr6"
],
"support": {
- "source": "https://github.com/symfony/cache/tree/v6.3.5"
+ "source": "https://github.com/symfony/cache/tree/v6.3.8"
},
"funding": [
{
@@ -3014,7 +3014,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-26T15:48:55+00:00"
+ "time": "2023-11-07T10:17:15+00:00"
},
{
"name": "symfony/cache-contracts",
@@ -3167,16 +3167,16 @@
},
{
"name": "symfony/config",
- "version": "v6.3.2",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467"
+ "reference": "b7a63887960359e5b59b15826fa9f9be10acbe88"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/b47ca238b03e7b0d7880ffd1cf06e8d637ca1467",
- "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467",
+ "url": "https://api.github.com/repos/symfony/config/zipball/b7a63887960359e5b59b15826fa9f9be10acbe88",
+ "reference": "b7a63887960359e5b59b15826fa9f9be10acbe88",
"shasum": ""
},
"require": {
@@ -3222,7 +3222,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/config/tree/v6.3.2"
+ "source": "https://github.com/symfony/config/tree/v6.3.8"
},
"funding": [
{
@@ -3238,20 +3238,20 @@
"type": "tidelift"
}
],
- "time": "2023-07-19T20:22:16+00:00"
+ "time": "2023-11-09T08:28:21+00:00"
},
{
"name": "symfony/console",
- "version": "v6.3.4",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6"
+ "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6",
- "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6",
+ "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
+ "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
"shasum": ""
},
"require": {
@@ -3312,7 +3312,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v6.3.4"
+ "source": "https://github.com/symfony/console/tree/v6.3.8"
},
"funding": [
{
@@ -3328,20 +3328,20 @@
"type": "tidelift"
}
],
- "time": "2023-08-16T10:10:12+00:00"
+ "time": "2023-10-31T08:09:35+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "2ed62b3bf98346e1f45529a7b6be2196739bb993"
+ "reference": "1f30f545c4151f611148fc19e28d54d39e0a00bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2ed62b3bf98346e1f45529a7b6be2196739bb993",
- "reference": "2ed62b3bf98346e1f45529a7b6be2196739bb993",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1f30f545c4151f611148fc19e28d54d39e0a00bc",
+ "reference": "1f30f545c4151f611148fc19e28d54d39e0a00bc",
"shasum": ""
},
"require": {
@@ -3393,7 +3393,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dependency-injection/tree/v6.3.5"
+ "source": "https://github.com/symfony/dependency-injection/tree/v6.3.8"
},
"funding": [
{
@@ -3409,7 +3409,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-25T16:46:40+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -3480,16 +3480,16 @@
},
{
"name": "symfony/doctrine-bridge",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/doctrine-bridge.git",
- "reference": "9977eb1adf999ceded213e88c1ac6dff7a1a0306"
+ "reference": "8842d289d41320a0f725e996b4e58d84af398a9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/9977eb1adf999ceded213e88c1ac6dff7a1a0306",
- "reference": "9977eb1adf999ceded213e88c1ac6dff7a1a0306",
+ "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/8842d289d41320a0f725e996b4e58d84af398a9e",
+ "reference": "8842d289d41320a0f725e996b4e58d84af398a9e",
"shasum": ""
},
"require": {
@@ -3522,8 +3522,8 @@
"doctrine/annotations": "^1.13.1|^2",
"doctrine/collections": "^1.0|^2.0",
"doctrine/data-fixtures": "^1.1",
- "doctrine/dbal": "^2.13.1|^3.0",
- "doctrine/orm": "^2.12",
+ "doctrine/dbal": "^2.13.1|^3|^4",
+ "doctrine/orm": "^2.12|^3",
"psr/log": "^1|^2|^3",
"symfony/cache": "^5.4|^6.0",
"symfony/config": "^5.4|^6.0",
@@ -3570,7 +3570,7 @@
"description": "Provides integration for Doctrine with various Symfony components",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/doctrine-bridge/tree/v6.3.5"
+ "source": "https://github.com/symfony/doctrine-bridge/tree/v6.3.8"
},
"funding": [
{
@@ -3586,20 +3586,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-29T16:16:03+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/dotenv",
- "version": "v6.3.0",
+ "version": "v6.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/dotenv.git",
- "reference": "ceadb434fe2a6763a03d2d110441745834f3dd1e"
+ "reference": "7dfbe2976f3c1b7cfa8fac2212a050bfa9bd7d9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dotenv/zipball/ceadb434fe2a6763a03d2d110441745834f3dd1e",
- "reference": "ceadb434fe2a6763a03d2d110441745834f3dd1e",
+ "url": "https://api.github.com/repos/symfony/dotenv/zipball/7dfbe2976f3c1b7cfa8fac2212a050bfa9bd7d9e",
+ "reference": "7dfbe2976f3c1b7cfa8fac2212a050bfa9bd7d9e",
"shasum": ""
},
"require": {
@@ -3644,7 +3644,7 @@
"environment"
],
"support": {
- "source": "https://github.com/symfony/dotenv/tree/v6.3.0"
+ "source": "https://github.com/symfony/dotenv/tree/v6.3.7"
},
"funding": [
{
@@ -3660,7 +3660,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-21T14:41:17+00:00"
+ "time": "2023-10-26T18:15:14+00:00"
},
{
"name": "symfony/error-handler",
@@ -4085,16 +4085,16 @@
},
{
"name": "symfony/flex",
- "version": "v2.3.3",
+ "version": "v2.4.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/flex.git",
- "reference": "9c402af768c6c9f8126a9ffa192ecf7c16581e35"
+ "reference": "ae6dea68771c5fca9d172e0c0910bdd06199f6f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/flex/zipball/9c402af768c6c9f8126a9ffa192ecf7c16581e35",
- "reference": "9c402af768c6c9f8126a9ffa192ecf7c16581e35",
+ "url": "https://api.github.com/repos/symfony/flex/zipball/ae6dea68771c5fca9d172e0c0910bdd06199f6f4",
+ "reference": "ae6dea68771c5fca9d172e0c0910bdd06199f6f4",
"shasum": ""
},
"require": {
@@ -4130,7 +4130,7 @@
"description": "Composer plugin for Symfony",
"support": {
"issues": "https://github.com/symfony/flex/issues",
- "source": "https://github.com/symfony/flex/tree/v2.3.3"
+ "source": "https://github.com/symfony/flex/tree/v2.4.1"
},
"funding": [
{
@@ -4146,20 +4146,20 @@
"type": "tidelift"
}
],
- "time": "2023-08-04T09:02:35+00:00"
+ "time": "2023-10-30T18:35:17+00:00"
},
{
"name": "symfony/form",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/form.git",
- "reference": "0f9ad8600c1021983d096512066ee54332aa3139"
+ "reference": "b7a8098163cce87c0b6ce05d0f361dc12d5a2788"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/form/zipball/0f9ad8600c1021983d096512066ee54332aa3139",
- "reference": "0f9ad8600c1021983d096512066ee54332aa3139",
+ "url": "https://api.github.com/repos/symfony/form/zipball/b7a8098163cce87c0b6ce05d0f361dc12d5a2788",
+ "reference": "b7a8098163cce87c0b6ce05d0f361dc12d5a2788",
"shasum": ""
},
"require": {
@@ -4227,7 +4227,7 @@
"description": "Allows to easily create, process and reuse HTML forms",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/form/tree/v6.3.5"
+ "source": "https://github.com/symfony/form/tree/v6.3.8"
},
"funding": [
{
@@ -4243,20 +4243,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-10T17:47:23+00:00"
+ "time": "2023-11-06T10:58:05+00:00"
},
{
"name": "symfony/framework-bundle",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/framework-bundle.git",
- "reference": "567cafcfc08e3076b47290a7558b0ca17a98b0ce"
+ "reference": "e88be137ea0652ee2caf2eacb21283820904be4f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/567cafcfc08e3076b47290a7558b0ca17a98b0ce",
- "reference": "567cafcfc08e3076b47290a7558b0ca17a98b0ce",
+ "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/e88be137ea0652ee2caf2eacb21283820904be4f",
+ "reference": "e88be137ea0652ee2caf2eacb21283820904be4f",
"shasum": ""
},
"require": {
@@ -4371,7 +4371,7 @@
"description": "Provides a tight integration between Symfony components and the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/framework-bundle/tree/v6.3.5"
+ "source": "https://github.com/symfony/framework-bundle/tree/v6.3.8"
},
"funding": [
{
@@ -4387,20 +4387,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-29T10:45:15+00:00"
+ "time": "2023-11-09T14:35:42+00:00"
},
{
"name": "symfony/http-client",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
- "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d"
+ "reference": "0314e2d49939a9831929d6fc81c01c6df137fd0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-client/zipball/213e564da4cbf61acc9728d97e666bcdb868c10d",
- "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d",
+ "url": "https://api.github.com/repos/symfony/http-client/zipball/0314e2d49939a9831929d6fc81c01c6df137fd0a",
+ "reference": "0314e2d49939a9831929d6fc81c01c6df137fd0a",
"shasum": ""
},
"require": {
@@ -4463,7 +4463,7 @@
"http"
],
"support": {
- "source": "https://github.com/symfony/http-client/tree/v6.3.5"
+ "source": "https://github.com/symfony/http-client/tree/v6.3.8"
},
"funding": [
{
@@ -4479,7 +4479,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-29T15:57:12+00:00"
+ "time": "2023-11-06T18:31:59+00:00"
},
{
"name": "symfony/http-client-contracts",
@@ -4561,16 +4561,16 @@
},
{
"name": "symfony/http-foundation",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957"
+ "reference": "ce332676de1912c4389222987193c3ef38033df6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957",
- "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ce332676de1912c4389222987193c3ef38033df6",
+ "reference": "ce332676de1912c4389222987193c3ef38033df6",
"shasum": ""
},
"require": {
@@ -4580,12 +4580,12 @@
"symfony/polyfill-php83": "^1.27"
},
"conflict": {
- "symfony/cache": "<6.2"
+ "symfony/cache": "<6.3"
},
"require-dev": {
- "doctrine/dbal": "^2.13.1|^3.0",
+ "doctrine/dbal": "^2.13.1|^3|^4",
"predis/predis": "^1.1|^2.0",
- "symfony/cache": "^5.4|^6.0",
+ "symfony/cache": "^6.3",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/expression-language": "^5.4|^6.0",
"symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4",
@@ -4618,7 +4618,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-foundation/tree/v6.3.5"
+ "source": "https://github.com/symfony/http-foundation/tree/v6.3.8"
},
"funding": [
{
@@ -4634,20 +4634,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-04T21:33:54+00:00"
+ "time": "2023-11-07T10:17:15+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc"
+ "reference": "929202375ccf44a309c34aeca8305408442ebcc1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc",
- "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/929202375ccf44a309c34aeca8305408442ebcc1",
+ "reference": "929202375ccf44a309c34aeca8305408442ebcc1",
"shasum": ""
},
"require": {
@@ -4731,7 +4731,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-kernel/tree/v6.3.5"
+ "source": "https://github.com/symfony/http-kernel/tree/v6.3.8"
},
"funding": [
{
@@ -4747,20 +4747,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-30T06:37:04+00:00"
+ "time": "2023-11-10T13:47:32+00:00"
},
{
"name": "symfony/notifier",
- "version": "v6.3.0",
+ "version": "v6.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/notifier.git",
- "reference": "a30aee1bf767835d7948138c1629e310cee26a8b"
+ "reference": "2e39d4a9a96e25d127ffe30171127f6ef73934df"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/notifier/zipball/a30aee1bf767835d7948138c1629e310cee26a8b",
- "reference": "a30aee1bf767835d7948138c1629e310cee26a8b",
+ "url": "https://api.github.com/repos/symfony/notifier/zipball/2e39d4a9a96e25d127ffe30171127f6ef73934df",
+ "reference": "2e39d4a9a96e25d127ffe30171127f6ef73934df",
"shasum": ""
},
"require": {
@@ -4809,7 +4809,7 @@
"notifier"
],
"support": {
- "source": "https://github.com/symfony/notifier/tree/v6.3.0"
+ "source": "https://github.com/symfony/notifier/tree/v6.3.6"
},
"funding": [
{
@@ -4825,7 +4825,7 @@
"type": "tidelift"
}
],
- "time": "2023-05-12T10:17:15+00:00"
+ "time": "2023-10-07T07:32:05+00:00"
},
{
"name": "symfony/options-resolver",
@@ -4896,16 +4896,16 @@
},
{
"name": "symfony/password-hasher",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/password-hasher.git",
- "reference": "278d3a49715073879f75e372ad80b8cfeca949d3"
+ "reference": "82161c4bebf77900372083ec6e484b5f055b0cba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/password-hasher/zipball/278d3a49715073879f75e372ad80b8cfeca949d3",
- "reference": "278d3a49715073879f75e372ad80b8cfeca949d3",
+ "url": "https://api.github.com/repos/symfony/password-hasher/zipball/82161c4bebf77900372083ec6e484b5f055b0cba",
+ "reference": "82161c4bebf77900372083ec6e484b5f055b0cba",
"shasum": ""
},
"require": {
@@ -4948,7 +4948,7 @@
"password"
],
"support": {
- "source": "https://github.com/symfony/password-hasher/tree/v6.3.5"
+ "source": "https://github.com/symfony/password-hasher/tree/v6.3.8"
},
"funding": [
{
@@ -4964,7 +4964,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-25T17:05:16+00:00"
+ "time": "2023-11-06T10:58:05+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
@@ -5859,16 +5859,16 @@
},
{
"name": "symfony/security-bundle",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/security-bundle.git",
- "reference": "2df460eacceb11b9287cfafddda4d27023dd9001"
+ "reference": "57889ebb1ac3403d550c787c4fde127261abacb6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/security-bundle/zipball/2df460eacceb11b9287cfafddda4d27023dd9001",
- "reference": "2df460eacceb11b9287cfafddda4d27023dd9001",
+ "url": "https://api.github.com/repos/symfony/security-bundle/zipball/57889ebb1ac3403d550c787c4fde127261abacb6",
+ "reference": "57889ebb1ac3403d550c787c4fde127261abacb6",
"shasum": ""
},
"require": {
@@ -5885,7 +5885,8 @@
"symfony/password-hasher": "^5.4|^6.0",
"symfony/security-core": "^6.2",
"symfony/security-csrf": "^5.4|^6.0",
- "symfony/security-http": "^6.3.4"
+ "symfony/security-http": "^6.3.6",
+ "symfony/service-contracts": "^2.5|^3"
},
"conflict": {
"symfony/browser-kit": "<5.4",
@@ -5949,7 +5950,7 @@
"description": "Provides a tight integration of the Security component into the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/security-bundle/tree/v6.3.5"
+ "source": "https://github.com/symfony/security-bundle/tree/v6.3.8"
},
"funding": [
{
@@ -5965,20 +5966,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-25T17:05:55+00:00"
+ "time": "2023-11-09T09:33:10+00:00"
},
{
"name": "symfony/security-core",
- "version": "v6.3.5",
+ "version": "v6.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/security-core.git",
- "reference": "ec8f24dc1195f46483510892271d01a5202bba70"
+ "reference": "7ceb30fed93f5ea40ccde3173d1f7712527c0d62"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/security-core/zipball/ec8f24dc1195f46483510892271d01a5202bba70",
- "reference": "ec8f24dc1195f46483510892271d01a5202bba70",
+ "url": "https://api.github.com/repos/symfony/security-core/zipball/7ceb30fed93f5ea40ccde3173d1f7712527c0d62",
+ "reference": "7ceb30fed93f5ea40ccde3173d1f7712527c0d62",
"shasum": ""
},
"require": {
@@ -6034,7 +6035,7 @@
"description": "Symfony Security Component - Core Library",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/security-core/tree/v6.3.5"
+ "source": "https://github.com/symfony/security-core/tree/v6.3.7"
},
"funding": [
{
@@ -6050,7 +6051,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-10T17:47:23+00:00"
+ "time": "2023-10-28T23:11:45+00:00"
},
{
"name": "symfony/security-csrf",
@@ -6122,16 +6123,16 @@
},
{
"name": "symfony/security-http",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/security-http.git",
- "reference": "47058ea557a4c64ba86e9249651222842bd52e2a"
+ "reference": "19f7b5f5d20879a976d6d376e359bc975dfc6002"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/security-http/zipball/47058ea557a4c64ba86e9249651222842bd52e2a",
- "reference": "47058ea557a4c64ba86e9249651222842bd52e2a",
+ "url": "https://api.github.com/repos/symfony/security-http/zipball/19f7b5f5d20879a976d6d376e359bc975dfc6002",
+ "reference": "19f7b5f5d20879a976d6d376e359bc975dfc6002",
"shasum": ""
},
"require": {
@@ -6141,7 +6142,8 @@
"symfony/http-kernel": "^6.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/property-access": "^5.4|^6.0",
- "symfony/security-core": "^6.3"
+ "symfony/security-core": "^6.3",
+ "symfony/service-contracts": "^2.5|^3"
},
"conflict": {
"symfony/clock": "<6.3",
@@ -6189,7 +6191,7 @@
"description": "Symfony Security Component - HTTP Integration",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/security-http/tree/v6.3.5"
+ "source": "https://github.com/symfony/security-http/tree/v6.3.8"
},
"funding": [
{
@@ -6205,20 +6207,20 @@
"type": "tidelift"
}
],
- "time": "2023-08-30T06:30:46+00:00"
+ "time": "2023-11-09T21:20:12+00:00"
},
{
"name": "symfony/serializer",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/serializer.git",
- "reference": "855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c"
+ "reference": "b3ad1515a276473f7919ac97e560017284a7c4bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/serializer/zipball/855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c",
- "reference": "855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c",
+ "url": "https://api.github.com/repos/symfony/serializer/zipball/b3ad1515a276473f7919ac97e560017284a7c4bf",
+ "reference": "b3ad1515a276473f7919ac97e560017284a7c4bf",
"shasum": ""
},
"require": {
@@ -6283,7 +6285,7 @@
"description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/serializer/tree/v6.3.5"
+ "source": "https://github.com/symfony/serializer/tree/v6.3.8"
},
"funding": [
{
@@ -6299,7 +6301,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-29T16:18:53+00:00"
+ "time": "2023-11-07T10:11:25+00:00"
},
{
"name": "symfony/service-contracts",
@@ -6514,16 +6516,16 @@
},
{
"name": "symfony/string",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339"
+ "reference": "13880a87790c76ef994c91e87efb96134522577a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339",
- "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339",
+ "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a",
+ "reference": "13880a87790c76ef994c91e87efb96134522577a",
"shasum": ""
},
"require": {
@@ -6580,7 +6582,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.3.5"
+ "source": "https://github.com/symfony/string/tree/v6.3.8"
},
"funding": [
{
@@ -6596,7 +6598,7 @@
"type": "tidelift"
}
],
- "time": "2023-09-18T10:38:32+00:00"
+ "time": "2023-11-09T08:28:21+00:00"
},
{
"name": "symfony/translation-contracts",
@@ -6678,16 +6680,16 @@
},
{
"name": "symfony/twig-bridge",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
- "reference": "18f2cbe1d46ad43c4d3bd45e5e6279172068e064"
+ "reference": "c51407623959a626784ff302419026f56dc4e1ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/18f2cbe1d46ad43c4d3bd45e5e6279172068e064",
- "reference": "18f2cbe1d46ad43c4d3bd45e5e6279172068e064",
+ "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/c51407623959a626784ff302419026f56dc4e1ba",
+ "reference": "c51407623959a626784ff302419026f56dc4e1ba",
"shasum": ""
},
"require": {
@@ -6766,7 +6768,7 @@
"description": "Provides integration for Twig with various Symfony components",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/twig-bridge/tree/v6.3.5"
+ "source": "https://github.com/symfony/twig-bridge/tree/v6.3.8"
},
"funding": [
{
@@ -6782,20 +6784,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-12T06:57:20+00:00"
+ "time": "2023-11-09T21:20:12+00:00"
},
{
"name": "symfony/twig-bundle",
- "version": "v6.3.0",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bundle.git",
- "reference": "d0cd4d1675c0582d27c2e8bb0dc27c0303d8e3ea"
+ "reference": "82429320fe931dd50825ec08140c54b3a315bf79"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/d0cd4d1675c0582d27c2e8bb0dc27c0303d8e3ea",
- "reference": "d0cd4d1675c0582d27c2e8bb0dc27c0303d8e3ea",
+ "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/82429320fe931dd50825ec08140c54b3a315bf79",
+ "reference": "82429320fe931dd50825ec08140c54b3a315bf79",
"shasum": ""
},
"require": {
@@ -6851,7 +6853,7 @@
"description": "Provides a tight integration of Twig into the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/twig-bundle/tree/v6.3.0"
+ "source": "https://github.com/symfony/twig-bundle/tree/v6.3.8"
},
"funding": [
{
@@ -6867,20 +6869,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-06T09:53:41+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/validator",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/validator.git",
- "reference": "48e815ba3b5eb72e632588dbf7ea2dc4e608ee47"
+ "reference": "f75b40e088d095db1e788b81605a76f4563cb80e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/validator/zipball/48e815ba3b5eb72e632588dbf7ea2dc4e608ee47",
- "reference": "48e815ba3b5eb72e632588dbf7ea2dc4e608ee47",
+ "url": "https://api.github.com/repos/symfony/validator/zipball/f75b40e088d095db1e788b81605a76f4563cb80e",
+ "reference": "f75b40e088d095db1e788b81605a76f4563cb80e",
"shasum": ""
},
"require": {
@@ -6947,7 +6949,7 @@
"description": "Provides tools to validate values",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/validator/tree/v6.3.5"
+ "source": "https://github.com/symfony/validator/tree/v6.3.8"
},
"funding": [
{
@@ -6963,20 +6965,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-29T07:41:15+00:00"
+ "time": "2023-11-07T10:17:15+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v6.3.5",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5"
+ "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5",
- "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81acabba9046550e89634876ca64bfcd3c06aa0a",
+ "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a",
"shasum": ""
},
"require": {
@@ -7031,7 +7033,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v6.3.5"
+ "source": "https://github.com/symfony/var-dumper/tree/v6.3.8"
},
"funding": [
{
@@ -7047,20 +7049,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-12T10:11:35+00:00"
+ "time": "2023-11-08T10:42:36+00:00"
},
{
"name": "symfony/var-exporter",
- "version": "v6.3.4",
+ "version": "v6.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
- "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691"
+ "reference": "374d289c13cb989027274c86206ddc63b16a2441"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df1f8aac5751871b83d30bf3e2c355770f8f0691",
- "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/374d289c13cb989027274c86206ddc63b16a2441",
+ "reference": "374d289c13cb989027274c86206ddc63b16a2441",
"shasum": ""
},
"require": {
@@ -7105,7 +7107,7 @@
"serialize"
],
"support": {
- "source": "https://github.com/symfony/var-exporter/tree/v6.3.4"
+ "source": "https://github.com/symfony/var-exporter/tree/v6.3.6"
},
"funding": [
{
@@ -7121,7 +7123,7 @@
"type": "tidelift"
}
],
- "time": "2023-08-16T18:14:47+00:00"
+ "time": "2023-10-13T09:16:49+00:00"
},
{
"name": "symfony/web-link",
@@ -7208,16 +7210,16 @@
},
{
"name": "symfony/yaml",
- "version": "v6.3.3",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add"
+ "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add",
- "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/3493af8a8dad7fa91c77fa473ba23ecd95334a92",
+ "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92",
"shasum": ""
},
"require": {
@@ -7260,7 +7262,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/yaml/tree/v6.3.3"
+ "source": "https://github.com/symfony/yaml/tree/v6.3.8"
},
"funding": [
{
@@ -7276,7 +7278,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-31T07:08:24+00:00"
+ "time": "2023-11-06T10:58:05+00:00"
},
{
"name": "twig/twig",
@@ -7534,16 +7536,16 @@
},
{
"name": "monolog/monolog",
- "version": "3.4.0",
+ "version": "3.5.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "e2392369686d420ca32df3803de28b5d6f76867d"
+ "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d",
- "reference": "e2392369686d420ca32df3803de28b5d6f76867d",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448",
+ "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"shasum": ""
},
"require": {
@@ -7619,7 +7621,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
- "source": "https://github.com/Seldaek/monolog/tree/3.4.0"
+ "source": "https://github.com/Seldaek/monolog/tree/3.5.0"
},
"funding": [
{
@@ -7631,7 +7633,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-21T08:46:11+00:00"
+ "time": "2023-10-27T15:32:31+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -9247,16 +9249,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v6.3.2",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "ca4a988488f61ac18f8f845445eabdd36f89aa8d"
+ "reference": "e270297dbee59168274c2b535ab1bccd593e6ffe"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/ca4a988488f61ac18f8f845445eabdd36f89aa8d",
- "reference": "ca4a988488f61ac18f8f845445eabdd36f89aa8d",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/e270297dbee59168274c2b535ab1bccd593e6ffe",
+ "reference": "e270297dbee59168274c2b535ab1bccd593e6ffe",
"shasum": ""
},
"require": {
@@ -9295,7 +9297,7 @@
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/browser-kit/tree/v6.3.2"
+ "source": "https://github.com/symfony/browser-kit/tree/v6.3.8"
},
"funding": [
{
@@ -9311,7 +9313,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-06T06:56:43+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/css-selector",
@@ -9613,16 +9615,16 @@
},
{
"name": "symfony/monolog-bridge",
- "version": "v6.3.1",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bridge.git",
- "reference": "04b04b8e465e0fa84940e5609b6796a8b4e51bf1"
+ "reference": "2bbfc8bd9d6f966b69eda20c66762580a0410c78"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/04b04b8e465e0fa84940e5609b6796a8b4e51bf1",
- "reference": "04b04b8e465e0fa84940e5609b6796a8b4e51bf1",
+ "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/2bbfc8bd9d6f966b69eda20c66762580a0410c78",
+ "reference": "2bbfc8bd9d6f966b69eda20c66762580a0410c78",
"shasum": ""
},
"require": {
@@ -9671,7 +9673,7 @@
"description": "Provides integration for Monolog with various Symfony components",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/monolog-bridge/tree/v6.3.1"
+ "source": "https://github.com/symfony/monolog-bridge/tree/v6.3.8"
},
"funding": [
{
@@ -9687,34 +9689,34 @@
"type": "tidelift"
}
],
- "time": "2023-06-08T11:13:32+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/monolog-bundle",
- "version": "v3.8.0",
+ "version": "v3.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bundle.git",
- "reference": "a41bbcdc1105603b6d73a7d9a43a3788f8e0fb7d"
+ "reference": "414f951743f4aa1fd0f5bf6a0e9c16af3fe7f181"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/a41bbcdc1105603b6d73a7d9a43a3788f8e0fb7d",
- "reference": "a41bbcdc1105603b6d73a7d9a43a3788f8e0fb7d",
+ "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/414f951743f4aa1fd0f5bf6a0e9c16af3fe7f181",
+ "reference": "414f951743f4aa1fd0f5bf6a0e9c16af3fe7f181",
"shasum": ""
},
"require": {
- "monolog/monolog": "^1.22 || ^2.0 || ^3.0",
- "php": ">=7.1.3",
- "symfony/config": "~4.4 || ^5.0 || ^6.0",
- "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
- "symfony/http-kernel": "~4.4 || ^5.0 || ^6.0",
- "symfony/monolog-bridge": "~4.4 || ^5.0 || ^6.0"
+ "monolog/monolog": "^1.25.1 || ^2.0 || ^3.0",
+ "php": ">=7.2.5",
+ "symfony/config": "^5.4 || ^6.0 || ^7.0",
+ "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
+ "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
+ "symfony/monolog-bridge": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
- "symfony/console": "~4.4 || ^5.0 || ^6.0",
- "symfony/phpunit-bridge": "^5.2 || ^6.0",
- "symfony/yaml": "~4.4 || ^5.0 || ^6.0"
+ "symfony/console": "^5.4 || ^6.0 || ^7.0",
+ "symfony/phpunit-bridge": "^6.3 || ^7.0",
+ "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
},
"type": "symfony-bundle",
"extra": {
@@ -9752,7 +9754,7 @@
],
"support": {
"issues": "https://github.com/symfony/monolog-bundle/issues",
- "source": "https://github.com/symfony/monolog-bundle/tree/v3.8.0"
+ "source": "https://github.com/symfony/monolog-bundle/tree/v3.10.0"
},
"funding": [
{
@@ -9768,20 +9770,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-10T14:24:36+00:00"
+ "time": "2023-11-06T17:08:13+00:00"
},
{
"name": "symfony/phpunit-bridge",
- "version": "v6.3.2",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/phpunit-bridge.git",
- "reference": "e020e1efbd1b42cb670fcd7d19a25abbddba035d"
+ "reference": "45610900872a35b77db7698651f36129906041ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/e020e1efbd1b42cb670fcd7d19a25abbddba035d",
- "reference": "e020e1efbd1b42cb670fcd7d19a25abbddba035d",
+ "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/45610900872a35b77db7698651f36129906041ea",
+ "reference": "45610900872a35b77db7698651f36129906041ea",
"shasum": ""
},
"require": {
@@ -9833,7 +9835,7 @@
"description": "Provides utilities for PHPUnit, especially user deprecation notices management",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.2"
+ "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.8"
},
"funding": [
{
@@ -9849,7 +9851,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-12T16:00:22+00:00"
+ "time": "2023-10-31T08:07:48+00:00"
},
{
"name": "symfony/process",
@@ -9914,22 +9916,22 @@
},
{
"name": "symfony/web-profiler-bundle",
- "version": "v6.3.2",
+ "version": "v6.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/web-profiler-bundle.git",
- "reference": "6101b5ab7857c373d237e121f9060c68b32e1373"
+ "reference": "4167c20cbdbb1152007fa731718c8c0362f28617"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/6101b5ab7857c373d237e121f9060c68b32e1373",
- "reference": "6101b5ab7857c373d237e121f9060c68b32e1373",
+ "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/4167c20cbdbb1152007fa731718c8c0362f28617",
+ "reference": "4167c20cbdbb1152007fa731718c8c0362f28617",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/config": "^5.4|^6.0",
- "symfony/framework-bundle": "^5.4|^6.0",
+ "symfony/framework-bundle": "^5.4|^6.0,<6.4",
"symfony/http-kernel": "^6.3",
"symfony/routing": "^5.4|^6.0",
"symfony/twig-bundle": "^5.4|^6.0",
@@ -9975,7 +9977,7 @@
"dev"
],
"support": {
- "source": "https://github.com/symfony/web-profiler-bundle/tree/v6.3.2"
+ "source": "https://github.com/symfony/web-profiler-bundle/tree/v6.3.8"
},
"funding": [
{
@@ -9991,7 +9993,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-19T20:17:28+00:00"
+ "time": "2023-10-31T14:41:59+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/config/services.yaml b/config/services.yaml
index 0a38397..e20161b 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -22,9 +22,6 @@ services:
App\EventSubscriber\SlackNotifySubscriber:
arguments:
$slackWebhookUrl: '%env(SLACK_DSN)%'
-# App\Helper\Hiltes:
-# arguments:
-# $orderRepository: '@App\Repository\OrderRepository'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
\ No newline at end of file
diff --git a/migrations/Version20231110153931.php b/migrations/Version20231110153931.php
new file mode 100644
index 0000000..8258943
--- /dev/null
+++ b/migrations/Version20231110153931.php
@@ -0,0 +1,33 @@
+addSql('ALTER TABLE `order` CHANGE data data JSON NOT NULL COMMENT \'(DC2Type:json)\'');
+ $this->addSql('CREATE UNIQUE INDEX UNIQ_F52993988D9F6D38 ON `order` (order_id)');
+ }
+
+ public function down(Schema $schema): void
+ {
+ // this down() migration is auto-generated, please modify it to your needs
+ $this->addSql('DROP INDEX UNIQ_F52993988D9F6D38 ON `order`');
+ $this->addSql('ALTER TABLE `order` CHANGE data data JSON NOT NULL COMMENT \'(DC2Type:json)\'');
+ }
+}
diff --git a/public/bundles/apiplatform/fonts/open-sans/400.css b/public/bundles/apiplatform/fonts/open-sans/400.css
index 4a3ee47..9e07f0b 100644
--- a/public/bundles/apiplatform/fonts/open-sans/400.css
+++ b/public/bundles/apiplatform/fonts/open-sans/400.css
@@ -2,9 +2,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-cyrillic-ext-400-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-ext-400-normal.woff) format('woff');
+ src: url(./files/open-sans-cyrillic-ext-400-normal.woff2) format('woff2');
unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@@ -12,9 +12,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-cyrillic-400-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-400-normal.woff) format('woff');
+ src: url(./files/open-sans-cyrillic-400-normal.woff2) format('woff2');
unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@@ -22,9 +22,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-greek-ext-400-normal.woff2) format('woff2'), url(./files/open-sans-greek-ext-400-normal.woff) format('woff');
+ src: url(./files/open-sans-greek-ext-400-normal.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
@@ -32,9 +32,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-greek-400-normal.woff2) format('woff2'), url(./files/open-sans-greek-400-normal.woff) format('woff');
+ src: url(./files/open-sans-greek-400-normal.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
@@ -42,9 +42,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-hebrew-400-normal.woff2) format('woff2'), url(./files/open-sans-hebrew-400-normal.woff) format('woff');
+ src: url(./files/open-sans-hebrew-400-normal.woff2) format('woff2');
unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}
@@ -52,9 +52,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-vietnamese-400-normal.woff2) format('woff2'), url(./files/open-sans-vietnamese-400-normal.woff) format('woff');
+ src: url(./files/open-sans-vietnamese-400-normal.woff2) format('woff2');
unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@@ -62,18 +62,18 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-latin-ext-400-normal.woff2) format('woff2'), url(./files/open-sans-latin-ext-400-normal.woff) format('woff');
- unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
+ src: url(./files/open-sans-latin-ext-400-normal.woff2) format('woff2');
+ unicode-range: U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* open-sans-latin-400-normal */
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 400;
- src: url(./files/open-sans-latin-400-normal.woff2) format('woff2'), url(./files/open-sans-latin-400-normal.woff) format('woff');
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
-}
\ No newline at end of file
+ src: url(./files/open-sans-latin-400-normal.woff2) format('woff2');
+ unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
+}
diff --git a/public/bundles/apiplatform/fonts/open-sans/700.css b/public/bundles/apiplatform/fonts/open-sans/700.css
index f20bbcf..bc61ca3 100644
--- a/public/bundles/apiplatform/fonts/open-sans/700.css
+++ b/public/bundles/apiplatform/fonts/open-sans/700.css
@@ -2,9 +2,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-cyrillic-ext-700-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-ext-700-normal.woff) format('woff');
+ src: url(./files/open-sans-cyrillic-ext-700-normal.woff2) format('woff2');
unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@@ -12,9 +12,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-cyrillic-700-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-700-normal.woff) format('woff');
+ src: url(./files/open-sans-cyrillic-700-normal.woff2) format('woff2');
unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@@ -22,9 +22,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-greek-ext-700-normal.woff2) format('woff2'), url(./files/open-sans-greek-ext-700-normal.woff) format('woff');
+ src: url(./files/open-sans-greek-ext-700-normal.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
@@ -32,9 +32,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-greek-700-normal.woff2) format('woff2'), url(./files/open-sans-greek-700-normal.woff) format('woff');
+ src: url(./files/open-sans-greek-700-normal.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
@@ -42,9 +42,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-hebrew-700-normal.woff2) format('woff2'), url(./files/open-sans-hebrew-700-normal.woff) format('woff');
+ src: url(./files/open-sans-hebrew-700-normal.woff2) format('woff2');
unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}
@@ -52,9 +52,9 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-vietnamese-700-normal.woff2) format('woff2'), url(./files/open-sans-vietnamese-700-normal.woff) format('woff');
+ src: url(./files/open-sans-vietnamese-700-normal.woff2) format('woff2');
unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@@ -62,18 +62,18 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-latin-ext-700-normal.woff2) format('woff2'), url(./files/open-sans-latin-ext-700-normal.woff) format('woff');
- unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
+ src: url(./files/open-sans-latin-ext-700-normal.woff2) format('woff2');
+ unicode-range: U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* open-sans-latin-700-normal */
@font-face {
font-family: 'Open Sans';
font-style: normal;
- font-display: swap;
+ font-display: var(--fontsource-display, swap);
font-weight: 700;
- src: url(./files/open-sans-latin-700-normal.woff2) format('woff2'), url(./files/open-sans-latin-700-normal.woff) format('woff');
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
-}
\ No newline at end of file
+ src: url(./files/open-sans-latin-700-normal.woff2) format('woff2');
+ unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
+}
diff --git a/src/Command/HiltesExportCommand.php b/src/Command/HiltesExportCommand.php
index 7b63430..0275d80 100644
--- a/src/Command/HiltesExportCommand.php
+++ b/src/Command/HiltesExportCommand.php
@@ -3,6 +3,7 @@
namespace App\Command;
use App\Entity\Order;
+use App\Helper\Hiltes;
use App\Repository\OrderRepository;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
@@ -12,7 +13,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
-use App\Helper\Hiltes;
#[AsCommand(
name: 'hiltes:export',
@@ -22,10 +22,10 @@ class HiltesExportCommand extends Command
{
public function __construct(OrderRepository $orderRepository, LoggerInterface $logger, private Hiltes $hiltes)
{
- $this->orderRepository = $orderRepository;
- $this->logger = $logger;
+ $this->orderRepository = $orderRepository;
+ $this->logger = $logger;
- parent::__construct();
+ parent::__construct();
}
@@ -33,8 +33,7 @@ class HiltesExportCommand extends Command
{
$this
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description')
- ->addOption('option1', null, InputOption::VALUE_NONE, 'Option description')
- ;
+ ->addOption('option1', null, InputOption::VALUE_NONE, 'Option description');
}
/**
@@ -46,131 +45,131 @@ class HiltesExportCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): int
{
- $io = new SymfonyStyle($input, $output);
+ $io = new SymfonyStyle($input, $output);
$io->info('Start Hiltes Export');
- $l = $this->hiltes->loginToHiltes('','');
- if(!$l){
- dd('Login faild'.'STOP '.__METHOD__.' / '.__LINE__);
- }
+ $l = $this->hiltes->loginToHiltes('', '');
+ if (!$l) {
+ dd('Login faild' . 'STOP ' . __METHOD__ . ' / ' . __LINE__);
+ }
$orders = $this->orderRepository->findAll();
#dump($orders);
- /**
- * @var Order
- */
- $order = false;
- foreach ($orders as $order) {
- if($order->getStatus()>0) continue;
- $tA = $order->getData();#json_decode($order->getData());
+ /**
+ * @var Order
+ */
+ $order = false;
+ foreach ($orders as $order) {
+ if ($order->getStatus() > 0) continue;
+ $tA = $order->getData();#json_decode($order->getData());
$tA['orderdate'] = "2023-08-30T12:05:24.000Z";
- #dd($order->getData());
- #dd(array(
- # 'orderdate'=> $tA['orderdate'],
- # 'time'=> strtotime($tA['orderdate']),
- # 'gmdate '=> gmdate ('d-m-Y\TH:i:s.v\Z',strtotime($tA['orderdate'])),
- #));
- #*** Umkonvertieren des Datumstings *****************
- $tA['orderdate'] = gmdate ('Y-m-d\TH:i:s.v\Z',strtotime($tA['orderdate']));
- #****
- $arr = array(
- 'SalesDate' => $tA['orderdate'],
- "BranchNumber" => 8, #Die Filialnummer
- "ShopNumber" => 1, #Die Shopnummer
- "DistributionChannel" => 5, #Der Vertriebskanal
- 'SaleList' => array(),
- 'CustomerList' => array(),
- );
- #*** Items ***************
- if(!empty($tA['data']) && is_array($tA['data'])){
- # Noch nötig
- # "CalculatedSellingPrice" => 0, #X Kalkulierter Verkaufspreis
- # "AchievedSalesPrice" => 0, #X Erzielter Verkaufspreis
- $tSalNr = array();
- foreach ($tA['data'] as $v){
- $SalesNumber = (!empty($v['gtin']) ? $v['gtin'] : $v['sku']);
- if(preg_match('/^([0-9]+)_/',$SalesNumber,$tP)){
- $SalesNumber = $tP[1];
- }
- if(isset($tSalNr[$SalesNumber])){
- $tSalNr[$SalesNumber]++;
- $SalesNumber.= $tSalNr[$SalesNumber];
- }else{
- $tSalNr[$SalesNumber] = 0;
- }
- #dump($SalesNumber);
- #********
- $v['CalculatedSellingPrice'] = 100.00;
- $v['AchievedSalesPrice'] = 90.00;
- $arr['SaleList'][] = array(
- "SalesLabel" => 'Ean',#$v['sku'],#X
- "SalesLabelNumber" => $SalesNumber,#X
- "SalesGoodsGroupNumber" => 0,
- "SizeDescription" => '',#"string",
- "CustomerNumber" => 0,
- "TypeOfEstate" => 0,
- "Amount" => $v['menge'],#X
- "CalculatedSellingPrice" => $v['CalculatedSellingPrice'], #X Kalkulierter Verkaufspreis
- "AchievedSalesPrice" => $v['AchievedSalesPrice'], #X Erzielter Verkaufspreis
- "TransactionType" => "Sale", #X Die Vorgangsart Sale=Verkauf Exchange=Umtausch / Storno
- "ReceiptNumber" => 0, #Die Belegnummer
- "DateOfSale" => $tA['orderdate'],#X das Verkaufsdatum mit Verkaufszeit
- "PaymentMethod" => 'Invoice',#X "CreditCard",
- "Currency" => 'EUR',#X "string",
- "Unit" => "Piece",#X
- "DistributionChannel" => 'JTL',#"string"
- );
+ #dd($order->getData());
+ #dd(array(
+ # 'orderdate'=> $tA['orderdate'],
+ # 'time'=> strtotime($tA['orderdate']),
+ # 'gmdate '=> gmdate ('d-m-Y\TH:i:s.v\Z',strtotime($tA['orderdate'])),
+ #));
+ #*** Umkonvertieren des Datumstings *****************
+ $tA['orderdate'] = gmdate('Y-m-d\TH:i:s.v\Z', strtotime($tA['orderdate']));
+ #****
+ $arr = array(
+ 'SalesDate' => $tA['orderdate'],
+ "BranchNumber" => 8, #Die Filialnummer
+ "ShopNumber" => 1, #Die Shopnummer
+ "DistributionChannel" => 5, #Der Vertriebskanal
+ 'SaleList' => array(),
+ 'CustomerList' => array(),
+ );
+ #*** Items ***************
+ if (!empty($tA['data']) && is_array($tA['data'])) {
+ # Noch nötig
+ # "CalculatedSellingPrice" => 0, #X Kalkulierter Verkaufspreis
+ # "AchievedSalesPrice" => 0, #X Erzielter Verkaufspreis
+ $tSalNr = array();
+ foreach ($tA['data'] as $v) {
+ $SalesNumber = (!empty($v['gtin']) ? $v['gtin'] : $v['sku']);
+ if (preg_match('/^([0-9]+)_/', $SalesNumber, $tP)) {
+ $SalesNumber = $tP[1];
+ }
+ if (isset($tSalNr[$SalesNumber])) {
+ $tSalNr[$SalesNumber]++;
+ $SalesNumber .= $tSalNr[$SalesNumber];
+ } else {
+ $tSalNr[$SalesNumber] = 0;
+ }
+ #dump($SalesNumber);
+ #********
+ $v['CalculatedSellingPrice'] = 100.00;
+ $v['AchievedSalesPrice'] = 90.00;
+ $arr['SaleList'][] = array(
+ "SalesLabel" => 'Ean',#$v['sku'],#X
+ "SalesLabelNumber" => $SalesNumber,#X
+ "SalesGoodsGroupNumber" => 0,
+ "SizeDescription" => '',#"string",
+ "CustomerNumber" => 0,
+ "TypeOfEstate" => 0,
+ "Amount" => $v['menge'],#X
+ "CalculatedSellingPrice" => $v['CalculatedSellingPrice'], #X Kalkulierter Verkaufspreis
+ "AchievedSalesPrice" => $v['AchievedSalesPrice'], #X Erzielter Verkaufspreis
+ "TransactionType" => "Sale", #X Die Vorgangsart Sale=Verkauf Exchange=Umtausch / Storno
+ "ReceiptNumber" => 0, #Die Belegnummer
+ "DateOfSale" => $tA['orderdate'],#X das Verkaufsdatum mit Verkaufszeit
+ "PaymentMethod" => 'Invoice',#X "CreditCard",
+ "Currency" => 'EUR',#X "string",
+ "Unit" => "Piece",#X
+ "DistributionChannel" => 'JTL',#"string"
+ );
- }
- }
- #*** Kundne *******************************
- $arr['CustomerList'][] = array(
- "CustomerNumber" => 99999, # Fake Daten
- "Surname" => 'MAX',#"string",
- "Forename" => 'MUSTERMANN',#"string",
- "AddressCity" => 'ERFURT',#"string",
- "AddressZipCode" => '99084',"string",
- "AddressStreet" => 'MusterStrasse 22',#"string",
- "AddressCountry" => 'DE',#"string",
- #*** Nicht nötig
- #"CardNumber" => 0,
- #"SalutionNumber" => 0,
- #"PostOfficeBox" => '',#"string",
- #"PostOfficeBoxZipCode" => '',#"string",
- #"Title" => '',#"string",
- #"PhoneNumber1" => '',#"string",
- #"PhoneNumber2" => '',#"string",
- #"FaxNumber" => '',#"string",
- #"BirthDay" => '',#"2023-09-14T11:54:26.708Z",
- #"Gender" => 'Male',
- #"EmailAddress" => '',#"string",
- #"Discount" => 0,
- #"Limit" => 0,
- #"LockMark" => 'Unblocked',
- #"DubiousMark" => 'Undubious',
- #"DubiousText" => '',#"string",
- #"DirectDebit" => '',#true,
- #"BankName1" => '',#"string",
- #"BankAccountNumber1" => '',#"string",
- #"BankCodeNumber1" => '',#"string",
- #"BankName2" => '',#"string",
- #"BankAccountNumber2" => '',#"string",
- #"BankCodeNumber2" => '',#"string",
- #"BankName3" => '',#"string",
- #"BankAccountNumber3" => '',#"string",
- #"BankCodeNumber3" => '',#"string",
- #"CreditcardNumber1" => '',#"string",
- #"CreditcardNumber2" => '',#"string",
- #"CreditcardNumber3" => '',#"string",
- #"CreditcardNumber4" => '',#"string",
- #"ChangeIndicator" => '',#true,
- #"Newsletter" => '',#true,
- #"Password" => '',#"string",
- #"AdBan" => '',#true
- );
- $data = $this->hiltes->createJson($arr);
- }
+ }
+ }
+ #*** Kundne *******************************
+ $arr['CustomerList'][] = array(
+ "CustomerNumber" => 99999, # Fake Daten
+ "Surname" => 'MAX',#"string",
+ "Forename" => 'MUSTERMANN',#"string",
+ "AddressCity" => 'ERFURT',#"string",
+ "AddressZipCode" => '99084', "string",
+ "AddressStreet" => 'MusterStrasse 22',#"string",
+ "AddressCountry" => 'DE',#"string",
+ #*** Nicht nötig
+ #"CardNumber" => 0,
+ #"SalutionNumber" => 0,
+ #"PostOfficeBox" => '',#"string",
+ #"PostOfficeBoxZipCode" => '',#"string",
+ #"Title" => '',#"string",
+ #"PhoneNumber1" => '',#"string",
+ #"PhoneNumber2" => '',#"string",
+ #"FaxNumber" => '',#"string",
+ #"BirthDay" => '',#"2023-09-14T11:54:26.708Z",
+ #"Gender" => 'Male',
+ #"EmailAddress" => '',#"string",
+ #"Discount" => 0,
+ #"Limit" => 0,
+ #"LockMark" => 'Unblocked',
+ #"DubiousMark" => 'Undubious',
+ #"DubiousText" => '',#"string",
+ #"DirectDebit" => '',#true,
+ #"BankName1" => '',#"string",
+ #"BankAccountNumber1" => '',#"string",
+ #"BankCodeNumber1" => '',#"string",
+ #"BankName2" => '',#"string",
+ #"BankAccountNumber2" => '',#"string",
+ #"BankCodeNumber2" => '',#"string",
+ #"BankName3" => '',#"string",
+ #"BankAccountNumber3" => '',#"string",
+ #"BankCodeNumber3" => '',#"string",
+ #"CreditcardNumber1" => '',#"string",
+ #"CreditcardNumber2" => '',#"string",
+ #"CreditcardNumber3" => '',#"string",
+ #"CreditcardNumber4" => '',#"string",
+ #"ChangeIndicator" => '',#true,
+ #"Newsletter" => '',#true,
+ #"Password" => '',#"string",
+ #"AdBan" => '',#true
+ );
+ $data = $this->hiltes->createJson($arr);
+ }
$this->hiltes->sendOrderToHiltes($data);
diff --git a/src/Command/HiltesImportCommand.php b/src/Command/HiltesImportCommand.php
index e3bdef5..6471951 100644
--- a/src/Command/HiltesImportCommand.php
+++ b/src/Command/HiltesImportCommand.php
@@ -10,14 +10,11 @@ use App\Repository\WarehouseRepository;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\Finder\Finder;
-
#[AsCommand(
name: 'hiltes:import',
description: 'Importiert die Bestandsdaten von Hiltes',
@@ -28,11 +25,12 @@ class HiltesImportCommand extends Command
private $warehouseRepository;
private $productRepository;
private $logger;
+
public function __construct(
- ProductRepository $productRepository,
- StockRepository $stockRepository,
+ ProductRepository $productRepository,
+ StockRepository $stockRepository,
WarehouseRepository $warehouseRepository,
- LoggerInterface $logger
+ LoggerInterface $logger
)
{
$this->productRepository = $productRepository;
@@ -41,6 +39,7 @@ class HiltesImportCommand extends Command
$this->logger = $logger;
parent::__construct();
}
+
protected function configure(): void
{
$this->addOption('delta', 'd', InputOption::VALUE_NONE, 'Delta Import');
@@ -52,22 +51,22 @@ class HiltesImportCommand extends Command
$io->success('Start Hiltes Import');
- /**
- * @var HiltesImport
- */
- $hiltesImport = new HiltesImport($this->productRepository,$this->warehouseRepository,$this->stockRepository,$this->logger);
+ /**
+ * @var HiltesImport
+ */
+ $hiltesImport = new HiltesImport($this->productRepository, $this->warehouseRepository, $this->stockRepository, $this->logger);
$r = $hiltesImport->startImport($input->getOption('delta'));
- if(isset($r['error'])){
+ if (isset($r['error'])) {
$io->error($r['text']);
$this->logger->error($r['text']);
return Command::FAILURE;
- }else{
+ } else {
$io->info('Start Hiltes Push JTL');
- $jtl = new Jtl($this->productRepository,$this->warehouseRepository,$this->stockRepository,$this->logger);
+ $jtl = new Jtl($this->productRepository, $this->warehouseRepository, $this->stockRepository, $this->logger);
$jtl->createExportFile($jtl->getProducts());
$io->success('Done.');
diff --git a/src/Command/JtlExportCommand.php b/src/Command/JtlExportCommand.php
index 95abcc3..857067a 100644
--- a/src/Command/JtlExportCommand.php
+++ b/src/Command/JtlExportCommand.php
@@ -26,11 +26,12 @@ class JtlExportCommand extends Command
private $warehouseRepository;
private $productRepository;
private $logger;
+
public function __construct(
- ProductRepository $productRepository,
- StockRepository $stockRepository,
+ ProductRepository $productRepository,
+ StockRepository $stockRepository,
WarehouseRepository $warehouseRepository,
- LoggerInterface $logger
+ LoggerInterface $logger
)
{
$this->productRepository = $productRepository;
@@ -44,8 +45,7 @@ class JtlExportCommand extends Command
{
$this
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description')
- ->addOption('option1', null, InputOption::VALUE_NONE, 'Option description')
- ;
+ ->addOption('option1', null, InputOption::VALUE_NONE, 'Option description');
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -68,13 +68,12 @@ class JtlExportCommand extends Command
/**
* @var HiltesImport
*/
- $jtl = new Jtl($this->productRepository,$this->warehouseRepository,$this->stockRepository,$this->logger);
+ $jtl = new Jtl($this->productRepository, $this->warehouseRepository, $this->stockRepository, $this->logger);
$data = $jtl->getProducts();
$jtl->createExportFile($data);
-
$io->success('Ende JTL Export');
return Command::SUCCESS;
diff --git a/src/Command/JtlImportCommand.php b/src/Command/JtlImportCommand.php
index a651571..f188e8a 100644
--- a/src/Command/JtlImportCommand.php
+++ b/src/Command/JtlImportCommand.php
@@ -11,7 +11,6 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Notifier\Chatter;
use Symfony\Component\Notifier\Message\ChatMessage;
-use Symfony\Component\Notifier\ChatterInterface;
use Symfony\Component\Notifier\Transport;
#[AsCommand(
@@ -24,8 +23,7 @@ class JtlImportCommand extends Command
{
$this
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description')
- ->addOption('option1', null, InputOption::VALUE_NONE, 'Option description')
- ;
+ ->addOption('option1', null, InputOption::VALUE_NONE, 'Option description');
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -50,7 +48,6 @@ class JtlImportCommand extends Command
->transport('slack');
-
$sentMessage = $chatter->send($message);
$io->success('You have a new command! Now make it your own! Pass --help to see your options.');
diff --git a/src/Controller/OrdersController.php b/src/Controller/OrdersController.php
deleted file mode 100644
index c884166..0000000
--- a/src/Controller/OrdersController.php
+++ /dev/null
@@ -1,40 +0,0 @@
-logger = $logger;
- $this->ordersRepository = $ordersRepository;
- }
-
-
- public function getOrders(): Orders
- {
- $this->logger->info('I just got the logger');
-
- $orders = $this->ordersRepository->findAll();
-
-
- return $orders->getData();
- }
-
-}
diff --git a/src/Entity/Order.php b/src/Entity/Order.php
index ab84e4c..9b7027b 100644
--- a/src/Entity/Order.php
+++ b/src/Entity/Order.php
@@ -2,8 +2,10 @@
namespace App\Entity;
+use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\OrderRepository;
+use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
@@ -14,6 +16,7 @@ use Doctrine\ORM\Mapping as ORM;
* 2 = Bestellung in Bearbeitung
* 3 = Bestellung versendet
*/
+
#[ORM\Entity(repositoryClass: OrderRepository::class)]
#[ORM\Table(name: '`order`')]
#[ApiResource]
@@ -22,9 +25,12 @@ class Order
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
+ #[ApiProperty(identifier: false)]
private ?int $id = null;
- #[ORM\Column(length: 255)]
+ #[ORM\Column(length: 255,unique: true)]
+ #[ApiProperty(identifier: true)]
+
private ?string $orderId = null;
#[ORM\Column]
@@ -33,8 +39,8 @@ class Order
#[ORM\Column]
private array $data = [];
- #[ORM\Column(name: 'change_date',type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
- private ?\DateTimeInterface $changeDate = null;
+ #[ORM\Column(name: 'change_date', type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
+ private ?DateTimeInterface $changeDate = null;
public function getId(): ?int
{
@@ -77,12 +83,12 @@ class Order
return $this;
}
- public function getChangeDate(): ?\DateTimeInterface
+ public function getChangeDate(): ?DateTimeInterface
{
return $this->changeDate;
}
- public function setChangeDate(\DateTimeInterface $changeDate): static
+ public function setChangeDate(DateTimeInterface $changeDate): static
{
$this->changeDate = $changeDate;
diff --git a/src/Entity/Product.php b/src/Entity/Product.php
index b294424..fef833a 100644
--- a/src/Entity/Product.php
+++ b/src/Entity/Product.php
@@ -4,7 +4,7 @@ namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\ProductRepository;
-use App\Repository\StockRepository;
+use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
@@ -21,7 +21,7 @@ class Product
private ?string $gtin = null;
#[ORM\Column(name: 'update_time', type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
- private ?\DateTimeInterface $updateTime = null;
+ private ?DateTimeInterface $updateTime = null;
public function getId(): ?int
@@ -41,12 +41,12 @@ class Product
return $this;
}
- public function getUpdateTime(): ?\DateTimeInterface
+ public function getUpdateTime(): ?DateTimeInterface
{
return $this->updateTime;
}
- public function setUpdateTime(\DateTimeInterface $updateTime): self
+ public function setUpdateTime(DateTimeInterface $updateTime): self
{
$this->updateTime = $updateTime;
diff --git a/src/Entity/Stock.php b/src/Entity/Stock.php
index 55b05ca..dbbb93d 100644
--- a/src/Entity/Stock.php
+++ b/src/Entity/Stock.php
@@ -3,16 +3,17 @@
namespace App\Entity;
use App\Repository\StockRepository;
-#use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
-
+use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
+#use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+
#[ORM\Entity(repositoryClass: StockRepository::class)]
#[ORM\UniqueEntity(['warehouse_id', 'product_id'])]
#[ORM\UniqueConstraint(
- name: 'UNIQ_D34A04ADDCD6110',
- columns: ['warehouse_id', 'product_id']
+ name: 'UNIQ_D34A04ADDCD6110',
+ columns: ['warehouse_id', 'product_id']
)]
class Stock
{
@@ -29,19 +30,19 @@ class Stock
#[ORM\ManyToOne(inversedBy: 'stocks')]
private ?Warehouse $warehouse = null;
- #[ORM\Column(name: 'update_time',type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
- private ?\DateTimeInterface $update_time = null;
-
+ #[ORM\Column(name: 'update_time', type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
+ private ?DateTimeInterface $update_time = null;
public function getId(): ?int
{
return $this->id;
}
+
public function setId(int $id): ?self
{
$this->id = $id;
- return $this;
+ return $this;
}
public function getInstock(): ?int
@@ -55,6 +56,7 @@ class Stock
return $this;
}
+
public function getProductId(): ?int
{
return $this->product_id;
@@ -66,6 +68,7 @@ class Stock
return $this;
}
+
public function getWarehouseId(): ?int
{
return $this->warehouse_id;
@@ -112,12 +115,12 @@ class Stock
return $this;
}
- public function getUpdateTime(): ?\DateTimeInterface
+ public function getUpdateTime(): ?DateTimeInterface
{
return $this->update_time;
}
- public function setUpdateTime(?\DateTimeInterface $update_time): self
+ public function setUpdateTime(?DateTimeInterface $update_time): self
{
$this->update_time = $update_time;
diff --git a/src/Entity/Warehouse.php b/src/Entity/Warehouse.php
index ba0ee8e..04c0e1d 100644
--- a/src/Entity/Warehouse.php
+++ b/src/Entity/Warehouse.php
@@ -33,6 +33,7 @@ class Warehouse
{
return $this->id;
}
+
public function setId(int $id): self
{
$this->id = $id;
@@ -92,4 +93,4 @@ class Warehouse
return $this;
}
-}
+}
\ No newline at end of file
diff --git a/src/EventSubscriber/SlackNotifySubscriber.php b/src/EventSubscriber/SlackNotifySubscriber.php
index 289336e..dae0ce1 100644
--- a/src/EventSubscriber/SlackNotifySubscriber.php
+++ b/src/EventSubscriber/SlackNotifySubscriber.php
@@ -3,16 +3,15 @@
namespace App\EventSubscriber;
use ApiPlatform\Symfony\EventListener\EventPriorities;
+use App\Entity\Order;
use App\Helper\Hiltes;
use App\Helper\Slack;
-use App\Entity\Order;
use Maknz\Slack\Client;
use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\KernelEvents;
-use Symfony\Component\Notifier\ChatterInterface;
class SlackNotifySubscriber implements EventSubscriberInterface
@@ -26,7 +25,7 @@ class SlackNotifySubscriber implements EventSubscriberInterface
private $hiltes;
- public function __construct(string $slackWebhookUrl, LoggerInterface $logger, Hiltes $hiltes)
+ public function __construct(string $slackWebhookUrl, LoggerInterface $logger, Hiltes $hiltes)
{
$this->slackWebhookUrl = $slackWebhookUrl;
$this->logger = $logger;
@@ -58,29 +57,29 @@ class SlackNotifySubscriber implements EventSubscriberInterface
$order = $event->getControllerResult();
$method = $event->getRequest()->getMethod();
- //wenn es keine Bestellung ist oder es kein POST Request ist, dann return
- if (!$order instanceof Order || Request::METHOD_POST !== $method) {
+ //wenn es keine Bestellung ist oder es kein POST Request ist, dann return
+ if (!$order instanceof Order || Request::METHOD_POST !== $method) {
return;
- }
+ }
- $msg = "Bestellung {$order->getOrderId()}: \n";
+ $msg = "Bestellung {$order->getOrderId()}: \n";
- foreach($order->getData() as $item) {
- if($item['menge'] > 0 && strlen($item['sku']) > 0) {
- $msg .= $item['name'];
- $msg .= ' '.$item['sku'];
- $msg .= ' Menge: '.$item['menge']."\n";
- }
- }
+ foreach ($order->getData() as $item) {
+ if ($item['menge'] > 0 && strlen($item['sku']) > 0) {
+ $msg .= $item['name'];
+ $msg .= ' ' . $item['sku'];
+ $msg .= ' Menge: ' . $item['menge'] . "\n";
+ }
+ }
- if($order->getStatus() == 1) {
- $slack->from('CDS-Notify')
- ->send($msg);
- }elseif($order->getStatus() == 2){
+ if ($order->getStatus() == 1) {
+ $slack->from('CDS-Notify')
+ ->send($msg);
+ } elseif ($order->getStatus() == 2) {
//Send to Hiltes
- $this->hiltes->createRequest($order);
- }else{
- $this->logger->error('Status ist nicht 1 oder 2');
- }
+ $this->hiltes->createRequest($order);
+ } else {
+ $this->logger->error('Status ist nicht 1 oder 2');
+ }
}
}
\ No newline at end of file
diff --git a/src/Helper/Ftp.php b/src/Helper/Ftp.php
index 8c2ba5f..c0757a0 100644
--- a/src/Helper/Ftp.php
+++ b/src/Helper/Ftp.php
@@ -3,6 +3,8 @@
namespace App\Helper;
+use Exception;
+
class Ftp
{
private string $host;
@@ -23,6 +25,55 @@ class Ftp
}
+ /**
+ * Uploads a local file to a remote FTP server.
+ *
+ * @param string $localFile The local file path to upload.
+ *
+ * @return void
+ * @throws Exception If the upload fails or encounters an error.
+ *
+ */
+ public function uploadFile(string $localFile): void
+ {
+ $ftp = ftp_ssl_connect($this->getHost(), $this->getPort());
+
+ if (!$ftp) {
+ throw new Exception("Failed to connect to FTP server");
+ }
+
+ $ftp_login = ftp_login($ftp, $this->getUser(), $this->getPassword());
+
+ if (!$ftp_login) {
+ throw new Exception("FTP login failed");
+ }
+
+ ftp_pasv($ftp, true);
+
+ $remoteFile = 'stock_hiltes.csv';
+
+ if (!file_exists($localFile)) {
+ throw new Exception("Local file does not exist: $localFile");
+ }
+
+ $r = ftp_nb_put($ftp, $this->getRemoteDir() . $remoteFile, $localFile, FTP_BINARY);
+
+ while ($r == FTP_MOREDATA) {
+ // Continue uploading...
+ $r = ftp_nb_continue($ftp);
+ }
+
+ if ($r != FTP_FINISHED) {
+ throw new Exception("File upload failed");
+ }
+
+ ftp_close($ftp);
+
+ if (!unlink($localFile)) {
+ throw new Exception("Failed to delete local file: $localFile");
+ }
+ }
+
public function getHost(): string
{
return $this->host;
@@ -32,6 +83,7 @@ class Ftp
{
$this->host = $host;
}
+
public function getPort(): int
{
return $this->port;
@@ -71,53 +123,4 @@ class Ftp
{
$this->remoteDir = $remoteDir;
}
-
- /**
- * Uploads a local file to a remote FTP server.
- *
- * @param string $localFile The local file path to upload.
- *
- * @throws \Exception If the upload fails or encounters an error.
- *
- * @return void
- */
- public function uploadFile(string $localFile): void
- {
- $ftp = ftp_ssl_connect($this->getHost(), $this->getPort());
-
- if (!$ftp) {
- throw new \Exception("Failed to connect to FTP server");
- }
-
- $ftp_login = ftp_login($ftp, $this->getUser(), $this->getPassword());
-
- if (!$ftp_login) {
- throw new \Exception("FTP login failed");
- }
-
- ftp_pasv($ftp, true);
-
- $remoteFile = 'stock_hiltes.csv';
-
- if (!file_exists($localFile)) {
- throw new \Exception("Local file does not exist: $localFile");
- }
-
- $r = ftp_nb_put($ftp, $this->getRemoteDir() . $remoteFile, $localFile, FTP_BINARY);
-
- while ($r == FTP_MOREDATA) {
- // Continue uploading...
- $r = ftp_nb_continue($ftp);
- }
-
- if ($r != FTP_FINISHED) {
- throw new \Exception("File upload failed");
- }
-
- ftp_close($ftp);
-
- if (!unlink($localFile)) {
- throw new \Exception("Failed to delete local file: $localFile");
- }
- }
}
\ No newline at end of file
diff --git a/src/Helper/Hiltes.php b/src/Helper/Hiltes.php
index c326e08..935c618 100644
--- a/src/Helper/Hiltes.php
+++ b/src/Helper/Hiltes.php
@@ -4,7 +4,6 @@ namespace App\Helper;
use App\Entity\Order;
use App\Repository\OrderRepository;
-use Doctrine\Common\Collections\Criteria;
use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
@@ -97,8 +96,8 @@ class Hiltes
if ($order) {
- //foreach ($orders as $order) {
- // if ($order->getStatus() > 0) continue;
+ //foreach ($orders as $order) {
+ // if ($order->getStatus() > 0) continue;
$tA = $order->getData();#json_decode($order->getData());
#$tA['orderdate'] = "2023-08-30T12:05:24.000Z";
@@ -211,7 +210,7 @@ class Hiltes
dd($arr);
$data = $this->createJson($arr);
- // }
+ // }
return $this->sendOrderToHiltes($data);
diff --git a/src/Helper/HiltesImport.php b/src/Helper/HiltesImport.php
index ea52a57..8c52b8c 100644
--- a/src/Helper/HiltesImport.php
+++ b/src/Helper/HiltesImport.php
@@ -9,118 +9,122 @@ use App\Entity\Warehouse;
use App\Repository\ProductRepository;
use App\Repository\StockRepository;
use App\Repository\WarehouseRepository;
+use Exception;
use Psr\Log\LoggerInterface;
+use RuntimeException;
+use SplFileObject;
use Symfony\Component\Finder\Finder;
class HiltesImport
{
+ protected $currentDirPath;
+ protected $cachedWarehouseIds;
+ protected $arrData = array();
private $productRepository;
- private $stockRepository;
+ private $stockRepository;
private $warehouseRepository;
private $logger;
- protected $currentDirPath;
- protected $cachedWarehouseIds;
- private $cachedProdIds;
- private $cachedStockIds;
- protected $arrData = array();
+ private $cachedProdIds;
+ private $cachedStockIds;
- public function __construct(ProductRepository $productRepository,WarehouseRepository $warehouseRepository,StockRepository $stockRepository, LoggerInterface $logger)
- {
+ public function __construct(ProductRepository $productRepository, WarehouseRepository $warehouseRepository, StockRepository $stockRepository, LoggerInterface $logger)
+ {
$this->productRepository = $productRepository;
$this->warehouseRepository = $warehouseRepository;
- $this->stockRepository = $stockRepository;
+ $this->stockRepository = $stockRepository;
$this->logger = $logger;
- $this->currentDirPath = getcwd();
- }
+ $this->currentDirPath = getcwd();
+ }
/**
* @return array|void
*/
- public function startImport($delta = false)
- {
- #*** Holt alle Dateien
- if($this->getFiles($delta)){
- #*** Holt alle Stocks und setzt ein Array **************
- $this->getStocks();
+ public function startImport($delta = false)
+ {
+ #*** Holt alle Dateien
+ if ($this->getFiles($delta)) {
+ #*** Holt alle Stocks und setzt ein Array **************
+ $this->getStocks();
$count = 0;
- if(!empty($this->arrData['orgFiles']['data']) && count($this->arrData['orgFiles']['data'])){
- foreach ($this->arrData['orgFiles']['data'] as $file) {
+ if (!empty($this->arrData['orgFiles']['data']) && count($this->arrData['orgFiles']['data'])) {
+ foreach ($this->arrData['orgFiles']['data'] as $file) {
- if(is_file($file['realPath'])){
- $count += $this->loadFiles($file['realPath']);
- }else{
- throw new \RuntimeException("Error: File not found - " . $file['realPath']);
+ if (is_file($file['realPath'])) {
+ $count += $this->loadFiles($file['realPath']);
+ } else {
+ throw new RuntimeException("Error: File not found - " . $file['realPath']);
}
}
$this->logger->info("Imported $count stocks");
} else {
$this->logger->info('No Files');
- }
+ }
} else {
- throw new \RuntimeException('Error in getFiles or no file WS.FERTIG');
+ throw new RuntimeException('Error in getFiles or no file WS.FERTIG');
}
- }
+ }
/**
* @return bool
*/
- protected function getFiles($delta = false)
- {
- $finder = Finder::create();
- $finder
- ->in($this->currentDirPath.'/hiltes/h2c/')
- ->depth(0);
+ protected function getFiles($delta = false)
+ {
+ $finder = Finder::create();
+ $finder
+ ->in($this->currentDirPath . '/hiltes/h2c/')
+ ->depth(0);
- if($delta) {
+ if ($delta) {
$finder->name('/_D/');
- }else{
+ } else {
$finder->notName('/_D/');
}
- if ($finder->hasResults()) {
- foreach ($finder as $file) {
- if($file->getExtension() != 'Ende') {
+ if ($finder->hasResults()) {
+ foreach ($finder as $file) {
+ if ($file->getExtension() != 'Ende') {
//prüfen ob Ende Datei vorhanden ist
- if(file_exists($this->currentDirPath.'/hiltes/h2c/'.$file->getRelativePathname().'.Ende')) {
+ if (file_exists($this->currentDirPath . '/hiltes/h2c/' . $file->getRelativePathname() . '.Ende')) {
$this->arrData['orgFiles']['data'][] = array(
- 'realPath' => $file->getRealPath(),
- 'fileSize' => $file->getFileInfo()->getSize(),
- 'onlyFileName' => $file->getRelativePathname(),
+ 'realPath' => $file->getRealPath(),
+ 'fileSize' => $file->getFileInfo()->getSize(),
+ 'onlyFileName' => $file->getRelativePathname(),
);
}
}
- }
- }else{
- return false;
- }
+ }
+ } else {
+ return false;
+ }
return true;
- }
- protected function getStocks()
- {
+ }
+
+ protected function getStocks()
+ {
$stocks = $this->stockRepository->findAll();
foreach ($stocks as $stock) {
$this->cachedStockIds[$stock->getProductId()][$stock->getWarehouse()->getId()] = $stock;
- }
- }
+ }
+ }
- protected function loadFiles($srcFile)
- {
+ protected function loadFiles($srcFile)
+ {
try {
- $file = new \SplFileObject($srcFile);
+ $file = new SplFileObject($srcFile);
$this->logger->info('Starte Import von ' . $file->getRealPath());
$count = 0;
while (!$file->eof()) {
$this->processLine($file->fgets());
$count++;
- }
- }catch (\Exception $e) {
+ }
+ } catch (Exception $e) {
$this->logger->error($e->getMessage());
}
@@ -130,7 +134,7 @@ class HiltesImport
$this->logger->info($count . ' Datensätze importiert');
return $count;
- }
+ }
protected function processLine($line)
{
@@ -139,15 +143,15 @@ class HiltesImport
if (!empty($data[0])) {
$this->trimArray($data);
$this->saveData($data);
- }
- }
+ }
+ }
protected function trimArray(array &$arr)
{
- foreach ($arr as $k=>$v) {
- $arr[$k] = trim($v);
- }
- }
+ foreach ($arr as $k => $v) {
+ $arr[$k] = trim($v);
+ }
+ }
protected function saveData(array $data)
{
@@ -156,63 +160,64 @@ class HiltesImport
if (!empty($warehouse) && !empty($this->cachedStockIds[$gtin][$warehouse->getId()])) {
$stock = $this->cachedStockIds[$gtin][$warehouse->getId()];
- }else{
- $stock = new Stock();
- $stock->setProductId($gtin);
+ } else {
+ $stock = new Stock();
+ $stock->setProductId($gtin);
$stock->setWarehouse($warehouse);
- }
+ }
- $stock->setInstock((int) $data[1] / 100);
- $this->stockRepository->save($stock,true);
- }
+ $stock->setInstock((int)$data[1] / 100);
+ $this->stockRepository->save($stock, true);
+ }
private function checkWarehouseName(string $warehouseName)
{
$warehouseName = ltrim($warehouseName, 0);
if (empty($this->cachedWarehouseIds[$warehouseName])) {
- $warehouse = $this->warehouseRepository->findOneBy(['id' => (int) $warehouseName]);
+ $warehouse = $this->warehouseRepository->findOneBy(['id' => (int)$warehouseName]);
if (empty($warehouse)) {
- $warehouse = new Warehouse();
- $warehouse->setId((int) $warehouseName);
+ $warehouse = new Warehouse();
+ $warehouse->setId((int)$warehouseName);
$warehouse->setName($warehouseName);
- $this->warehouseRepository->save($warehouse,true);
+ $this->warehouseRepository->save($warehouse, true);
$this->cachedWarehouseIds[$warehouseName] = $warehouse;
- }else{
+ } else {
$this->cachedWarehouseIds[$warehouseName] = $warehouse;
}
- }
+ }
if (!empty($this->cachedWarehouseIds[$warehouseName])) {
return $this->cachedWarehouseIds[$warehouseName];
- }
+ }
- return false;
- }
+ return false;
+ }
/**
* @param string $gtin
* @return false|int|mixed|null
*/
- private function checkProduct(string $gtin){
- #*** WEnn keine geCached Id Vorhanden
- if(empty($this->cachedProdIds[$gtin])){
+ private function checkProduct(string $gtin)
+ {
+ #*** WEnn keine geCached Id Vorhanden
+ if (empty($this->cachedProdIds[$gtin])) {
$product = $this->productRepository->findOneBy(['gtin' => $gtin]);
if (empty($product)) {
$product = new Product();
$product->setGtin($gtin);
$this->cachedProdIds[$gtin] = $this->productRepository->save($product, true);
- }else{
+ } else {
$this->cachedProdIds[$gtin] = $product->getId();
}
- }
-
- if (!empty($this->cachedProdIds[$gtin])) {
- return $this->cachedProdIds[$gtin];
}
- return false;
- }
+ if (!empty($this->cachedProdIds[$gtin])) {
+ return $this->cachedProdIds[$gtin];
+ }
+
+ return false;
+ }
}
\ No newline at end of file
diff --git a/src/Helper/Jtl.php b/src/Helper/Jtl.php
index f4f37f3..98b7817 100644
--- a/src/Helper/Jtl.php
+++ b/src/Helper/Jtl.php
@@ -5,8 +5,10 @@ namespace App\Helper;
use App\Repository\ProductRepository;
use App\Repository\StockRepository;
use App\Repository\WarehouseRepository;
-use Psr\Log\LoggerInterface;
+use ArrayIterator;
+use Exception;
use League\Csv\Writer;
+use Psr\Log\LoggerInterface;
class Jtl
@@ -28,7 +30,7 @@ class Jtl
10 => 'Lager 10 - OJ EF',
);
- public function __construct(ProductRepository $productRepository,WarehouseRepository $warehouseRepository,StockRepository $stockRepository, LoggerInterface $logger)
+ public function __construct(ProductRepository $productRepository, WarehouseRepository $warehouseRepository, StockRepository $stockRepository, LoggerInterface $logger)
{
$this->productRepository = $productRepository;
$this->warehouseRepository = $warehouseRepository;
@@ -47,31 +49,31 @@ class Jtl
$data = array();
- foreach($r as $product){
- $stock = $this->stockRepository->findBy(['product_id'=>$product->getId()]);
+ foreach ($r as $product) {
+ $stock = $this->stockRepository->findBy(['product_id' => $product->getId()]);
- if($stock){
- foreach($stock as $s){
+ if ($stock) {
+ foreach ($stock as $s) {
$warehouse = $s->getWarehouse();
$warehouseName = $warehouse->getName();
- $data[$product->getId().$warehouseName] = [
+ $data[$product->getId() . $warehouseName] = [
'gtin' => $product->getGtin(),
'stock' => $s->getInstock(),
'warehouse' => $this->arrLager[$warehouseName] ?? 'Lager ' . $warehouseName
];
}
- }else{
+ } else {
$data[$product->getId()] = [
'gtin' => $product->getGtin(),
'stock' => 0,
'warehouse' => 0
];
- $this->logger->info('No stock for product '.$product->getId());
+ $this->logger->info('No stock for product ' . $product->getId());
}
- // dump($data);
+ // dump($data);
}
@@ -86,22 +88,20 @@ class Jtl
public function createExportFile($data): void
{
try {
- $writer = Writer::createFromPath(getcwd().'/jtl/cds-export.csv', 'w+');
- $bytes = $writer->insertAll(new \ArrayIterator($data));
+ $writer = Writer::createFromPath(getcwd() . '/jtl/cds-export.csv', 'w+');
+ $bytes = $writer->insertAll(new ArrayIterator($data));
- if($bytes){
- $this->logger->info('Exported '.$bytes.' bytes');
+ if ($bytes) {
+ $this->logger->info('Exported ' . $bytes . ' bytes');
$FTP = new Ftp();
- $FTP->uploadFile(getcwd().'/jtl/cds-export.csv');
+ $FTP->uploadFile(getcwd() . '/jtl/cds-export.csv');
}
- }catch (\Exception $e){
+ } catch (Exception $e) {
$this->logger->error($e->getMessage());
}
}
-
-
}
\ No newline at end of file
diff --git a/src/Helper/Slack.php b/src/Helper/Slack.php
index 6cab4e9..4b5b9e7 100644
--- a/src/Helper/Slack.php
+++ b/src/Helper/Slack.php
@@ -2,7 +2,6 @@
namespace App\Helper;
-use Symfony\Component\Notifier\Chatter;
use Symfony\Component\Notifier\ChatterInterface;
use Symfony\Component\Notifier\Exception\TransportExceptionInterface;
use Symfony\Component\Notifier\Message\ChatMessage;
@@ -16,7 +15,7 @@ class Slack
$this->chatter = $chatter;
}
- public function sendMessage(String $message): void
+ public function sendMessage(string $message): void
{
$message = (new ChatMessage($message))
->transport('slack');
diff --git a/src/Repository/OrderRepository.php b/src/Repository/OrderRepository.php
index b01df00..573a241 100644
--- a/src/Repository/OrderRepository.php
+++ b/src/Repository/OrderRepository.php
@@ -5,6 +5,7 @@ namespace App\Repository;
use App\Entity\Order;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
+use Exception;
/**
* @extends ServiceEntityRepository
@@ -39,6 +40,22 @@ class OrderRepository extends ServiceEntityRepository
}
}
+ /**
+ * @throws Exception
+ */
+ public function update(Order $entity, bool $flush = false): void
+ {
+ $order = $this->getEntityManager()->find(Order::class, $entity->getId());
+
+ if (!$order) {
+ throw $this->createNotFoundException('Order not found: ' . $entity->getId());
+ }
+
+ if ($flush) {
+ $this->getEntityManager()->flush();
+ }
+ }
+
// /**
// * @return Order[] Returns an array of Order objects
// */
@@ -63,4 +80,11 @@ class OrderRepository extends ServiceEntityRepository
// ->getOneOrNullResult()
// ;
// }
-}
+ /**
+ * @throws Exception
+ */
+ private function createNotFoundException(string $string)
+ {
+ throw new Exception($string);
+ }
+}
\ No newline at end of file
diff --git a/src/Repository/OrdersRepository.php b/src/Repository/OrdersRepository.php
deleted file mode 100644
index c76e085..0000000
--- a/src/Repository/OrdersRepository.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
- *
- * @method Orders|null find($id, $lockMode = null, $lockVersion = null)
- * @method Orders|null findOneBy(array $criteria, array $orderBy = null)
- * @method Orders[] findAll()
- * @method Orders[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
- */
-class OrdersRepository extends ServiceEntityRepository
-{
- private ValidatorInterface $validator;
-
- public function __construct(ManagerRegistry $registry, ValidatorInterface $validator)
- {
- parent::__construct($registry, Orders::class);
- $this->validator = $validator;
- }
-
- /**
- * @param Orders $entity
- * @param bool $flush
- * @return void
- */
- public function add(Orders $entity, bool $flush = false): void
- {
-
- $errors = $this->validator->validate($entity);
- if (count($errors) > 0) {
- var_dump($errors);
- }
-
- $this->getEntityManager()->persist($entity);
-
- if ($flush) {
- $this->getEntityManager()->flush();
- }
- }
-
- /**
- * @param Orders $entity
- * @param bool $flush
- * @return void
- */
- public function update(Orders $entity, bool $flush = false): void
- {
- $order = $this->getEntityManager()->find(Orders::class, $entity->getId());
-
- if (!$order) {
- throw $this->createNotFoundException('Order not found: '.$entity->getId());
- }
- }
-
- /**
- * @param Orders $entity
- * @param bool $flush
- * @return void
- */
- public function remove(Orders $entity, bool $flush = false): void
- {
- $this->getEntityManager()->remove($entity);
-
- if ($flush) {
- $this->getEntityManager()->flush();
- }
- }
-
- /**
- * @return Orders[] Returns an array of Orders objects
- */
- public function findByStatus($status): array
- {
- return $this->createQueryBuilder('o')
- ->andWhere('o.status = :val')
- ->setParameter('val', $status)
- ->orderBy('o.id', 'ASC')
- ->setMaxResults(100)
- ->getQuery()
- ->getResult()
- ;
- }
-
- /**
- * @param $orderId
- * @return Orders|null
- * @throws \Doctrine\ORM\NonUniqueResultException
- */
- public function findOneByOrderId($orderId): ?Orders
- {
- return $this->createQueryBuilder('o')
- ->andWhere('o.order_id = :val')
- ->setParameter('val', $orderId)
- ->getQuery()
- ->getOneOrNullResult()
- ;
- }
-}
diff --git a/src/Repository/ProductRepository.php b/src/Repository/ProductRepository.php
index 2d14203..0fa91d0 100644
--- a/src/Repository/ProductRepository.php
+++ b/src/Repository/ProductRepository.php
@@ -3,6 +3,7 @@
namespace App\Repository;
use App\Entity\Product;
+use DateTime;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
@@ -24,7 +25,7 @@ class ProductRepository extends ServiceEntityRepository
public function save(Product $entity, bool $flush = false): ?int
{
- $entity->setUpdateTime(new \DateTime());
+ $entity->setUpdateTime(new DateTime());
$this->getEntityManager()->persist($entity);
@@ -68,4 +69,4 @@ class ProductRepository extends ServiceEntityRepository
// ->getOneOrNullResult()
// ;
// }
-}
+}
\ No newline at end of file
diff --git a/src/Repository/StockRepository.php b/src/Repository/StockRepository.php
index 2b77b59..e3c6da7 100644
--- a/src/Repository/StockRepository.php
+++ b/src/Repository/StockRepository.php
@@ -3,6 +3,7 @@
namespace App\Repository;
use App\Entity\Stock;
+use DateTime;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
@@ -23,7 +24,7 @@ class StockRepository extends ServiceEntityRepository
public function save(Stock $entity, bool $flush = false): void
{
- $entity->setUpdateTime(new \DateTime());
+ $entity->setUpdateTime(new DateTime());
$this->getEntityManager()->persist($entity);
diff --git a/src/Repository/WarehouseRepository.php b/src/Repository/WarehouseRepository.php
index 9f45889..d94cf3b 100644
--- a/src/Repository/WarehouseRepository.php
+++ b/src/Repository/WarehouseRepository.php
@@ -23,7 +23,7 @@ class WarehouseRepository extends ServiceEntityRepository
public function save(Warehouse $entity, bool $flush = false): ?int
{
- $entity->setPrio(0);
+ $entity->setPrio(0);
$this->getEntityManager()->persist($entity);
if ($flush) {
@@ -66,4 +66,4 @@ class WarehouseRepository extends ServiceEntityRepository
// ->getOneOrNullResult()
// ;
// }
-}
+}
\ No newline at end of file
diff --git a/src/Security/ApiKeyAuthenticator.php b/src/Security/ApiKeyAuthenticator.php
index 913d405..0abc5d8 100644
--- a/src/Security/ApiKeyAuthenticator.php
+++ b/src/Security/ApiKeyAuthenticator.php
@@ -52,7 +52,7 @@ class ApiKeyAuthenticator extends AbstractAuthenticator
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
{
- # dump($exception);
+ # dump($exception);
$data = [
'message' => $exception->getMessage()