From 41e454d75092c596b231707575c5e5df93db134d Mon Sep 17 00:00:00 2001 From: Myddleware Date: Mon, 11 Nov 2019 15:54:04 +0100 Subject: [PATCH] Release 2.5 (#226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release note Myddleware 2.5 Connector: - SageCRM: adapt code for PHP 7 - Cirrus Shield: use the upsert function - Prestashop: Add order status modification - MĂ©diaLogisitique: creation of this connector - ERPNext: fix issue with new ERPNext version: no field was displayed in the field mapping view - Possibility to change/test a connector without inserting the password again Job massaction: - Add mass data transfer deletion - Add mass data transfer restore - Add mass data transfer status modification Deletion management: - Add flag deleted on rule - Add flag deleted on document - Add flag deleted on connector - Stop displaying deleted record Search data transfer - add filter type Notification message: - Add Myddleware URL in the notification/email alert Myddleware API initialization Myddleware installation: - Add requirement for php 7.1 and 7.2 Myddleware fix/enhancement: - When a parent data transfer is filtered then we filtered the child data transfer too - Change error page 404 and 500 - Add reference field and date to document detail and list views - New table ruleParamAudit to save all rule parameter modification (reference date for example) - Refresh job message. Required when jobs run from job scheduler Template: - Create a template between Prestashop and Media Logistique Upgrade Symfony to version 3.4.31 --- .ftpquota | 1 + README.md | 10 +- app/AppKernel.php | 8 +- .../views/Exception/error404.html.twig | 10 +- .../views/Exception/error500.html.twig | 10 +- app/config/config.yml | 9 +- app/config/jwt/private.pem | 54 + app/config/jwt/public.pem | 14 + app/config/parameters.yml.dist | 2 +- app/config/public/parameters_public.yml.dist | 3 +- app/config/routing.yml | 12 + app/config/security.yml | 5 +- composer.json | 245 +-- composer.lock | 1542 ++++++++++++--- .../v1_0/Controller/DefaultController.php | 27 + .../ApiBundle/v1_0/MyddlewareApiBundle.php | 9 + .../v1_0/Resources/config/routing.yml | 11 + .../LoginBundle/Resources/config/security.yml | 24 +- .../RegleBundle/Classes/document.php | 117 +- src/Myddleware/RegleBundle/Classes/home.php | 14 +- src/Myddleware/RegleBundle/Classes/job.php | 66 +- .../RegleBundle/Classes/notification.php | 17 +- src/Myddleware/RegleBundle/Classes/rule.php | 90 +- .../RegleBundle/Classes/template.php | 22 +- .../RegleBundle/Command/RerunErrorCommand.php | 2 + .../RegleBundle/Command/TaskCommand.php | 4 +- .../RegleBundle/Command/clearDataCommand.php | 4 +- .../RegleBundle/Command/massActionCommand.php | 49 +- .../Command/notificationCommand.php | 52 +- .../Command/pruneDatabaseCommand.php | 67 + .../Controller/ConnectorController.php | 144 +- .../Controller/DefaultController.php | 131 +- .../RegleBundle/Controller/FluxController.php | 1751 +++++++++-------- .../DataFixtures/ORM/LoadSolutionData.php | 2 + .../RegleBundle/Entity/Connector.php | 31 +- .../Entity/ConnectorRepository.php | 9 +- .../RegleBundle/Entity/Document.php | 33 + .../RegleBundle/Entity/RuleParamAudit.php | 256 +++ .../RegleBundle/Form/ConnectorParamType.php | 67 +- .../RegleBundle/Resources/config/services.yml | 5 + .../images/solution/medialogistique.png | Bin 0 -> 742 bytes .../Resources/translations/messages.en.yml | 1456 +++++++------- .../Resources/translations/messages.fr.yml | 1457 +++++++------- .../views/Ajax/result_liste_inputs.html.twig | 2 +- .../Connector/edit/onglets/infos.html.twig | 2 +- .../Resources/views/Flux/list.html.twig | 34 +- .../Resources/views/Flux/view/view.html.twig | 8 +- .../RegleBundle/Service/SessionService.php | 30 + .../RegleBundle/Solutions/cirrusshield.php | 28 +- .../RegleBundle/Solutions/erpnext.php | 26 +- .../lib/medialogistique/metadata.php | 93 + .../RegleBundle/Solutions/medialogistique.php | 412 ++++ .../RegleBundle/Solutions/myddlewareapi.php | 117 ++ .../RegleBundle/Solutions/prestashop.php | 44 +- .../RegleBundle/Solutions/sagecrm.php | 2 +- .../RegleBundle/Solutions/solution.php | 5 +- ...restashop_medialogistique_create_order.yml | 97 + .../Controller/DefaultControllerTest.php | 17 + web/.htaccess | 3 + web/installMyddleware.php | 4 +- 60 files changed, 5710 insertions(+), 3056 deletions(-) create mode 100644 .ftpquota create mode 100755 app/config/jwt/private.pem create mode 100755 app/config/jwt/public.pem create mode 100644 src/Myddleware/ApiBundle/v1_0/Controller/DefaultController.php create mode 100644 src/Myddleware/ApiBundle/v1_0/MyddlewareApiBundle.php create mode 100644 src/Myddleware/ApiBundle/v1_0/Resources/config/routing.yml create mode 100644 src/Myddleware/RegleBundle/Command/pruneDatabaseCommand.php create mode 100644 src/Myddleware/RegleBundle/Entity/RuleParamAudit.php create mode 100644 src/Myddleware/RegleBundle/Resources/public/images/solution/medialogistique.png create mode 100644 src/Myddleware/RegleBundle/Solutions/lib/medialogistique/metadata.php create mode 100644 src/Myddleware/RegleBundle/Solutions/medialogistique.php create mode 100644 src/Myddleware/RegleBundle/Solutions/myddlewareapi.php create mode 100644 src/Myddleware/RegleBundle/Templates/prestashop_medialogistique_create_order.yml create mode 100644 tests/MyddlewareApiBundle/Controller/DefaultControllerTest.php diff --git a/.ftpquota b/.ftpquota new file mode 100644 index 000000000..4bb95bc37 --- /dev/null +++ b/.ftpquota @@ -0,0 +1 @@ +645 12114034 diff --git a/README.md b/README.md index 102b1e2a4..42d325f6c 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,16 @@ Myddleware 2.1 is the customisable free open-source platform that facilitates da create_rule_view -On our community website, you’ll find everything you’re looking for to master Myddleware, from step-by-step tutorials, to English and French forums. You can also tailor Myddleware to your needs by creating you custom code. Please use our github to share it. +On our community website, you’ll find everything you’re looking for to master Myddleware, from step-by-step tutorials, to English and French forums. You can also tailor Myddleware to your needs by creating you custom code. Please use our github to share it. -This community is ours : let’s all contribute, make it a friendly, helpful space where we can all find what we’re looking for! +This community is ours : let’s all contribute, make it a friendly, helpful space where we can all find what we’re looking for! -Please don’t hide any precious skills from us, whether it is coding, translation, connectors creation, .... the list goes on! The whole community could then benefit from these! +Please don’t hide any precious skills from us, whether it is coding, translation, connectors creation, .... the list goes on! The whole community could then benefit from these! -Applications connected : SAP CRM, SuiteCRM, Prestashop, Bittle, Dolist, Salesforce, SugarCRM, Mailchimp, Magento, Sage CRM, Moodle, Evetbrite. We also connect File via ftp and Database. +Applications connected : SAP CRM, SuiteCRM, Prestashop, Bittle, Dolist, Salesforce, SugarCRM, Mailchimp, Magento, Sage CRM, Moodle, Evetbrite, ERPNext. We also connect File via ftp and Database. Find us here : www.myddleware.com We created it, you own it! -myddleware_logo \ No newline at end of file +myddleware_logo diff --git a/app/AppKernel.php b/app/AppKernel.php index 4308a3da6..ee8ca7c94 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -19,14 +19,16 @@ public function registerBundles() new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), + new FOS\JsRoutingBundle\FOSJsRoutingBundle(), // Expose routes on JS + new ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle(), + new Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle(), // User new FOS\UserBundle\FOSUserBundle(), // Myddleware new Myddleware\LoginBundle\LoginBundle(), new Myddleware\RegleBundle\RegleBundle(), - new Myddleware\UserBundle\UserBundle(), - new FOS\JsRoutingBundle\FOSJsRoutingBundle(), // Expose routes on JS - + new Myddleware\UserBundle\UserBundle(), + new Myddleware\ApiBundle\v1_0\MyddlewareApiBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/Resources/TwigBundle/views/Exception/error404.html.twig b/app/Resources/TwigBundle/views/Exception/error404.html.twig index ce1e3918e..fb78d48db 100644 --- a/app/Resources/TwigBundle/views/Exception/error404.html.twig +++ b/app/Resources/TwigBundle/views/Exception/error404.html.twig @@ -9,11 +9,11 @@

The server returned a "{{ status_code }} {{ status_text }}".

- Something is broken. Please e-mail us at contact@myddleware.com and let us know - what you were doing when this error occurred. We will fix it as soon - as possible.
- You can also log the issue on our Github : Myddleware Github project

- Sorry for any inconvenience caused. + Something is broken. Please check your log file here : \myddleware\var\logs\prod.log +
+
+ You can post an issue on Myddleware Github project

+ Sorry for any inconvenience.
\ No newline at end of file diff --git a/app/Resources/TwigBundle/views/Exception/error500.html.twig b/app/Resources/TwigBundle/views/Exception/error500.html.twig index ce1e3918e..fb78d48db 100644 --- a/app/Resources/TwigBundle/views/Exception/error500.html.twig +++ b/app/Resources/TwigBundle/views/Exception/error500.html.twig @@ -9,11 +9,11 @@

The server returned a "{{ status_code }} {{ status_text }}".

- Something is broken. Please e-mail us at contact@myddleware.com and let us know - what you were doing when this error occurred. We will fix it as soon - as possible.
- You can also log the issue on our Github : Myddleware Github project

- Sorry for any inconvenience caused. + Something is broken. Please check your log file here : \myddleware\var\logs\prod.log +
+
+ You can post an issue on Myddleware Github project

+ Sorry for any inconvenience.
\ No newline at end of file diff --git a/app/config/config.yml b/app/config/config.yml index 58a7f5213..abebadc2c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -98,6 +98,13 @@ stof_doctrine_extensions: orm: default: sluggable: true + +lexik_jwt_authentication: + secret_key: '%kernel.project_dir%/app/config/jwt/private.pem' # required for token creation + public_key: '%kernel.project_dir%/app/config/jwt/public.pem' # required for token verification + pass_phrase: 'myddleware' # required for token creation, usage of an environment variable is recommended + token_ttl: 3600 + # Activation de l'extension Twig intl services: @@ -105,4 +112,4 @@ services: class: Twig_Extensions_Extension_Intl tags: - { name: twig.extension } - + diff --git a/app/config/jwt/private.pem b/app/config/jwt/private.pem new file mode 100755 index 000000000..46169a885 --- /dev/null +++ b/app/config/jwt/private.pem @@ -0,0 +1,54 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-256-CBC,E53BFAF69C471EC7E55BD2E5F02C79D5 + +wZH0nrsYjcR2XcKVE+iGl5E28eR+qmh0bgYGHm4mFvI2D6V0a4K9+DJx1eGzEtxb +gEtDVml/bPRIhIjo5htNOwWm2bTXTfXLNO6gIr32h8zIq4Wt9LTrXMI8qwp9oqyQ +6BOdKfs0cr7n5BNO0rApN2GB6HPQ2C/rdLF08LwqeqdmLdFqGiyYd9bRjqBQTsP+ +jt17nXOhH2ewxYSmSkVGaREcMaAeToxRXaWb+hgQ21hver95zhuHRkgEPwCpnuKo +u4kBT2xH9d+ArnbWKKNpRCMfKtYeYt9NKCFLpvouGP9fIdTEeYQ7ggLEmL8pkNq2 +Fzc4G18ckQ8TlzRPEW0NH8Mevy+Qn0Lg2mgN6r1E3Gf3Eocd1sx6hrt0s+kToWy4 +WJPZJ5mbFSfqElDA6sQhI7raFLqcwIBt2Qe4WClr+wdyFuxoQGWV8MfgwECUdbed +w9TgDxSVysM4KSfGth9reSrA3BOfTL1w2duSDc+ZpOHNHRpHDa7wGHZZj6Vjsf/2 +xrUecMbqpaBgQo1V+z8KJHbxTj7Q4kI0jWKAsO4O4McfcoSketZQyV+2ATl85RW7 +MbaU6T5IsAtLp6A94LGaNLBMStDvz1DziCcU5VWWpvjDO+q7VBAEQCnCJdKRBhuY +bUhETgDwJC1y2Qvrex58bYjEAsvSYAUqkLuFKXb3Zk0JAAwMhVFvMctBPRBipiTD +CcecavbxFG9fgjc+XoYTcsgiETxWWYDup3h7VGKES6E511ROURVjgZRtq77q414q +vf0RQRpwoYR/cuZVITKM8LweBfbcfKLWPpIk21RdKoP0fBgwZ1xkRwq+GM/fcZBX +z9+ist2Z/kfTTMrQAHPIJr28ubu0KXtI8xTOrQ8g4gOC3aNnlv59G1/hSy17AbV4 +1Nrr1i1K0UZqovDEO7JUDGJPHs1BH/V0QaFaGfW1K5yoJfn60al2uW7f9SjQFvz9 +6hQUw/BaZFpqPWtsLqYcYDgkKy4mX3inx0GZhnWWNB5SxA/jK3BIJ5g0uzHtGvxX +/UzRGp4mKJKDBOxsS/AOsiy07/CFGA7Cj2KX2t/zIjlfnuck/yzOxCObEmTJpMOd +qO9S7NqW8T5AFXfvthwCL4RUw0qgM2GbnksjbHZ+d5K7yLQs3H2cF4kk0DtJQHBE +Cpw6OVY5jqTwhI/UceinDbJP/fpEQTskQiNkmjH3hcXYQELSlUyML24FQwTPmnBH +q++TH6YijaROIxM8LANYRq5wxQYC4dCSD0/8mH6AgJdpA5d6Q6IXKGvEU+2ISHSi +ZODPre+sH+lSuU8P/9LXJIXyPhyfTa5MSgwNtO0IeuPL2ve31zpmV9kSJXhyjPx8 +P0QXZBrYNFkgTace1ymxoaJroqUZXKVKGIt49o1AorMqiTmQjdO9hMRX+2xGRxif +IPWYkZhLWKT4Pg7lZn2fFQCY+JDck7EhSjA1VtkjIfOhbbZtoyZgMWmc1rmXH4Xa +1vWvk3ESPoANP8DvFHYm9trMd7CytaSEwweiCS3qER41AF3ka0Q6lKcNb6m1AnlI +HMvCrvHs6yiJ0+qRwXVdlpclMwHmabYv6qqi+sIuaKo9uYfsdsGh66UEF2HtDrYh +CUXJc8FsoMHAKXxEYHFV99X3MKku5w7nn7UdSxxRjU2N5be43co/lxQ82P5L1e8h +2avb8PfDVvBqMNSw6c/TeTasCxNDSFDEWCCKNKszD8ceP5e/S+4tguVqM28YoY9H +mlGbJGZrHCN+x1FsYWOF58zhoRwMdEEtHBN42mjuSZy1gnRHjfJqxqw4zv/0AgkO +3gqNYVHPyZ5Q96/Dltzfkp5hlKpKP8D9QFkO9XGdMzfFiOECULKVdLFacAjn/TS2 +lDB1nSQJLz3en38CyOcAz9zNmQM0gVwC91ekL+ta9nBY5rAkxtRGbomrRC8zrOfE +1D4R9okY/AMJhiIa2IGc8FfRyi06fUD2PUrJwP13DBcH1c7lWjm3y4oP7i9hZ4Ka +Xxsn5nArlI6S9ZURc8hiaXMZqR5TPE9uiuzjy/JQpUiMocbwit8zO6VJoYVRbcHc +wqxxhf8oxcxwW5irviQMDUgLekl7geDjAjv+eYDP+TvZ0rk1+0wj9s7rKl4wA9BW +Gio3Qrexa7ENaxFGCS1tdV884XpltppWAwhJvW2bKBitDU7UfxM0Ky3hzQAKqXX/ +MDsXPfWzo0ZEE1zUlBnkP2Ow0Mkb+tTiwMshbJJcCRscb997gZg/BRYL+XXif5nY +eqEmLcb8VIfU1mk8+aU3ZtC15JQ0w2yynL/o6G/8ejoVRydYSfdkPyrqH4sKA3c6 +Xowkc5jO6+4Bj6Q21MLG0WOVNkAF1zaSNcWXxMBA+p/YPSTjCKgF/uOgYPdXk052 +TLE5GEN+J7u6bV2J99MB+zgMBIY/bYRUIkNUZ7l+QGYhJe6B5Q5AxX5oPtVvH4sE +tOylkcoFKe2XDSpIP1vnBV03erl/MNnRasEsyi8Bk1M0SUzvsDZM5Ez8hLyuNPpS +UlloEq7qguUyb1KFXvI0Ba0/pf7yorBYzR+R8ZDeSeyECmviFMuk+npzuiWUU1Qo +s1do8PrqcONrv4hbKINOb0D8ruauUCg1PpCqdtPBihC7C9dhyjilhiPo00f4l5/h +1smTi11tBywOFiE63cIISwFlYUnRQuzu8Kgkw89w///yeToupq1UO4Xc9RkLVJo/ +1EPSNcN2MBwCnrvhssbED6Cn/fz3dE991NCbHL7rCnNgPWGrNAcEAuxdisGehm4M +H7x9N6B0MVLsWnUh4E9+mqrGmerKAFYLh5iWG8GjDQJSqvx4xIcP+OMzevm/0lRS +pVUE6yx3FPDuPIeVfegxiFAhE5oBUQ+BtDZULH6zCf3ojaovsQIwwm8++XtJyDAr +/HXFz60F+fTz4t++1khjjPuc/+556k/hnaJY4Z1t/D1w9vO/Nsbw9NOBW0HcDobi +4iMOrTD4RvARm1xDZMXw2+eDgfAkJZsp0ncjVE2kpP2cfayLl4hlHdQiNm01I6U2 +5aR8r0vKqcne7oXrPUYzHDGnKOvGunpkwqrTVtLZHSxLlxDTT6ARosBRNzHAKhnk +nNLdKjTYNcQOYNypdHbjjwgSCxSkf0wlCZbQZGjP8BfouvbnKCNmT0FxTyueT3At +-----END RSA PRIVATE KEY----- diff --git a/app/config/jwt/public.pem b/app/config/jwt/public.pem new file mode 100755 index 000000000..a03761924 --- /dev/null +++ b/app/config/jwt/public.pem @@ -0,0 +1,14 @@ +-----BEGIN PUBLIC KEY----- +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAthAM3QyHrJboW6h3GX87 +D/mznM7KHBbLh09Hj81MQg9af++WvMq3lLqoICcYi+wz+5tculmjZctRQIQK1iK2 +FeElB3wt3BmjjbnJtJRwk5670liNaqGM9VnKEg+OJhnrvrunEMtrlkaMAcgZBdyg +EOOwHjtN4GvSWUEkQMZtF81FBN0sO3yA4ChdZBo9h/DBVfspGQRnCUY10KHXE3tw +pm2t3hrAyQ6Xo6stdR5mUwmD56BCHr8nO34PkWUr5IdEb12ZBVg8aZauorfEx007 +dMWvrb1JmZSp474mdEUBSShN7n1xez6UjIxTFJlWJ7RovxZ51OtLP/h/Uno40zXk +9JFo5Dv3kvii7KG65FEUPfCTrYc0eLAhxwlG+T/dAosnJFMkH2qCP7b74Wpz29RJ +NVym2OfCNeG7rLctmyv4LTEUobtXyQU3cAtpAei1Gvxyhp0/WP62Rbfc8/6YDp5E +iPitfdJ36eKvhBMbJh6GTww9uEFEd5LQLrZd0RM/GgOvguRtCTutTSFuXTUpzQ1c +T801pHqUMmDsl0L4KDvkdCSfGO7c80/DULGf7XrGHrveEuce/hXdoeBnO+ivvLIF +zhytgsCTptWgdT+FtayiA/ypmvYmUlUdEv6et8Ep3jROUGHyoeqs+0RuPluFEwdc +O8S3t4SNkdPFK3pVocDVfK8CAwEAAQ== +-----END PUBLIC KEY----- diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 7b60ab053..8a233a03e 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -12,5 +12,5 @@ parameters: extension_allowed: - xml - wsdl - myd_version: 2.4.1l + myd_version: 2.5.0 block_install: 0 diff --git a/app/config/public/parameters_public.yml.dist b/app/config/public/parameters_public.yml.dist index 87f0a617c..39ab80717 100644 --- a/app/config/public/parameters_public.yml.dist +++ b/app/config/public/parameters_public.yml.dist @@ -9,4 +9,5 @@ parameters: alert_time_limit: 60 transfer: search_limit: 1000 - git_branch: master \ No newline at end of file + git_branch: master + base_uri: \ No newline at end of file diff --git a/app/config/routing.yml b/app/config/routing.yml index 3c5eff485..9d2413ca3 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,3 +1,15 @@ +myddleware_api: + resource: "@MyddlewareApiBundle/Resources/config/routing.yml" + prefix: /api + +api_platform: + resource: . + type: api_platform + prefix: /api + +api_login_check: + path: /api/v1_0/login_check + fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" diff --git a/app/config/security.yml b/app/config/security.yml index cb5d5244c..7519327b2 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -15,4 +15,7 @@ security: #- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin/, role: ROLE_ADMIN } #- { path: ^/ajouter, role: ROLE_ADMIN } - - { path: ^/rule/, role: ROLE_USER } \ No newline at end of file + - { path: ^/rule/, role: ROLE_USER } + + - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } +# - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } \ No newline at end of file diff --git a/composer.json b/composer.json index 57668b93b..b845411b3 100644 --- a/composer.json +++ b/composer.json @@ -1,121 +1,124 @@ -{ - "name": "symfony/framework-standard-edition", - "license": "MIT", - "type": "project", - "description": "The \"Symfony Standard Edition\" distribution", - "autoload": { - "psr-4": { "": "src/" }, - "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] - }, - "autoload-dev": { - "psr-4": { "Tests\\": "tests/" } - }, - - "prefer-stable": true, - "require": { - "php": ">=7.1", - "symfony/symfony": "3.4.17", - "doctrine/orm": "^2.5", - "doctrine/doctrine-bundle": "1.8.1", - "twig/extensions": "~1.0", - "twig/twig": "^1.0", - "symfony/assetic-bundle": "~2.3", - "symfony/swiftmailer-bundle": "^2.3", - "symfony/monolog-bundle": "^3.1.2", - "symfony/expression-language": "~3.1", - "sensio/distribution-bundle": "^5.0", - "sensio/framework-extra-bundle": "^3.0.2", - "incenteev/composer-parameter-handler": "^2.0", - "stof/doctrine-extensions-bundle": "1.3.x-dev", - "friendsofsymfony/user-bundle": "~2.0.2", - "jquery/jquery": "2.1.3", - "jquery/jquery_ui": "1.11.1", - "twitter/bootstrap": "3.3.7", - "leafo/lessphp": "0.4.0", - "phpsec/phpsec":"0.6.*", - "white-october/pagerfanta-bundle": "dev-master", - "pagerfanta/pagerfanta": "^2.0.0", - "illuminate/encryption": "5.3.*@dev", - "friendsofsymfony/jsrouting-bundle": "^1.6" - }, - "repositories": [ - { - "type": "package", - "package": { - "name": "jquery/jquery", - "version": "2.1.3", - "dist": { - "url": "https://code.jquery.com/jquery-2.1.3.min.js", - "type": "file" - } - } - }, - { - "type": "package", - "package": { - "name": "jquery/jquery_ui", - "version": "1.11.1", - "dist": { - "url": "https://code.jquery.com/ui/1.11.1/jquery-ui.min.js", - "type": "file" - } - } - } - ], - "require-dev": { - "sensio/generator-bundle": "^3.0", - "doctrine/doctrine-fixtures-bundle": "^2.3", - "symfony/phpunit-bridge": "^3.0" - - }, - "scripts": { - "post-root-package-install": [ - "SymfonyStandard\\Composer::hookRootPackageInstall" - ], - "post-install-cmd": [ - "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" - ], - "post-update-cmd": [ - "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" - ] - }, - "config": { - - - }, - "extra": { - "symfony-bin-dir": "bin", - "symfony-app-dir": "app", - "symfony-web-dir": "web", - "symfony-var-dir": "var", - "symfony-tests-dir": "tests", - "symfony-assets-install": "relative", - "incenteev-parameters": [{ - "file": "app/config/parameters.yml" - }, - { - "file": "app/config/public/parameters_smtp.yml", - "dist-file": "app/config/public/parameters_smtp.yml.dist" - }, - { - "file": "app/config/public/parameters_public.yml", - "dist-file": "app/config/public/parameters_public.yml.dist" - } - ], - "branch-alias": { - "dev-master": "3.2-dev" - } - } -} +{ + "name": "symfony/framework-standard-edition", + "license": "MIT", + "type": "project", + "description": "The \"Symfony Standard Edition\" distribution", + "autoload": { + "psr-4": { "": "src/" }, + "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] + }, + "autoload-dev": { + "psr-4": { "Tests\\": "tests/" } + }, + + "prefer-stable": true, + "require": { + "php": ">=7.1 <7.3", + "symfony/symfony": "3.4.31", + "doctrine/orm": "^2.6.4", + "doctrine/doctrine-bundle": "1.8.1", + "twig/extensions": "~1.0", + "twig/twig": "^1.0", + "symfony/assetic-bundle": "~2.3", + "symfony/swiftmailer-bundle": "^2.3", + "symfony/monolog-bundle": "^3.1.2", + "symfony/expression-language": "~3.1", + "sensio/distribution-bundle": "^5.0", + "sensio/framework-extra-bundle": "^3.0.2", + "incenteev/composer-parameter-handler": "^2.0", + "stof/doctrine-extensions-bundle": "1.3.x-dev", + "friendsofsymfony/user-bundle": "~2.0.2", + "jquery/jquery": "2.1.3", + "jquery/jquery_ui": "1.11.1", + "twitter/bootstrap": "3.3.7", + "leafo/lessphp": "0.4.0", + "phpsec/phpsec":"0.6.*", + "white-october/pagerfanta-bundle": "dev-master", + "pagerfanta/pagerfanta": "^2.0.0", + "illuminate/encryption": "5.3.*@dev", + "friendsofsymfony/jsrouting-bundle": "^1.6", + "api-platform/core": "2.2.9", + "api-platform/api-pack": "^1.1", + "lexik/jwt-authentication-bundle": "^2.6" + }, + "repositories": [ + { + "type": "package", + "package": { + "name": "jquery/jquery", + "version": "2.1.3", + "dist": { + "url": "https://code.jquery.com/jquery-2.1.3.min.js", + "type": "file" + } + } + }, + { + "type": "package", + "package": { + "name": "jquery/jquery_ui", + "version": "1.11.1", + "dist": { + "url": "https://code.jquery.com/ui/1.11.1/jquery-ui.min.js", + "type": "file" + } + } + } + ], + "require-dev": { + "sensio/generator-bundle": "^3.0", + "doctrine/doctrine-fixtures-bundle": "^2.3", + "symfony/phpunit-bridge": "^3.0" + + }, + "scripts": { + "post-root-package-install": [ + "SymfonyStandard\\Composer::hookRootPackageInstall" + ], + "post-install-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" + ], + "post-update-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" + ] + }, + "config": { + + + }, + "extra": { + "symfony-bin-dir": "bin", + "symfony-app-dir": "app", + "symfony-web-dir": "web", + "symfony-var-dir": "var", + "symfony-tests-dir": "tests", + "symfony-assets-install": "relative", + "incenteev-parameters": [{ + "file": "app/config/parameters.yml" + }, + { + "file": "app/config/public/parameters_smtp.yml", + "dist-file": "app/config/public/parameters_smtp.yml.dist" + }, + { + "file": "app/config/public/parameters_public.yml", + "dist-file": "app/config/public/parameters_public.yml.dist" + } + ], + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/composer.lock b/composer.lock index 5d04d478c..1112feb06 100644 --- a/composer.lock +++ b/composer.lock @@ -4,121 +4,219 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "53069fb019854d1489f7d451208d08da", - "content-hash": "4d61a6a2a5897a191185e48a454251d6", + "hash": "4dc4f964eec3fbd21cb820fc408eb704", + "content-hash": "c745a8a9815288d8cc099b69826423ed", "packages": [ { - "name": "behat/transliterator", + "name": "api-platform/api-pack", "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/Behat/Transliterator.git", - "reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c" + "url": "https://github.com/api-platform/api-pack.git", + "reference": "9e3e7421415c747e676778f211434674324dcfa9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Transliterator/zipball/826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c", - "reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c", + "url": "https://api.github.com/repos/api-platform/api-pack/zipball/9e3e7421415c747e676778f211434674324dcfa9", + "reference": "9e3e7421415c747e676778f211434674324dcfa9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "api-platform/core": "^2.1", + "doctrine/annotations": "^1.0", + "doctrine/doctrine-bundle": "^1.6", + "doctrine/orm": "^2.4.5", + "nelmio/cors-bundle": "^1.5", + "php": "^7.0", + "phpdocumentor/reflection-docblock": "^3.0 || ^4.0", + "symfony/asset": "*", + "symfony/expression-language": "*", + "symfony/security-bundle": "*", + "symfony/twig-bundle": "*", + "symfony/validator": "*" + }, + "type": "symfony-pack", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A pack for API Platform", + "time": "2019-01-12 11:48:48" + }, + { + "name": "api-platform/core", + "version": "v2.2.9", + "source": { + "type": "git", + "url": "https://github.com/api-platform/core.git", + "reference": "d6b01d76bde20350f81fd5090689365376fc1f8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/api-platform/core/zipball/d6b01d76bde20350f81fd5090689365376fc1f8e", + "reference": "d6b01d76bde20350f81fd5090689365376fc1f8e", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.0", + "php": ">=7.0", + "psr/cache": "^1.0", + "psr/container": "^1.0", + "symfony/http-foundation": "^3.1 || ^4.0", + "symfony/http-kernel": "^2.7 || ^3.0 || ^4.0", + "symfony/property-access": "^2.7 || ^3.0 || ^4.0", + "symfony/property-info": "^3.3.11 || ^4.0", + "symfony/serializer": "^3.1 || ^4.0", + "willdurand/negotiation": "^2.0.3" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" }, "require-dev": { - "chuyskywalker/rolling-curl": "^3.1", - "php-yaoi/php-yaoi": "^1.0" + "behat/behat": "^3.1", + "behat/mink": "^1.7", + "behat/mink-browserkit-driver": "^1.3.1", + "behat/mink-extension": "^2.2", + "behat/symfony2-extension": "^2.1.1", + "behatch/contexts": "^3.1", + "doctrine/annotations": "^1.2", + "doctrine/doctrine-bundle": "^1.6.3", + "doctrine/orm": "^2.5.2", + "friendsofsymfony/user-bundle": "^2.0", + "guzzlehttp/guzzle": "^6.0", + "justinrainbow/json-schema": "^5.0", + "nelmio/api-doc-bundle": "^2.13.3", + "php-mock/php-mock-phpunit": "^2.0", + "phpdocumentor/reflection-docblock": "^3.0 || ^4.0", + "phpdocumentor/type-resolver": "^0.2.1 || ^0.3 || 0.4", + "phpunit/phpunit": "^6.1", + "psr/log": "^1.0", + "sensio/framework-extra-bundle": "^3.0.11 || ^4.0", + "symfony/asset": "^3.3 || ^4.0", + "symfony/cache": "^3.3 || ^4.0", + "symfony/config": "^3.3 || ^4.0", + "symfony/console": "^3.3 || ^4.0", + "symfony/debug": "^2.8 || ^3.0 || ^4.0", + "symfony/dependency-injection": "^3.3 || ^4.0", + "symfony/doctrine-bridge": "^2.8.12 || ^3.0 || ^4.0", + "symfony/event-dispatcher": "^3.3 || ^4.0", + "symfony/expression-language": "^2.8 || ^3.0 || ^4.0", + "symfony/finder": "^3.3 || ^4.0", + "symfony/form": "^3.3 || ^4.0", + "symfony/framework-bundle": "^3.3 || ^4.0", + "symfony/http-foundation": "^3.1@dev || ^4.0@dev", + "symfony/phpunit-bridge": "^3.3 || ^4.0", + "symfony/routing": "^3.3 || ^4.0", + "symfony/security": "^3.0 || ^4.0", + "symfony/security-bundle": "^3.0 || ^4.0", + "symfony/twig-bundle": "^3.1 || ^4.0", + "symfony/validator": "^3.3 || ^4.0", + "symfony/yaml": "^3.3 || ^4.0", + "webonyx/graphql-php": ">=0.12 <1.0" + }, + "suggest": { + "friendsofsymfony/user-bundle": "To use the FOSUserBundle bridge.", + "guzzlehttp/guzzle": "To use the HTTP cache invalidation system.", + "phpdocumentor/reflection-docblock": "To support extracting metadata from PHPDoc.", + "psr/cache-implementation": "To use metadata caching.", + "symfony/cache": "To have metadata caching when using Symfony integration.", + "symfony/config": "To load XML configuration files.", + "symfony/expression-language": "To use authorization features.", + "symfony/security": "To use authorization features.", + "symfony/twig-bundle": "To use the Swagger UI integration.", + "webonyx/graphql-php": "To support GraphQL." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { - "psr-0": { - "Behat\\Transliterator": "src/" + "psr-4": { + "ApiPlatform\\Core\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Artistic-1.0" + "MIT" ], - "description": "String transliterator", - "keywords": [ - "i18n", - "slug", - "transliterator" + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com", + "homepage": "https://dunglas.fr" + } ], - "time": "2017-04-04 11:38:05" + "description": "The ultimate solution to create web APIs.", + "homepage": "https://api-platform.com", + "keywords": [ + "Hydra", + "JSON-LD", + "api", + "hal", + "json", + "rest", + "swagger" + ], + "time": "2018-07-06 13:42:37" }, { - "name": "composer/ca-bundle", - "version": "1.1.4", + "name": "behat/transliterator", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d" + "url": "https://github.com/Behat/Transliterator.git", + "reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d", - "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d", + "url": "https://api.github.com/repos/Behat/Transliterator/zipball/826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c", + "reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c", "shasum": "" }, "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", - "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0" + "chuyskywalker/rolling-curl": "^3.1", + "php-yaoi/php-yaoi": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "1.2-dev" } }, "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" + "psr-0": { + "Behat\\Transliterator": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } + "Artistic-1.0" ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "description": "String transliterator", "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" + "i18n", + "slug", + "transliterator" ], - "time": "2019-01-28 09:30:10" + "time": "2017-04-04 11:38:05" }, { "name": "doctrine/annotations", - "version": "v1.6.1", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24" + "reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/53120e0eb10355388d6ccbe462f1fea34ddadb24", - "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fa4c4e861e809d6a1103bd620cce63ed91aedfeb", + "reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb", "shasum": "" }, "require": { @@ -127,12 +225,12 @@ }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.5@dev" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -145,6 +243,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -153,10 +255,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -173,7 +271,7 @@ "docblock", "parser" ], - "time": "2019-03-25 19:12:02" + "time": "2019-08-08 18:11:40" }, { "name": "doctrine/cache", @@ -252,16 +350,16 @@ }, { "name": "doctrine/collections", - "version": "v1.6.1", + "version": "v1.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "d2ae4ef05e25197343b6a39bae1d3c427a2f6956" + "reference": "c5e0bc17b1620e97c968ac409acbff28b8b850be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/d2ae4ef05e25197343b6a39bae1d3c427a2f6956", - "reference": "d2ae4ef05e25197343b6a39bae1d3c427a2f6956", + "url": "https://api.github.com/repos/doctrine/collections/zipball/c5e0bc17b1620e97c968ac409acbff28b8b850be", + "reference": "c5e0bc17b1620e97c968ac409acbff28b8b850be", "shasum": "" }, "require": { @@ -318,20 +416,20 @@ "iterators", "php" ], - "time": "2019-03-25 19:03:48" + "time": "2019-06-09 13:48:14" }, { "name": "doctrine/common", - "version": "v2.10.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "30e33f60f64deec87df728c02b107f82cdafad9d" + "reference": "b8ca1dcf6b0dc8a2af7a09baac8d0c48345df4ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/30e33f60f64deec87df728c02b107f82cdafad9d", - "reference": "30e33f60f64deec87df728c02b107f82cdafad9d", + "url": "https://api.github.com/repos/doctrine/common/zipball/b8ca1dcf6b0dc8a2af7a09baac8d0c48345df4ff", + "reference": "b8ca1dcf6b0dc8a2af7a09baac8d0c48345df4ff", "shasum": "" }, "require": { @@ -347,14 +445,16 @@ }, "require-dev": { "doctrine/coding-standard": "^1.0", - "phpunit/phpunit": "^6.3", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpunit/phpunit": "^7.0", "squizlabs/php_codesniffer": "^3.0", "symfony/phpunit-bridge": "^4.0.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.10.x-dev" + "dev-master": "2.11.x-dev" } }, "autoload": { @@ -367,6 +467,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -375,10 +479,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -399,7 +499,7 @@ "doctrine", "php" ], - "time": "2018-11-21 01:24:55" + "time": "2019-09-10 10:10:14" }, { "name": "doctrine/dbal", @@ -858,30 +958,35 @@ }, { "name": "doctrine/lexer", - "version": "v1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", + "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.2" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } }, "notification-url": "https://packagist.org/downloads/", @@ -889,39 +994,42 @@ "MIT" ], "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" } ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", "keywords": [ + "annotations", + "docblock", "lexer", - "parser" + "parser", + "php" ], - "time": "2014-09-09 13:34:57" + "time": "2019-07-30 19:33:28" }, { "name": "doctrine/orm", - "version": "v2.6.3", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "434820973cadf2da2d66e7184be370084cc32ca8" + "reference": "b52ef5a1002f99ab506a5a2d6dba5a2c236c5f43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/434820973cadf2da2d66e7184be370084cc32ca8", - "reference": "434820973cadf2da2d66e7184be370084cc32ca8", + "url": "https://api.github.com/repos/doctrine/orm/zipball/b52ef5a1002f99ab506a5a2d6dba5a2c236c5f43", + "reference": "b52ef5a1002f99ab506a5a2d6dba5a2c236c5f43", "shasum": "" }, "require": { @@ -936,9 +1044,8 @@ "symfony/console": "~3.0|~4.0" }, "require-dev": { - "doctrine/coding-standard": "^1.0", - "phpunit/phpunit": "^6.5", - "squizlabs/php_codesniffer": "^3.2", + "doctrine/coding-standard": "^5.0", + "phpunit/phpunit": "^7.5", "symfony/yaml": "~3.4|~4.0" }, "suggest": { @@ -963,6 +1070,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -971,10 +1082,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -990,7 +1097,7 @@ "database", "orm" ], - "time": "2018-11-20 23:46:46" + "time": "2019-09-20 14:30:26" }, { "name": "doctrine/persistence", @@ -1766,6 +1873,61 @@ ], "time": "2016-11-11 18:43:20" }, + { + "name": "lcobucci/jwt", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "time": "2019-05-24 18:30:49" + }, { "name": "leafo/lessphp", "version": "v0.4.0", @@ -1807,18 +1969,115 @@ "homepage": "http://leafo.net/lessphp/", "time": "2013-08-09 17:09:19" }, + { + "name": "lexik/jwt-authentication-bundle", + "version": "v2.6.4", + "source": { + "type": "git", + "url": "https://github.com/lexik/LexikJWTAuthenticationBundle.git", + "reference": "f79f20b282834878aab10530ca102a80396624ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/zipball/f79f20b282834878aab10530ca102a80396624ed", + "reference": "f79f20b282834878aab10530ca102a80396624ed", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "lcobucci/jwt": "^3.2", + "namshi/jose": "^7.2", + "php": "^5.5|^7.0", + "symfony/framework-bundle": "^3.4|^4.0", + "symfony/security-bundle": "^3.4|^4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.1|^2.8", + "symfony/browser-kit": "^3.4|^4.0", + "symfony/console": "^3.4|^4.0", + "symfony/dom-crawler": "^3.4|^4.0", + "symfony/phpunit-bridge": "^3.4|^4.0", + "symfony/var-dumper": "^3.4|^4.0", + "symfony/yaml": "^3.4|^4.0" + }, + "suggest": { + "gesdinet/jwt-refresh-token-bundle": "Implements a refresh token system over Json Web Tokens in Symfony", + "spomky-labs/lexik-jose-bridge": "Provides a JWT Token encoder with encryption support" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Lexik\\Bundle\\JWTAuthenticationBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Barthe", + "email": "j.barthe@lexik.fr", + "homepage": "https://github.com/jeremyb" + }, + { + "name": "Nicolas Cabot", + "email": "n.cabot@lexik.fr", + "homepage": "https://github.com/slashfan" + }, + { + "name": "Cedric Girard", + "email": "c.girard@lexik.fr", + "homepage": "https://github.com/cedric-g" + }, + { + "name": "Dev Lexik", + "email": "dev@lexik.fr", + "homepage": "https://github.com/lexik" + }, + { + "name": "Robin Chalas", + "email": "robin.chalas@gmail.com", + "homepage": "https://github.com/chalasr" + }, + { + "name": "Lexik Community", + "homepage": "https://github.com/lexik/LexikJWTAuthenticationBundle/graphs/contributors" + } + ], + "description": "This bundle provides JWT authentication for your Symfony REST API", + "homepage": "https://github.com/lexik/LexikJWTAuthenticationBundle", + "keywords": [ + "Authentication", + "JWS", + "api", + "bundle", + "jwt", + "rest", + "symfony" + ], + "time": "2019-07-29 10:02:31" + }, { "name": "monolog/monolog", - "version": "1.24.0", + "version": "1.25.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", - "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/70e65a5470a42cfec1a7da00d30edb6e617e8dcf", + "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf", "shasum": "" }, "require": { @@ -1883,56 +2142,44 @@ "logging", "psr-3" ], - "time": "2018-11-05 09:00:11" + "time": "2019-09-06 13:49:17" }, { - "name": "pagerfanta/pagerfanta", - "version": "v2.1.2", + "name": "namshi/jose", + "version": "7.2.3", "source": { "type": "git", - "url": "https://github.com/whiteoctober/Pagerfanta.git", - "reference": "45a85ad426316ae37f2d007022e5b4c95bc3aef4" + "url": "https://github.com/namshi/jose.git", + "reference": "89a24d7eb3040e285dd5925fcad992378b82bcff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/45a85ad426316ae37f2d007022e5b4c95bc3aef4", - "reference": "45a85ad426316ae37f2d007022e5b4c95bc3aef4", + "url": "https://api.github.com/repos/namshi/jose/zipball/89a24d7eb3040e285dd5925fcad992378b82bcff", + "reference": "89a24d7eb3040e285dd5925fcad992378b82bcff", "shasum": "" }, "require": { - "php": "^7.0" + "ext-date": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-spl": "*", + "php": ">=5.5", + "symfony/polyfill-php56": "^1.0" }, "require-dev": { - "doctrine/orm": "~2.3", - "doctrine/phpcr-odm": "1.*", - "jackalope/jackalope-doctrine-dbal": "1.*", - "jmikola/geojson": "~1.0", - "mandango/mandango": "~1.0@dev", - "mandango/mondator": "~1.0@dev", - "phpunit/phpunit": "^6.5", - "propel/propel": "~2.0@dev", - "propel/propel1": "~1.6", - "ruflin/elastica": "~1.3", - "solarium/solarium": "~3.1" + "phpseclib/phpseclib": "^2.0", + "phpunit/phpunit": "^4.5|^5.0", + "satooshi/php-coveralls": "^1.0" }, "suggest": { - "doctrine/mongodb-odm": "To use the DoctrineODMMongoDBAdapter.", - "doctrine/orm": "To use the DoctrineORMAdapter.", - "doctrine/phpcr-odm": "To use the DoctrineODMPhpcrAdapter. >= 1.1.0", - "mandango/mandango": "To use the MandangoAdapter.", - "propel/propel": "To use the Propel2Adapter", - "propel/propel1": "To use the PropelAdapter", - "solarium/solarium": "To use the SolariumAdapter." + "ext-openssl": "Allows to use OpenSSL as crypto engine.", + "phpseclib/phpseclib": "Allows to use Phpseclib as crypto engine, use version ^2.0." }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { - "Pagerfanta\\": "src/Pagerfanta/" + "Namshi\\JOSE\\": "src/Namshi/JOSE/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1941,31 +2188,164 @@ ], "authors": [ { - "name": "Pablo Díez", - "email": "pablodip@gmail.com" + "name": "Alessandro Nadalin", + "email": "alessandro.nadalin@gmail.com" + }, + { + "name": "Alessandro Cinelli (cirpo)", + "email": "alessandro.cinelli@gmail.com" } ], - "description": "Pagination for PHP", + "description": "JSON Object Signing and Encryption library for PHP.", "keywords": [ - "page", - "pagination", - "paginator", - "paging" - ], - "time": "2019-04-02 08:50:39" + "JSON Web Signature", + "JSON Web Token", + "JWS", + "json", + "jwt", + "token" + ], + "time": "2016-12-05 07:27:31" }, { - "name": "paragonie/random_compat", - "version": "v2.0.18", + "name": "nelmio/cors-bundle", + "version": "1.5.6", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" + "url": "https://github.com/nelmio/NelmioCorsBundle.git", + "reference": "10a24c10f242440211ed31075e74f81661c690d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/10a24c10f242440211ed31075e74f81661c690d9", + "reference": "10a24c10f242440211ed31075e74f81661c690d9", + "shasum": "" + }, + "require": { + "symfony/framework-bundle": "^2.7 || ^3.0 || ^4.0" + }, + "require-dev": { + "matthiasnoback/symfony-dependency-injection-test": "^1.0 || ^2.0", + "mockery/mockery": "^0.9 || ^1.0", + "symfony/phpunit-bridge": "^2.7 || ^3.0 || ^4.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Nelmio\\CorsBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nelmio", + "homepage": "http://nelm.io" + }, + { + "name": "Symfony Community", + "homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors" + } + ], + "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony2 application", + "keywords": [ + "api", + "cors", + "crossdomain" + ], + "time": "2019-06-17 08:53:14" + }, + { + "name": "pagerfanta/pagerfanta", + "version": "v2.1.3", + "source": { + "type": "git", + "url": "https://github.com/whiteoctober/Pagerfanta.git", + "reference": "a53ff01d521648d9dbca19b93ac6bc75a59b0972" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/a53ff01d521648d9dbca19b93ac6bc75a59b0972", + "reference": "a53ff01d521648d9dbca19b93ac6bc75a59b0972", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "doctrine/orm": "~2.3", + "doctrine/phpcr-odm": "1.*", + "jackalope/jackalope-doctrine-dbal": "1.*", + "jmikola/geojson": "~1.0", + "mandango/mandango": "~1.0@dev", + "mandango/mondator": "~1.0@dev", + "phpunit/phpunit": "^6.5", + "propel/propel": "~2.0@dev", + "propel/propel1": "~1.6", + "ruflin/elastica": "~1.3", + "solarium/solarium": "~3.1" + }, + "suggest": { + "doctrine/mongodb-odm": "To use the DoctrineODMMongoDBAdapter.", + "doctrine/orm": "To use the DoctrineORMAdapter.", + "doctrine/phpcr-odm": "To use the DoctrineODMPhpcrAdapter. >= 1.1.0", + "mandango/mandango": "To use the MandangoAdapter.", + "propel/propel": "To use the Propel2Adapter", + "propel/propel1": "To use the PropelAdapter", + "solarium/solarium": "To use the SolariumAdapter." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Pagerfanta\\": "src/Pagerfanta/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pablo Díez", + "email": "pablodip@gmail.com" + } + ], + "description": "Pagination for PHP", + "keywords": [ + "page", + "pagination", + "paginator", + "paging" + ], + "time": "2019-07-17 20:56:16" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.18", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", "shasum": "" }, "require": { @@ -2003,6 +2383,156 @@ ], "time": "2019-01-03 20:59:08" }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2018-08-07 13:53:10" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "^1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2019-09-12 14:27:41" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22 18:11:29" + }, { "name": "phpsec/phpsec", "version": "0.6.5", @@ -2344,21 +2874,21 @@ }, { "name": "sensio/distribution-bundle", - "version": "v5.0.24", + "version": "v5.0.25", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "59eac70f15f97ee945924948a6f5e2f6f86b7a4b" + "reference": "80a38234bde8321fb92aa0b8c27978a272bb4baf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/59eac70f15f97ee945924948a6f5e2f6f86b7a4b", - "reference": "59eac70f15f97ee945924948a6f5e2f6f86b7a4b", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/80a38234bde8321fb92aa0b8c27978a272bb4baf", + "reference": "80a38234bde8321fb92aa0b8c27978a272bb4baf", "shasum": "" }, "require": { "php": ">=5.3.9", - "sensiolabs/security-checker": "~5.0", + "sensiolabs/security-checker": "~5.0|~6.0", "symfony/class-loader": "~2.3|~3.0", "symfony/config": "~2.3|~3.0", "symfony/dependency-injection": "~2.3|~3.0", @@ -2392,7 +2922,7 @@ "configuration", "distribution" ], - "time": "2018-12-14 17:36:15" + "time": "2019-06-18 15:43:58" }, { "name": "sensio/framework-extra-bundle", @@ -2466,22 +2996,24 @@ }, { "name": "sensiolabs/security-checker", - "version": "v5.0.3", + "version": "v6.0.2", "source": { "type": "git", "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1" + "reference": "ce8d0552dcb8d3677ab9adb6d19a5837949bfec4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/46be3f58adac13084497961e10eed9a7fb4d44d1", - "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/ce8d0552dcb8d3677ab9adb6d19a5837949bfec4", + "reference": "ce8d0552dcb8d3677ab9adb6d19a5837949bfec4", "shasum": "" }, "require": { - "composer/ca-bundle": "^1.0", - "php": ">=5.5.9", - "symfony/console": "~2.7|~3.0|~4.0" + "php": ">=7.1.3", + "symfony/console": "^2.8|^3.4|^4.2", + "symfony/http-client": "^4.3", + "symfony/mime": "^4.3", + "symfony/polyfill-ctype": "^1.11" }, "bin": [ "security-checker" @@ -2489,7 +3021,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -2508,7 +3040,7 @@ } ], "description": "A security checker for your composer.lock", - "time": "2018-12-19 17:14:59" + "time": "2019-06-08 06:46:26" }, { "name": "stof/doctrine-extensions-bundle", @@ -2668,16 +3200,193 @@ "kriswallsmith/spork": "to be able to dump assets in parallel", "symfony/twig-bundle": "to use the Twig integration" }, - "type": "symfony-bundle", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\AsseticBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kris Wallsmith", + "email": "kris.wallsmith@gmail.com", + "homepage": "http://kriswallsmith.net/" + } + ], + "description": "Integrates Assetic into Symfony2", + "homepage": "https://github.com/symfony/AsseticBundle", + "keywords": [ + "assets", + "compression", + "minification" + ], + "abandoned": "symfony/webpack-encore-pack", + "time": "2017-07-14 07:26:46" + }, + { + "name": "symfony/http-client", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client.git", + "reference": "9a4fa769269ed730196a5c52c742b30600cf1e87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client/zipball/9a4fa769269ed730196a5c52c742b30600cf1e87", + "reference": "9a4fa769269ed730196a5c52c742b30600cf1e87", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "^1.0", + "symfony/http-client-contracts": "^1.1.6", + "symfony/polyfill-php73": "^1.11" + }, + "provide": { + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "1.1" + }, + "require-dev": { + "nyholm/psr7": "^1.0", + "psr/http-client": "^1.0", + "symfony/http-kernel": "^4.3", + "symfony/process": "^4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpClient component", + "homepage": "https://symfony.com", + "time": "2019-08-20 14:27:59" + }, + { + "name": "symfony/http-client-contracts", + "version": "v1.1.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "6005fe61a33724405d56eb5b055d5d370192a1bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/6005fe61a33724405d56eb5b055d5d370192a1bd", + "reference": "6005fe61a33724405d56eb5b055d5d370192a1bd", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "symfony/http-client-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-08-08 10:05:21" + }, + { + "name": "symfony/mime", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "987a05df1c6ac259b34008b932551353f4f408df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df", + "reference": "987a05df1c6ac259b34008b932551353f4f408df", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "~3.4|^4.1" + }, + "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.3-dev" } }, "autoload": { "psr-4": { - "Symfony\\Bundle\\AsseticBundle\\": "" - } + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2685,47 +3394,48 @@ ], "authors": [ { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Integrates Assetic into Symfony2", - "homepage": "https://github.com/symfony/AsseticBundle", + "description": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", "keywords": [ - "assets", - "compression", - "minification" + "mime", + "mime-type" ], - "abandoned": "symfony/webpack-encore-pack", - "time": "2017-07-14 07:26:46" + "time": "2019-08-22 08:16:11" }, { "name": "symfony/monolog-bundle", - "version": "v3.3.1", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/monolog-bundle.git", - "reference": "572e143afc03419a75ab002c80a2fd99299195ff" + "reference": "7fbecb371c1c614642c93c6b2cbcdf723ae8809d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/572e143afc03419a75ab002c80a2fd99299195ff", - "reference": "572e143afc03419a75ab002c80a2fd99299195ff", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/7fbecb371c1c614642c93c6b2cbcdf723ae8809d", + "reference": "7fbecb371c1c614642c93c6b2cbcdf723ae8809d", "shasum": "" }, "require": { "monolog/monolog": "~1.22", "php": ">=5.6", - "symfony/config": "~2.7|~3.3|~4.0", - "symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10", - "symfony/http-kernel": "~2.7|~3.3|~4.0", - "symfony/monolog-bridge": "~2.7|~3.3|~4.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4.10|^4.0.10", + "symfony/http-kernel": "~3.4|~4.0", + "symfony/monolog-bridge": "~3.4|~4.0" }, "require-dev": { - "symfony/console": "~2.7|~3.3|~4.0", - "symfony/phpunit-bridge": "^3.3|^4.0", - "symfony/yaml": "~2.7|~3.3|~4.0" + "symfony/console": "~3.4|~4.0", + "symfony/phpunit-bridge": "^3.4.19|^4.0", + "symfony/yaml": "~3.4|~4.0" }, "type": "symfony-bundle", "extra": { @@ -2761,20 +3471,20 @@ "log", "logging" ], - "time": "2018-11-04 09:58:13" + "time": "2019-06-20 12:18:19" }, { "name": "symfony/polyfill-apcu", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "a502face1da6a53289480166f24de2c3c68e5c3c" + "reference": "71ce80635d5dcd67772b4dda00b86068595f64d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/a502face1da6a53289480166f24de2c3c68e5c3c", - "reference": "a502face1da6a53289480166f24de2c3c68e5c3c", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/71ce80635d5dcd67772b4dda00b86068595f64d5", + "reference": "71ce80635d5dcd67772b4dda00b86068595f64d5", "shasum": "" }, "require": { @@ -2783,7 +3493,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -2817,20 +3527,20 @@ "portable", "shim" ], - "time": "2019-02-06 07:57:58" + "time": "2019-08-06 08:03:45" }, { "name": "symfony/polyfill-ctype", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "82ebae02209c21113908c229e9883c419720738a" + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", - "reference": "82ebae02209c21113908c229e9883c419720738a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", "shasum": "" }, "require": { @@ -2842,7 +3552,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -2858,13 +3568,13 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, { "name": "Gert de Pagter", "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for ctype functions", @@ -2875,25 +3585,25 @@ "polyfill", "portable" ], - "time": "2019-02-06 07:57:58" + "time": "2019-08-06 08:03:45" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "999878a3a09d73cae157b0cf89bb6fb2cc073057" + "reference": "66810b9d6eb4af54d543867909d65ab9af654d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/999878a3a09d73cae157b0cf89bb6fb2cc073057", - "reference": "999878a3a09d73cae157b0cf89bb6fb2cc073057", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/66810b9d6eb4af54d543867909d65ab9af654d7e", + "reference": "66810b9d6eb4af54d543867909d65ab9af654d7e", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/intl": "~2.3|~3.0|~4.0" + "symfony/intl": "~2.3|~3.0|~4.0|~5.0" }, "suggest": { "ext-intl": "For best performance" @@ -2901,7 +3611,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -2933,20 +3643,82 @@ "portable", "shim" ], - "time": "2019-01-07 19:39:47" + "time": "2019-08-06 08:03:45" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06 08:03:45" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", "shasum": "" }, "require": { @@ -2958,7 +3730,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -2992,20 +3764,20 @@ "portable", "shim" ], - "time": "2019-02-06 07:57:58" + "time": "2019-08-06 08:03:45" }, { "name": "symfony/polyfill-php56", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "f4dddbc5c3471e1b700a147a20ae17cdb72dbe42" + "reference": "0e3b212e96a51338639d8ce175c046d7729c3403" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/f4dddbc5c3471e1b700a147a20ae17cdb72dbe42", - "reference": "f4dddbc5c3471e1b700a147a20ae17cdb72dbe42", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/0e3b212e96a51338639d8ce175c046d7729c3403", + "reference": "0e3b212e96a51338639d8ce175c046d7729c3403", "shasum": "" }, "require": { @@ -3015,7 +3787,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -3048,20 +3820,20 @@ "portable", "shim" ], - "time": "2019-02-06 07:57:58" + "time": "2019-08-06 08:03:45" }, { "name": "symfony/polyfill-php70", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "bc4858fb611bda58719124ca079baff854149c89" + "reference": "54b4c428a0054e254223797d2713c31e08610831" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/bc4858fb611bda58719124ca079baff854149c89", - "reference": "bc4858fb611bda58719124ca079baff854149c89", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/54b4c428a0054e254223797d2713c31e08610831", + "reference": "54b4c428a0054e254223797d2713c31e08610831", "shasum": "" }, "require": { @@ -3071,7 +3843,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -3107,20 +3879,133 @@ "portable", "shim" ], - "time": "2019-02-06 07:57:58" + "time": "2019-08-06 08:03:45" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "04ce3335667451138df4307d6a9b61565560199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", + "reference": "04ce3335667451138df4307d6a9b61565560199e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06 08:03:45" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", + "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06 08:03:45" }, { "name": "symfony/polyfill-util", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "b46c6cae28a3106735323f00a0c38eccf2328897" + "reference": "4317de1386717b4c22caed7725350a8887ab205c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/b46c6cae28a3106735323f00a0c38eccf2328897", - "reference": "b46c6cae28a3106735323f00a0c38eccf2328897", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4317de1386717b4c22caed7725350a8887ab205c", + "reference": "4317de1386717b4c22caed7725350a8887ab205c", "shasum": "" }, "require": { @@ -3129,7 +4014,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -3159,7 +4044,7 @@ "polyfill", "shim" ], - "time": "2019-02-08 14:16:39" + "time": "2019-08-06 08:03:45" }, { "name": "symfony/swiftmailer-bundle", @@ -3222,16 +4107,16 @@ }, { "name": "symfony/symfony", - "version": "v3.4.17", + "version": "v3.4.31", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "de239d25e0bb3be451a17b627705a5970c6c59e6" + "reference": "944e04808117477f46f804133d17913b77cf63d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/de239d25e0bb3be451a17b627705a5970c6c59e6", - "reference": "de239d25e0bb3be451a17b627705a5970c6c59e6", + "url": "https://api.github.com/repos/symfony/symfony/zipball/944e04808117477f46f804133d17913b77cf63d3", + "reference": "944e04808117477f46f804133d17913b77cf63d3", "shasum": "" }, "require": { @@ -3250,7 +4135,7 @@ "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php56": "~1.0", "symfony/polyfill-php70": "~1.6", - "twig/twig": "^1.35|^2.4.4" + "twig/twig": "^1.41|^2.10" }, "conflict": { "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", @@ -3329,7 +4214,7 @@ "ocramius/proxy-manager": "~0.4|~1.0|~2.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0", "predis/predis": "~1.0", - "symfony/phpunit-bridge": "~3.4|~4.0", + "symfony/phpunit-bridge": "^3.4.31|^4.3.4|~5.0", "symfony/security-acl": "~2.8|~3.0" }, "type": "library", @@ -3348,7 +4233,8 @@ "Symfony\\Component\\": "src/Symfony/Component/" }, "classmap": [ - "src/Symfony/Component/Intl/Resources/stubs" + "src/Symfony/Component/Intl/Resources/stubs", + "src/Symfony/Bridge/ProxyManager/Legacy/ProxiedMethodReturnExpression.php" ], "exclude-from-classmap": [ "**/Tests/" @@ -3373,7 +4259,7 @@ "keywords": [ "framework" ], - "time": "2018-10-03 12:03:55" + "time": "2019-08-26 16:36:53" }, { "name": "twig/extensions", @@ -3432,31 +4318,31 @@ }, { "name": "twig/twig", - "version": "v1.41.0", + "version": "v1.42.3", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "575cd5028362da591facde1ef5d7b94553c375c9" + "reference": "201baee843e0ffe8b0b956f336dd42b2a92fae4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/575cd5028362da591facde1ef5d7b94553c375c9", - "reference": "575cd5028362da591facde1ef5d7b94553c375c9", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/201baee843e0ffe8b0b956f336dd42b2a92fae4e", + "reference": "201baee843e0ffe8b0b956f336dd42b2a92fae4e", "shasum": "" }, "require": { - "php": ">=5.4.0", + "php": ">=5.5.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", - "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "symfony/debug": "^3.4|^4.2", + "symfony/phpunit-bridge": "^4.4@dev|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.41-dev" + "dev-master": "1.42-dev" } }, "autoload": { @@ -3478,15 +4364,15 @@ "homepage": "http://fabien.potencier.org", "role": "Lead Developer" }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, { "name": "Twig Team", "homepage": "https://twig.symfony.com/contributors", "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", @@ -3494,7 +4380,7 @@ "keywords": [ "templating" ], - "time": "2019-05-14 11:59:08" + "time": "2019-08-24 12:51:03" }, { "name": "twitter/bootstrap", @@ -3547,6 +4433,56 @@ ], "time": "2016-07-25 15:51:55" }, + { + "name": "webmozart/assert", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2019-08-24 08:43:50" + }, { "name": "white-october/pagerfanta-bundle", "version": "dev-master", @@ -3644,21 +4580,73 @@ ], "description": "JSONP callback validator.", "time": "2014-01-20 22:35:06" + }, + { + "name": "willdurand/negotiation", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/willdurand/Negotiation.git", + "reference": "03436ededa67c6e83b9b12defac15384cb399dc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/03436ededa67c6e83b9b12defac15384cb399dc9", + "reference": "03436ededa67c6e83b9b12defac15384cb399dc9", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Negotiation\\": "src/Negotiation" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "William Durand", + "email": "will+git@drnd.me" + } + ], + "description": "Content Negotiation tools for PHP provided as a standalone library.", + "homepage": "http://williamdurand.fr/Negotiation/", + "keywords": [ + "accept", + "content", + "format", + "header", + "negotiation" + ], + "time": "2017-05-14 17:21:12" } ], "packages-dev": [ { "name": "doctrine/data-fixtures", - "version": "v1.3.1", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/doctrine/data-fixtures.git", - "reference": "3a1e2c3c600e615a2dffe56d4ca0875cc5233e0a" + "reference": "09b16943b27f3d80d63988d100ff256148c2f78b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/3a1e2c3c600e615a2dffe56d4ca0875cc5233e0a", - "reference": "3a1e2c3c600e615a2dffe56d4ca0875cc5233e0a", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/09b16943b27f3d80d63988d100ff256148c2f78b", + "reference": "09b16943b27f3d80d63988d100ff256148c2f78b", "shasum": "" }, "require": { @@ -3705,7 +4693,7 @@ "keywords": [ "database" ], - "time": "2018-03-20 09:06:36" + "time": "2019-07-10 18:30:35" }, { "name": "doctrine/doctrine-fixtures-bundle", @@ -3820,16 +4808,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v3.4.27", + "version": "v3.4.31", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "a43a2f6c465a2d99635fea0addbebddc3864ad97" + "reference": "028617b04ae19d99d89089626ac969d161244ebc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/a43a2f6c465a2d99635fea0addbebddc3864ad97", - "reference": "a43a2f6c465a2d99635fea0addbebddc3864ad97", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/028617b04ae19d99d89089626ac969d161244ebc", + "reference": "028617b04ae19d99d89089626ac969d161244ebc", "shasum": "" }, "require": { @@ -3881,7 +4869,7 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2019-04-16 09:03:16" + "time": "2019-08-20 13:31:17" } ], "aliases": [], @@ -3894,7 +4882,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.1" + "php": ">=7.1 <7.3" }, "platform-dev": [] } diff --git a/src/Myddleware/ApiBundle/v1_0/Controller/DefaultController.php b/src/Myddleware/ApiBundle/v1_0/Controller/DefaultController.php new file mode 100644 index 000000000..23caedfe2 --- /dev/null +++ b/src/Myddleware/ApiBundle/v1_0/Controller/DefaultController.php @@ -0,0 +1,27 @@ +request->all(); + + return new JsonResponse($data); + + } + + public function generateDocumentsAction(Request $request) + { + $data = $request->request->all(); + + return new JsonResponse($data); + + } +} diff --git a/src/Myddleware/ApiBundle/v1_0/MyddlewareApiBundle.php b/src/Myddleware/ApiBundle/v1_0/MyddlewareApiBundle.php new file mode 100644 index 000000000..5b4291314 --- /dev/null +++ b/src/Myddleware/ApiBundle/v1_0/MyddlewareApiBundle.php @@ -0,0 +1,9 @@ + 'flux.type.create', + 'U' => 'flux.type.update', + 'S' => 'flux.type.search' + ); + } + + // Instanciation de la classe de génération de log Symfony public function __construct(Logger $logger, Container $container, Connection $dbalConnection, $param) { $this->connection = $dbalConnection; @@ -478,7 +487,8 @@ public function ckeckPredecessorDocument() { Document.rule_id = :rule_id AND Document.source_id = :source_id AND Document.date_created < :date_created - AND global_status IN ('Error','Open') + AND Document.deleted = 0 + AND Document.global_status IN ('Error','Open') LIMIT 1 "; $stmt = $this->connection->prepare($sqlParams); @@ -518,6 +528,7 @@ public function ckeckPredecessorDocument() { ON Rule.id = RuleRelationShip.rule_id WHERE Document.rule_id = :rule_id + AND Document.deleted = 0 AND Rule.deleted = 0"; $stmt = $this->connection->prepare($sqlGetChildRules); $stmt->bindValue(":rule_id", $this->document_data['rule_id']); @@ -534,6 +545,7 @@ public function ckeckPredecessorDocument() { WHERE Document.rule_id = :rule_id AND Document.source_id = :source_id + AND Document.deleted = 0 AND Document.date_created < :date_created AND ( global_status = 'Error' @@ -595,6 +607,9 @@ public function ckeckPredecessorDocument() { ) { $this->message .= 'Rule mode only allows to create data. Filter because this document updates data.'; $this->updateStatus('Filter'); + // In case we flter the document, we return false to stop the process when this method is called in the rerun process + $this->connection->commit(); // -- COMMIT TRANSACTION + return false; } $this->connection->commit(); // -- COMMIT TRANSACTION return true; @@ -638,9 +653,19 @@ public function ckeckParentDocument() { } - // Selection des documents antérieurs de la même règle avec le même id au statut différent de closed + // Select previous document in the same rule with the same id and status different than closed $targetId = $this->getTargetId($ruleRelationship,$this->sourceData[$ruleRelationship['field_name_source']]); - if (empty($targetId['record_id'])) { + if (empty($targetId['record_id'])) { + // If no target id found, we check if the parent has been filtered, in this case we filter the relate document too + $documentSearch = $this->searchRelateDocumentByStatus($ruleRelationship,$this->sourceData[$ruleRelationship['field_name_source']], 'Filter'); + if (!empty($documentSearch['id'])) { + $this->docIdRefError = $documentSearch['id']; + $this->typeError = 'W'; + $this->message .= 'Document filter because the parent document is filter too. Check reference column to open the parent document.'; + $this->updateStatus('Filter'); + $this->connection->commit(); // -- COMMIT TRANSACTION + return false; + } $error = true; break; } @@ -1034,7 +1059,7 @@ protected function insertDataTable($data,$type) { foreach ($this->ruleRelationships as $ruleRelationship) { // if field = Myddleware_element_id then we take the id record in the osurce application if ($type == 'S') { - $dataInsert[$ruleRelationship['field_name_source']] = ($ruleRelationship['field_name_source'] == 'Myddleware_element_id' ? $data['id'] : $data[$ruleRelationship['field_name_source']]); + $dataInsert[$ruleRelationship['field_name_source']] = ($ruleRelationship['field_name_source'] == 'Myddleware_element_id' ? $data['id'] : (!empty($data[$ruleRelationship['field_name_source']]) ? $data[$ruleRelationship['field_name_source']] : '')); } else { $dataInsert[$ruleRelationship['field_name_target']] = (!empty($data[$ruleRelationship['field_name_target']]) ? $data[$ruleRelationship['field_name_target']] : ''); } @@ -1299,7 +1324,7 @@ public function isChild() { // Check if the document is a child protected function getChildDocuments() { try { - $sqlGetChilds = "SELECT * FROM Document WHERE parent_id = :docId"; + $sqlGetChilds = "SELECT * FROM Document WHERE parent_id = :docId AND deleted = 0 "; $stmt = $this->connection->prepare($sqlGetChilds); $stmt->bindValue(":docId", $this->id); $stmt->execute(); @@ -1417,6 +1442,7 @@ protected function checkRecordExist($id) { ) AND Document.source_id = :id AND Document.id != :id_doc + AND Document.deleted = 0 ORDER BY target_id DESC, global_status DESC LIMIT 1"; @@ -1437,6 +1463,7 @@ protected function checkRecordExist($id) { ) AND Document.target_id = :id AND Document.id != :id_doc + AND Document.deleted = 0 ORDER BY target_id DESC, global_status DESC LIMIT 1"; @@ -1607,6 +1634,10 @@ public function documentCancel() { $this->updateStatus('Cancel'); } + public function changeDeleteFlag($deleteFlag) { + $this->updateDeleteFlag($deleteFlag); + } + public function updateStatus($new_status) { $this->connection->beginTransaction(); // -- BEGIN TRANSACTION try { @@ -1652,6 +1683,35 @@ public function updateStatus($new_status) { } } + public function updateDeleteFlag($deleted) { + $this->connection->beginTransaction(); // -- BEGIN TRANSACTION + try { + $now = gmdate('Y-m-d H:i:s'); + $query = " UPDATE Document + SET + date_modified = :now, + deleted = :deleted + WHERE + id = :id + "; + echo (!empty($deleted) ? 'Remove' : 'Restore').' document id = '.$this->id.' '.$now.chr(10); + $stmt = $this->connection->prepare($query); + $stmt->bindValue(":now", $now); + $stmt->bindValue(":deleted", $deleted); + $stmt->bindValue(":id", $this->id); + $stmt->execute(); + $this->message .= (!empty($deleted) ? 'Remove' : 'Restore').' document'; + $this->connection->commit(); // -- COMMIT TRANSACTION + $this->createDocLog(); + } catch (\Exception $e) { + $this->connection->rollBack(); // -- ROLLBACK TRANSACTION + $this->message .= 'Failed to '.(!empty($deleted) ? 'Remove ' : 'Restore ').' : '.$e->getMessage().' '.$e->getFile().' Line : ( '.$e->getLine().' )'; + $this->typeError = 'E'; + $this->logger->error( $this->message ); + $this->createDocLog(); + } + } + // Save document relationship protected function insertDocumentRelationship ($ruleRelationship, $docRelId) { try { @@ -1786,6 +1846,7 @@ protected function getTargetId($ruleRelationship,$record_id) { WHERE Document.rule_id = :ruleRelateId AND Document.source_id != '' + AND Document.deleted = 0 AND Document.target_id = :record_id AND ( Document.global_status = 'Close' @@ -1801,6 +1862,7 @@ protected function getTargetId($ruleRelationship,$record_id) { WHERE Document.rule_id = :ruleRelateId AND Document.source_id = :record_id + AND Document.deleted = 0 AND Document.target_id != '' AND ( Document.global_status = 'Close' @@ -1866,6 +1928,51 @@ protected function getTargetId($ruleRelationship,$record_id) { } } + // Search relate document by status + protected function searchRelateDocumentByStatus($ruleRelationship,$record_id, $status) { + try { + $direction = $this->getRelationshipDirection($ruleRelationship); + // En fonction du sens de la relation, la recherche du parent id peut-être inversée (recherchée en source ou en cible) + // Search all documents with target ID not empty in status close or no_send (document canceled but it is a real document) + if ($direction == '-1') { + $sqlParams = " SELECT * + FROM Document + WHERE + Document.rule_id = :ruleRelateId + AND Document.target_id = :record_id + AND Document.status = :status + AND Document.deleted = 0 + LIMIT 1"; + } + elseif ($direction == '1') { + $sqlParams = " SELECT * + FROM Document + WHERE + Document.rule_id = :ruleRelateId + AND Document.source_id = :record_id + AND Document.status = :status + AND Document.deleted = 0 + LIMIT 1"; + } + else { + throw new \Exception( 'Failed to find the direction of the relationship with the rule_id '.$ruleRelationship['field_id'].'. ' ); + } + $stmt = $this->connection->prepare($sqlParams); + $stmt->bindValue(":ruleRelateId", $ruleRelationship['field_id']); + $stmt->bindValue(":record_id", $record_id); + $stmt->bindValue(":status", $status); + $stmt->execute(); + $result = $stmt->fetch(); + if (!empty($result['id'])) { + return $result; + } + } catch (\Exception $e) { + $this->message .= 'Error searchRelateDocumentByStatus : '.$e->getMessage().' '.$e->getFile().' Line : ( '.$e->getLine().' )'; + $this->logger->error( $this->message ); + } + return null; + } + // Permet de renvoyer le statut du document public function getStatus() { return $this->status; diff --git a/src/Myddleware/RegleBundle/Classes/home.php b/src/Myddleware/RegleBundle/Classes/home.php index c59ae32fe..3a0d0983d 100644 --- a/src/Myddleware/RegleBundle/Classes/home.php +++ b/src/Myddleware/RegleBundle/Classes/home.php @@ -52,7 +52,7 @@ public function errorByRule($is_support, $id) { try { if($is_support == false) { - $where = ' WHERE created_by='.$id; + $where = ' WHERE Rule.created_by='.$id; } else { $where = ''; @@ -66,6 +66,7 @@ public function errorByRule($is_support, $id) { LEFT OUTER JOIN Document ON Rule.id = Document.rule_id AND Document.global_status IN ('Open','Error') + AND Document.deleted = 0 $where GROUP BY Rule.name, Rule.id HAVING cpt > 0 @@ -110,6 +111,7 @@ public function closedByRule($is_support, $id) { LEFT OUTER JOIN Document ON Rule.id = Document.rule_id AND Document.global_status = 'Close' + AND Document.deleted = 0 WHERE Rule.active = 1 AND Rule.deleted = 0 @@ -134,6 +136,7 @@ public function listError($nbJour = false) { INNER JOIN Rule ON Rule.id = Document.rule_id AND Document.global_status = 'Error' + AND Document.deleted = 0 WHERE Rule.active = 1 AND Rule.deleted = 0"; @@ -148,9 +151,9 @@ public function listError($nbJour = false) { public function countTypeDoc($isAdmin, $id) { try { - $where = ''; + $where = ' WHERE Document.deleted = 0 '; if($isAdmin == false) { - $where = 'WHERE created_by='.$id; + $where .= ' AND created_by='.$id; } $sql = "SELECT count(*) as nb, global_status @@ -181,6 +184,7 @@ public function countTransferRule($isAdmin, $id) { FROM Rule INNER JOIN Document ON Rule.id = Document.rule_id + AND Document.deleted = 0 WHERE Document.global_status = 'Close' $where @@ -217,7 +221,7 @@ public function countTransferHisto($isAdmin, $id) { } // Select the number of transfert per day - $sql = "SELECT DATE_FORMAT(date_modified, '%Y-%m-%d') date, global_status, count(*) nb FROM Document WHERE date_modified >= DATE_ADD(CURDATE(), INTERVAL -".$this->historicDays." DAY) ".$where." GROUP BY date, global_status"; + $sql = "SELECT DATE_FORMAT(date_modified, '%Y-%m-%d') date, global_status, count(*) nb FROM Document WHERE Document.deleted = 0 AND date_modified >= DATE_ADD(CURDATE(), INTERVAL -".$this->historicDays." DAY) ".$where." GROUP BY date, global_status"; $stmt = $this->connection->prepare($sql); $stmt->execute(); $result = $stmt->fetchAll(); @@ -236,7 +240,7 @@ public function countJobHisto($isAdmin, $id) { try { $historic = array(); // Select last jobs - $sql = "SELECT begin date, open, close, cancel, error FROM Job ORDER BY begin DESC LIMIT ".$this->nbHistoricJobs; + $sql = "SELECT begin date, open, close, cancel, error FROM Job LIMIT ".$this->nbHistoricJobs; $stmt = $this->connection->prepare($sql); $stmt->execute(); $result = $stmt->fetchAll(); diff --git a/src/Myddleware/RegleBundle/Classes/job.php b/src/Myddleware/RegleBundle/Classes/job.php index e1dcf6afd..4116936be 100644 --- a/src/Myddleware/RegleBundle/Classes/job.php +++ b/src/Myddleware/RegleBundle/Classes/job.php @@ -170,6 +170,7 @@ public function runError($limit, $attempt) { ON Document.rule_id = RuleOrder.rule_id WHERE global_status = 'Error' + AND deleted = 0 AND attempt <= :attempt ORDER BY RuleOrder.order ASC, source_date_modified ASC LIMIT $limit"; @@ -233,10 +234,12 @@ public function closeJob() { // Permet d'exécuter des jobs manuellement depuis Myddleware - public function actionMassTransfer($event,$param) { + public function actionMassTransfer($event, $datatype, $param) { if (in_array($event, array('rerun','cancel'))) { - // Pour ces 2 actions, l'event est le premier paramètre et ce sont les ids des cocuments qui sont envoyés dans le $param + // Pour ces 2 actions, l'event est le premier paramètre, le type de donnée est le deuxième + // et ce sont les ids des documents ou règles qui sont envoyés dans le $param $paramJob[] = $event; + $paramJob[] = $datatype; $paramJob[] = implode(',',$param); return $this->runBackgroundJob('massaction',$paramJob); } @@ -305,14 +308,9 @@ public function runBackgroundJob($job,$param) { } // Fonction permettant d'annuler massivement des documents - public function massAction($action,$idsDoc) { - if (empty($idsDoc)) { - $this->message .= 'No Ids in parameters of the job massAction.'; - return false; - } - + public function massAction($action, $dataType, $idsDoc, $forceAll, $fromStatus, $toStatus) { try { - // Formatage du tableau d'idoc + // Build IN parameter² $idsDocArray = explode(',',$idsDoc); $queryIn = '('; foreach ($idsDocArray as $idDoc) { @@ -321,17 +319,42 @@ public function massAction($action,$idsDoc) { $queryIn = rtrim($queryIn,','); $queryIn .= ')'; - // Création de la requête + // Buid WHERE section + // Filter on rule or docuement depending on the data type + $where = ' WHERE '; + if ($dataType == 'rule') { + $where .= " Rule.id IN $queryIn "; + } elseif ($dataType == 'document') { + $where .= " Document.id IN $queryIn "; + } + // No filter on status if the action is restore/changeStatus or if forceAll = 'Y' + if ( + $forceAll != 'Y' + AND $action != 'restore' + AND $action != 'changeStatus' + ) { + $where .= " AND Document.global_status IN ('Open','Error') "; + } + // Filter on relevant delete flag (select deleted = 1 only for restore action) + if ($action == 'restore') { + $where .= " AND Document.deleted = 1 "; + } else { + $where .= " AND Document.deleted = 0 "; + } + // Filter on status for the changeStatus action + if ($action == 'changeStatus') { + $where .= " AND Document.status = '$fromStatus' "; + } + + // Build the query $sqlParams = " SELECT Document.id, Document.rule_id FROM Document INNER JOIN Rule - ON Document.rule_id = Rule.id - WHERE - Document.global_status IN ('Open','Error') - AND Document.id IN $queryIn - ORDER BY Rule.id"; + ON Document.rule_id = Rule.id" + .$where." + ORDER BY Rule.id"; $stmt = $this->connection->prepare($sqlParams); $stmt->execute(); $documents = $stmt->fetchAll(); @@ -346,7 +369,7 @@ public function massAction($action,$idsDoc) { $param['jobId'] = $this->id; $rule = new rule($this->logger, $this->container, $this->connection, $param); } - $errorActionDocument = $rule->actionDocument($document['id'],$action); + $errorActionDocument = $rule->actionDocument($document['id'],$action, $toStatus); if (!empty($errorActionDocument)) { $this->message .= print_r($errorActionDocument,true); } @@ -411,6 +434,15 @@ public function readRecord($ruleId, $filterQuery, $filterValues) { } } + // Remove all data flagged deleted in the database + public function pruneDatabase() { + // Documents + + // Rules + + // Connectors + } + public function getRules() { try { $sqlParams = " SELECT name_slug @@ -636,6 +668,7 @@ public function clearData() { WHERE Document.rule_id = :ruleId AND Document.global_status IN ('Close','Cancel') + AND Document.deleted = 0 AND Document.date_modified < :limitDate "; $stmt = $this->connection->prepare($deleteSource); $stmt->bindValue("ruleId", $rule['id']); @@ -663,6 +696,7 @@ public function clearData() { Log.rule_id = :ruleId AND Log.msg IN ('Status : Filter_OK','Status : Predecessor_OK','Status : Relate_OK','Status : Transformed','Status : Ready_to_send') AND Document.global_status IN ('Close','Cancel') + AND Document.deleted = 0 AND Document.date_modified < :limitDate "; $stmt = $this->connection->prepare($deleteLog); $stmt->bindValue("ruleId", $rule['id']); diff --git a/src/Myddleware/RegleBundle/Classes/notification.php b/src/Myddleware/RegleBundle/Classes/notification.php index 8f8f18a93..513801a7f 100644 --- a/src/Myddleware/RegleBundle/Classes/notification.php +++ b/src/Myddleware/RegleBundle/Classes/notification.php @@ -75,7 +75,11 @@ public function sendAlert() { $textMail .= $this->tools->getTranslation(array('email_alert', 'introduction')).' '.$notificationParameter['alert_time_limit'].' '.$this->tools->getTranslation(array('email_alert', 'minute')).chr(10).chr(10); $textMail .= $this->tools->getTranslation(array('email_alert', 'job_start')).' '.$job['begin']; $textMail .= $this->tools->getTranslation(array('email_alert', 'job_id')).' '.$job['id'].chr(10).chr(10); - $textMail .= $this->tools->getTranslation(array('email_alert', 'recommandation')).chr(10).chr(10); + $textMail .= $this->tools->getTranslation(array('email_alert', 'recommandation')).chr(10).chr(10); + // Add url if the parameter base_uri is defined in app\config\public + if (!empty($this->container->getParameter('base_uri'))) { + $textMail .= chr(10).$this->container->getParameter('base_uri').chr(10); + } $textMail .= $this->tools->getTranslation(array('email_notification', 'best_regards')).chr(10).$this->tools->getTranslation(array('email_notification', 'signature')); $message = \Swift_Message::newInstance() ->setSubject($this->tools->getTranslation(array('email_alert', 'subject'))) @@ -121,7 +125,8 @@ public function sendNotification() { INNER JOIN Rule ON Log.rule_id = Rule.id INNER JOIN Document - ON Document.id = Log.doc_id + ON Document.id = Log.doc_id + AND Document.deleted = 0 WHERE Job.begin BETWEEN (SELECT MAX(begin) FROM Job WHERE param = 'notification' AND end >= begin) AND NOW() AND ( @@ -194,7 +199,8 @@ public function sendNotification() { INNER JOIN Rule ON Log.rule_id = Rule.id INNER JOIN Document - ON Document.id = Log.doc_id + ON Document.id = Log.doc_id + AND Document.deleted = 0 WHERE Job.begin BETWEEN (SELECT MAX(begin) FROM Job WHERE param = 'notification' AND end >= begin) AND NOW() AND Document.date_modified BETWEEN (SELECT MAX(begin) FROM Job WHERE param = 'notification' AND end >= begin) AND NOW() @@ -217,8 +223,13 @@ public function sendNotification() { } } + // Add url if the parameter base_uri is defined in app\config\public + if (!empty($this->container->getParameter('base_uri'))) { + $textMail .= chr(10).$this->container->getParameter('base_uri').chr(10); + } // Create text $textMail .= chr(10).$this->tools->getTranslation(array('email_notification', 'best_regards')).chr(10).$this->tools->getTranslation(array('email_notification', 'signature')); + $message = \Swift_Message::newInstance() ->setSubject($this->tools->getTranslation(array('email_notification', 'subject'))) ->setFrom('no-reply@myddleware.com') diff --git a/src/Myddleware/RegleBundle/Classes/rule.php b/src/Myddleware/RegleBundle/Classes/rule.php index 1f931f77c..6a1c8693d 100644 --- a/src/Myddleware/RegleBundle/Classes/rule.php +++ b/src/Myddleware/RegleBundle/Classes/rule.php @@ -33,6 +33,8 @@ use Symfony\Component\Form\Extension\Core\Type\IntegerType; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\Filesystem\Filesystem; +use Myddleware\RegleBundle\Entity\RuleParamAudit as RuleParamAudit; + use Myddleware\RegleBundle\Classes\tools as MyddlewareTools; // Tools use Myddleware\RegleBundle\Entity\RuleParam; @@ -354,12 +356,31 @@ protected function getJobStatus() { // Permet de mettre à jour la date de référence pour ne pas récupérer une nouvelle fois les données qui viennent d'être écrites dans la cible protected function updateReferenceDate() { - $date_ref = $this->dataSource['date_ref']; - $sqlDateReference = "UPDATE RuleParam SET value = :date_ref WHERE name = 'datereference' AND rule_id = :ruleId"; - $stmt = $this->connection->prepare($sqlDateReference); - $stmt->bindValue(":ruleId", $this->ruleId); - $stmt->bindValue(":date_ref", $date_ref); - $stmt->execute(); + $param = $this->em->getRepository('RegleBundle:RuleParam') + ->findOneBy(array( + 'rule' => $this->ruleId, + 'name' => 'datereference' + ) + ); + // Every rules should have the param datereference + if (empty($param)) { + throw new \Exception ('No reference date for the rule '.$this->ruleId.'.'); + } else { + // Save param modification in the audit table + if ($param->getValue() != $this->dataSource['date_ref']) { + $paramAudit = new RuleParamAudit(); + $paramAudit->setRuleParamId($param->getId()); + $paramAudit->setDateModified(new \DateTime); + $paramAudit->setBefore($param->getValue()); + $paramAudit->setAfter($this->dataSource['date_ref']); + $paramAudit->setJob($this->jobId); + $this->em->persist($paramAudit); + } + // Update reference + $param->setValue($this->dataSource['date_ref']); + $this->em->persist($param); + $this->em->flush(); + } } // Update/create rule parameter @@ -658,7 +679,7 @@ public function sendDocuments() { return $sendTarget; } - public function actionDocument($id_document,$event) { + public function actionDocument($id_document,$event, $param1 = null) { switch ($event) { case 'rerun': return $this->rerun($id_document); @@ -666,6 +687,15 @@ public function actionDocument($id_document,$event) { case 'cancel': return $this->cancel($id_document); break; + case 'remove': + return $this->changeDeleteFlag($id_document,true); + break; + case 'restore': + return $this->changeDeleteFlag($id_document,false); + break; + case 'changeStatus': + return $this->changeStatus($id_document,$param1); + break; default: return 'Action '.$event.' unknown. Failed to run this action. '; } @@ -829,7 +859,7 @@ protected function cancel($id_document) { // On affiche alors le message directement dans Myddleware if (empty($this->jobId)) { if (empty($message)) { - $session->set( 'success', array('Annulation du transfert effectuée avec succès.')); + $session->set( 'success', array('Data transfer has been successfully cancelled.')); } else { $session->set( 'error', array($doc->getMessage())); @@ -837,6 +867,35 @@ protected function cancel($id_document) { } } + // Remove a document + protected function changeDeleteFlag($id_document,$deleteFlag) { + $param['id_doc_myddleware'] = $id_document; + $param['jobId'] = $this->jobId; + $doc = new document($this->logger, $this->container, $this->connection, $param); + $doc->changeDeleteFlag($deleteFlag); + $session = new Session(); + $message = $doc->getMessage(); + + // Si on a pas de jobId cela signifie que l'opération n'est pas massive mais sur un seul document + // On affiche alors le message directement dans Myddleware + if (empty($this->jobId)) { + if (empty($message)) { + $session->set( 'success', array('Data transfer has been successfully removed.')); + } + else { + $session->set( 'error', array($doc->getMessage())); + } + } + } + + // Remove a document + protected function changeStatus($id_document,$toStatus) { + $param['id_doc_myddleware'] = $id_document; + $param['jobId'] = $this->jobId; + $doc = new document($this->logger, $this->container, $this->connection, $param); + $doc->updateStatus($toStatus); + } + protected function runMyddlewareJob($ruleSlugName) { try{ $session = new Session(); @@ -1112,7 +1171,7 @@ protected function sendTarget($type, $documentId = null) { } else { $response[$documentId] = false; - $doc->setMessage('Type transfer '.$type.' unknown. '); + $response['error']= 'Type transfer '.$type.' unknown. '; } } else { @@ -1197,6 +1256,7 @@ protected function selectDocuments($status, $type = '') { WHERE rule_id = :ruleId AND status = :status + AND Document.deleted = 0 ORDER BY Document.source_date_modified ASC LIMIT $this->limit "; @@ -1212,7 +1272,8 @@ protected function selectDocuments($status, $type = '') { // Permet de récupérer les données d'un document protected function getDocumentHeader($documentId) { - try { + try { + // We allow to get date from a document flagged deleted $query_document = "SELECT * FROM Document WHERE id = :documentId"; $stmt = $this->connection->prepare($query_document); $stmt->bindValue(":documentId", $documentId); @@ -1230,17 +1291,22 @@ protected function getDocumentHeader($documentId) { } protected function getSendDocuments($type,$documentId,$table = 'target',$parentDocId = '',$parentRuleId = '') { + // Init $limit parameter + $limit = " LIMIT ".$this->limit; // Si un document est en paramètre alors on filtre la requête sur le document if (!empty($documentId)) { $documentFilter = " Document.id = '$documentId'"; } elseif (!empty($parentDocId)) { - $documentFilter = " Document.parent_id = '$parentDocId' AND Document.rule_id = '$parentRuleId' "; + $documentFilter = " Document.parent_id = '$parentDocId' AND Document.rule_id = '$parentRuleId' "; + // No limit when it comes to child rule. A document could have more than $limit child documents + $limit = ""; } // Sinon on récupère tous les documents élligible pour l'envoi else { $documentFilter = " Document.rule_id = '$this->ruleId' AND Document.status = 'Ready_to_send' + AND Document.deleted = 0 AND Document.type = '$type' "; } // Sélection de tous les documents au statut transformed en attente de création pour la règle en cours @@ -1248,7 +1314,7 @@ protected function getSendDocuments($type,$documentId,$table = 'target',$parentD FROM Document WHERE $documentFilter ORDER BY Document.source_date_modified ASC - LIMIT $this->limit"; + $limit"; $stmt = $this->connection->prepare($sql); $stmt->execute(); $documents = $stmt->fetchAll(); diff --git a/src/Myddleware/RegleBundle/Classes/template.php b/src/Myddleware/RegleBundle/Classes/template.php index 7eb99c576..4b6149522 100644 --- a/src/Myddleware/RegleBundle/Classes/template.php +++ b/src/Myddleware/RegleBundle/Classes/template.php @@ -358,20 +358,30 @@ public function convertTemplate($templateName) { // Create rule relationship if (!empty($rule['relationships'])) { - foreach ($rule['relationships'] as $relationship) { + foreach ($rule['relationships'] as $relationship) { // Check source field if ( empty($sourceFieldsList[$relationship['fieldNameSource']]) && $relationship['fieldNameSource'] != 'Myddleware_element_id' - ) { + ) { throw new \Exception('Field '.$relationship['fieldNameSource'].' not found in the module '.$rule['sourceModule'].'. Please make sure that you have access to this field. '); } // Check target field if ( - empty($targetFieldsList[$relationship['fieldNameTarget']]) - && $relationship['fieldNameTarget'] != 'Myddleware_element_id' - ) { - throw new \Exception('Field '.$relationship['fieldNameTarget'].' not found in the module '.$rule['targetModule'].'. Please make sure that you have access to this field. '); + ( + empty($relationship['parent']) + AND empty($targetFieldsList[$relationship['fieldNameTarget']]) + AND $relationship['fieldNameTarget'] != 'Myddleware_element_id' + ) + // We check source field in case of child rule + OR + ( + !empty($relationship['parent']) + AND empty($sourceFieldsList[$relationship['fieldNameTarget']]) + AND $relationship['fieldNameSource'] != 'Myddleware_element_id' + ) + ) { + throw new \Exception('Field '.$relationship['fieldNameTarget'].' not found in the module '.(empty($relationship['parent']) ? $rule['targetModule'] : $rule['sourceModule']).'. Please make sure that you have access to this field. '); } $relationshipObjecy = new RuleRelationShip(); $relationshipObjecy->setRule($ruleObject->getId()); diff --git a/src/Myddleware/RegleBundle/Command/RerunErrorCommand.php b/src/Myddleware/RegleBundle/Command/RerunErrorCommand.php index b1da5d0c1..9a0d6aaee 100644 --- a/src/Myddleware/RegleBundle/Command/RerunErrorCommand.php +++ b/src/Myddleware/RegleBundle/Command/RerunErrorCommand.php @@ -50,6 +50,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $attempt = $input->getArgument('attempt'); // Récupération du Job $job = $this->getContainer()->get('myddleware_job.job'); + // Clear message in case this task is run by jobscheduler. In this case message has to be refreshed. + $job->message = ''; if ($job->initJob('Rerun error : limit '.$limit.', attempt '.$attempt)) { // Premier paramètre : limite d'enregistrement traités diff --git a/src/Myddleware/RegleBundle/Command/TaskCommand.php b/src/Myddleware/RegleBundle/Command/TaskCommand.php index 0f7fe8f57..a668516b5 100644 --- a/src/Myddleware/RegleBundle/Command/TaskCommand.php +++ b/src/Myddleware/RegleBundle/Command/TaskCommand.php @@ -51,7 +51,9 @@ protected function execute(InputInterface $input, OutputInterface $output) // alias de la règle en params $rule = $input->getArgument('rule'); // Récupération du Job - $job = $this->getContainer()->get('myddleware_job.job'); + $job = $this->getContainer()->get('myddleware_job.job'); + // Clear message in case this task is run by jobscheduler. In this case message has to be refreshed. + $job->message = ''; if ($job->initJob('Synchro : '.$rule)) { $output->writeln( '1;'.$job->id ); // Ne pas supprimer car nécessaire pour afficher les log d'un job manuel diff --git a/src/Myddleware/RegleBundle/Command/clearDataCommand.php b/src/Myddleware/RegleBundle/Command/clearDataCommand.php index ed0443f50..c900c9e72 100644 --- a/src/Myddleware/RegleBundle/Command/clearDataCommand.php +++ b/src/Myddleware/RegleBundle/Command/clearDataCommand.php @@ -44,7 +44,9 @@ protected function execute(InputInterface $input, OutputInterface $output) $logger = $this->getContainer()->get('logger'); $job = $this->getContainer()->get('myddleware_job.job'); - + // Clear message in case this task is run by jobscheduler. In this case message has to be refreshed. + $job->message = ''; + if ($job->initJob('cleardata')) { $job->clearData(); } diff --git a/src/Myddleware/RegleBundle/Command/massActionCommand.php b/src/Myddleware/RegleBundle/Command/massActionCommand.php index 2479e02d3..021b92ecb 100644 --- a/src/Myddleware/RegleBundle/Command/massActionCommand.php +++ b/src/Myddleware/RegleBundle/Command/massActionCommand.php @@ -39,8 +39,12 @@ protected function configure() $this ->setName('myddleware:massaction') ->setDescription('Action massive sur les flux') - ->addArgument('action', InputArgument::REQUIRED, "Action") // id séparés par des ";" - ->addArgument('idsDoc', InputArgument::REQUIRED, "Ids de document") // id séparés par des ";" + ->addArgument('action', InputArgument::REQUIRED, "Action (rerun, cancel, remove, restore or changeStatus)") + ->addArgument('dataType', InputArgument::REQUIRED, "Data type (rule or doculent)") + ->addArgument('ids', InputArgument::REQUIRED, "Rule or document ids") // id séparés par des ";" + ->addArgument('forceAll', InputArgument::OPTIONAL, "Set Y to process action on all documents (not only open and erro ones)") + ->addArgument('fromStatus', InputArgument::OPTIONAL, "Get all document with this status(Only with changeStatus action)") + ->addArgument('toStatus', InputArgument::OPTIONAL, "Set this status (Only with changeStatus action)") ; } @@ -49,18 +53,43 @@ protected function execute(InputInterface $input, OutputInterface $output) $step = 1; try { $logger = $this->getContainer()->get('logger'); - - // Récupération des paramètres - $action = $input->getArgument('action'); - $idsDoc = $input->getArgument('idsDoc'); // Récupération du Job $job = $this->getContainer()->get('myddleware_job.job'); + // Clear message in case this task is run by jobscheduler. In this case message has to be refreshed. + $job->message = ''; + + $action = $input->getArgument('action'); + $dataType = $input->getArgument('dataType'); + $ids = $input->getArgument('ids'); + $forceAll = $input->getArgument('forceAll'); + $fromStatus = $input->getArgument('fromStatus'); + $toStatus = $input->getArgument('toStatus'); - if ($job->initJob('Mass '.$action)) { + if ($job->initJob('Mass '.$action.' on data type '.$dataType)) { $output->writeln( $job->id ); // Ne pas supprimer car nécessaire pour afficher les log d'un job manuel - - // Annulation en masse - $job->massAction($action,$idsDoc); + + // Récupération des paramètres + if (!in_array($action, array('rerun', 'cancel', 'remove', 'restore', 'changeStatus'))) { + throw new \Exception ('Action '.$action.' unknown. Please use action rerun, cancel or remove.'); + } + if (!in_array($dataType, array('document', 'rule'))) { + throw new \Exception ('Data type '.$dataType.' unknown. Please use data type document or rule.'); + } + if (empty($ids)) { + throw new \Exception ('No ids in the command parameters. Please add ids to run this action.'); + } + if ( + $action == 'changeStatus' + AND ( + empty($fromStatus) + OR empty($toStatus) + ) + ) { + throw new \Exception ('fromStatus and toStatus parameters are required for the changeStatus action.'); + } + + // Mass action + $job->massAction($action, $dataType, $ids, $forceAll, $fromStatus, $toStatus); } else { $output->writeln( $job->id ); // Ne pas supprimer car nécessaire pour afficher les log d'un job manuel diff --git a/src/Myddleware/RegleBundle/Command/notificationCommand.php b/src/Myddleware/RegleBundle/Command/notificationCommand.php index 81ca30eae..7806525cf 100644 --- a/src/Myddleware/RegleBundle/Command/notificationCommand.php +++ b/src/Myddleware/RegleBundle/Command/notificationCommand.php @@ -43,34 +43,36 @@ protected function configure() { } protected function execute(InputInterface $input, OutputInterface $output) { - // We don't create job for alert - $notification = $this->getContainer()->get('myddleware.notification'); - if ($input->getArgument('type') == 'alert') { - try { - $notification->sendAlert(); - } - catch(\Exception $e) { - $output->writeln( ''.$e->getMessage().''); - } + // We don't create job for alert + $notification = $this->getContainer()->get('myddleware.notification'); + if ($input->getArgument('type') == 'alert') { + try { + $notification->sendAlert(); } - // Standard notification - else { - try { - $logger = $this->getContainer()->get('logger'); - $job = $this->getContainer()->get('myddleware_job.job'); - if ($job->initJob('notification')) { - $notification->sendNotification(); - } - } - catch(\Exception $e) { - $job->message = $e->getMessage(); - $output->writeln( ''.$e->getMessage().''); - } - // Close job if it has been created - if($job->createdJob == true) { - $job->closeJob(); + catch(\Exception $e) { + $output->writeln( ''.$e->getMessage().''); + } + } + // Standard notification + else { + try { + $logger = $this->getContainer()->get('logger'); + $job = $this->getContainer()->get('myddleware_job.job'); + // Clear message in case this task is run by jobscheduler. In this case message has to be refreshed. + $job->message = ''; + if ($job->initJob('notification')) { + $notification->sendNotification(); } } + catch(\Exception $e) { + $job->message = $e->getMessage(); + $output->writeln( ''.$e->getMessage().''); + } + // Close job if it has been created + if($job->createdJob == true) { + $job->closeJob(); + } + } } diff --git a/src/Myddleware/RegleBundle/Command/pruneDatabaseCommand.php b/src/Myddleware/RegleBundle/Command/pruneDatabaseCommand.php new file mode 100644 index 000000000..36b74a2d5 --- /dev/null +++ b/src/Myddleware/RegleBundle/Command/pruneDatabaseCommand.php @@ -0,0 +1,67 @@ +. +*********************************************************************************/ + +namespace Myddleware\RegleBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +class pruneDatabaseCommand extends ContainerAwareCommand +{ + protected function configure() + { + $this + ->setName('myddleware:prunedatabase') + ->setDescription('Remove all data flagged as deleted in Myddleware') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $logger = $this->getContainer()->get('logger'); + + $job = $this->getContainer()->get('myddleware_job.job'); + // Clear message in case this task is run by jobscheduler. In this case message has to be refreshed. + $job->message = ''; + + if ($job->initJob('Prune database')) { + $job->pruneDatabase(); + } + + // Close job if it has been created + if($job->createdJob === true) { + $job->closeJob(); + } + + // Display message on the console + if (!empty($job->message)) { + $output->writeln(''.$job->message.''); + $logger->error($job->message); + } + } + + +} \ No newline at end of file diff --git a/src/Myddleware/RegleBundle/Controller/ConnectorController.php b/src/Myddleware/RegleBundle/Controller/ConnectorController.php index c07bebe0e..e2786b669 100644 --- a/src/Myddleware/RegleBundle/Controller/ConnectorController.php +++ b/src/Myddleware/RegleBundle/Controller/ConnectorController.php @@ -52,10 +52,10 @@ class ConnectorController extends Controller // CALLBACK POUR LES APIS public function callBackAction() { // REV 1.1.1 try { - /* @var $sessionService SessionService */ - $sessionService = $this->get('myddleware_session.service'); + /* @var $sessionService SessionService */ + $sessionService = $this->get('myddleware_session.service'); - // Nom de la solution + // Nom de la solution if(!$sessionService->isSolutionNameExist()) { return new Response(''); } @@ -181,27 +181,24 @@ public function callBackAction() { // REV 1.1.1 // Contrôle si le fichier upload est valide puis le déplace public function uploadAction($solution) // REV 1.1.0 - { - + { if( isset($solution) ) { - if(in_array(trim($solution), array('sagecrm','sapcrm','sap','zuora'))){ - $output_dir = __DIR__."/../Custom/Solutions/".trim($solution)."/wsdl/"; - // Get canonicalized absolute pathname - $path = realpath($output_dir); - // If it exist, check if it's a directory - if($path === false || !is_dir($path)) { - try { - if(!mkdir($output_dir,755,true)) { - echo '0;'.'Directory '.$output_dir.' doesn\'t exist. Failed to create this directory. Please check directory Custom is readable by webuser. You can create manually the directory for the Sage wsdl too. '; - exit; - } - } - catch (\Exception $e) { - echo '0;'.$e->getMessage().'. Please check you have the web user has the permission to write in the directory '.__DIR__.'/../Custom . '; + $output_dir = __DIR__."/../Custom/Solutions/".trim($solution)."/file/"; + // Get canonicalized absolute pathname + $path = realpath($output_dir); + // If it exist, check if it's a directory + if($path === false || !is_dir($path)) { + try { + if(!mkdir($output_dir,755,true)) { + echo '0;'.'Directory '.$output_dir.' doesn\'t exist. Failed to create this directory. Please check directory Custom is readable by webuser. You can create manually the directory for the Sage wsdl too. '; exit; } } - } + catch (\Exception $e) { + echo '0;'.$e->getMessage().'. Please check you have the web user has the permission to write in the directory '.__DIR__.'/../Custom . '; + exit; + } + } } /* @var $sessionService SessionService */ $sessionService = $this->get('myddleware_session.service'); @@ -344,6 +341,7 @@ public function connectorInsertAction(Request $request) { $connector->setDateModified(new \DateTime); $connector->setCreatedBy( $this->getUser()->getId() ); $connector->setModifiedBy( $this->getUser()->getId() ); + $connector->setDeleted(0); $em->persist($connector); $em->flush(); @@ -434,53 +432,60 @@ public function connectorListAction($page) { } // SUPPRESSION DU CONNECTEUR - public function connectorDeleteAction($id) { - + public function connectorDeleteAction(Request $request, $id) { + $session = $request->getSession(); if(isset($id)) { - - // Detecte si la session est le support --------- + // Check permission $permission = $this->get('myddleware.permission'); - if( $permission->isAdmin($this->getUser()->getId()) ) { $list_fields_sql = array('id' => $id); } else { $list_fields_sql = array('id' => $id, - 'createdBy' => $this->getUser()->getId() + 'createdBy' => $this->getUser()->getId() ); - } - // Detecte si la session est le support --------- - - // Récupère le connecteur en fonction de son id + } + + // Get the connector using its id $connector = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:Connector') - ->findOneBy( $list_fields_sql ); - + ->getManager() + ->getRepository('RegleBundle:Connector') + ->findOneBy( $list_fields_sql ); + if($connector === null) { return $this->redirect($this->generateUrl('regle_connector_list')); } - - // On récupére l'EntityManager - $em = $this->getDoctrine() - ->getManager(); - - $connector_params = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:ConnectorParam') - ->findByConnector( $id ); - - if($connector_params) { - foreach ( $connector_params as $connector_param ) { - $em->remove($connector_param); - $em->flush(); - } - } - - $em->remove($connector); - $em->flush(); - + try{ + // Check if a rule uses this connector (source and target) + $rule = $this->getDoctrine() + ->getManager() + ->getRepository('RegleBundle:Rule') + ->findOneBy(array( + 'connectorTarget' => $connector, + 'deleted' => 0 + )); + if (empty($rule)) { + $rule = $this->getDoctrine() + ->getManager() + ->getRepository('RegleBundle:Rule') + ->findOneBy(array( + 'connectorSource' => $connector, + 'deleted' => 0 + )); + } + // Error message in case a rule using this connector exists + if (!empty($rule)) { + $session->set('error', array($this->get('translator')->trans('error.connector.remove_with_rule').' '.$rule->getName())); + } else { + // Flag the connector as deleted + $connector->setDeleted(1); + $this->getDoctrine()->getManager()->persist($connector); + $this->getDoctrine()->getManager()->flush(); + } + } catch (\Doctrine\DBAL\DBALException $e) { + $session->set('error', array($e->getPrevious()->getMessage())); + } return $this->redirect($this->generateUrl('regle_connector_list')); } } @@ -497,9 +502,9 @@ public function connectorOpenAction(Request $request, $id) { $permission = $this->get('myddleware.permission'); if ($permission->isAdmin($this->getUser()->getId())) { - $qb->where('c.id =:id')->setParameter('id',$id); + $qb->where('c.id =:id AND c.deleted = 0')->setParameter('id',$id); } else { - $qb->where('c.id =:id and c.createdBy =:createdBy')->setParameter(['id' => $id, 'createdBy' => $this->getUser()->getId()]); + $qb->where('c.id =:id and c.createdBy =:createdBy AND c.deleted = 0')->setParameter(['id' => $id, 'createdBy' => $this->getUser()->getId()]); } // Detecte si la session est le support --------- // Infos du connecteur @@ -509,6 +514,18 @@ public function connectorOpenAction(Request $request, $id) { throw $this->createNotFoundException("This connector doesn't exist"); } + if ($permission->isAdmin($this->getUser()->getId())) { + $qb->where('c.id =:id')->setParameter('id',$id); + } else { + $qb->where('c.id =:id and c.createdBy =:createdBy')->setParameter(['id' => $id, 'createdBy' => $this->getUser()->getId()]); + } + // Detecte si la session est le support --------- + // Infos du connecteur + $connector = $qb->getQuery()->getOneOrNullResult(); + + if (!$connector) { + throw $this->createNotFoundException("This connector doesn't exist"); + } // Create connector form // $form = $this->createForm(new ConnectorType($this->container), $connector, ['action' => $this->generateUrl('connector_open', ['id' => $id])]); @@ -569,12 +586,15 @@ public function connectorListSolutionAction(Request $request) { $permission = $this->get('myddleware.permission'); if( $permission->isAdmin($this->getUser()->getId()) ) { - $list_fields_sql = array('solution' => (int)$id); + $list_fields_sql = array( 'solution' => (int)$id, + 'deleted' => 0 + ); } else { $list_fields_sql = - array('solution' => (int)$id, - 'createdBy' => $this->getUser()->getId() + array( 'solution' => (int)$id, + 'deleted' => 0, + 'createdBy' => $this->getUser()->getId() ); } // Detecte si la session est le support --------- @@ -615,9 +635,9 @@ public function createOutAction($type) $lst_solution = tools::composeListHtml($lstArray,$this->get('translator')->trans('create_rule.step1.list_empty')); - $sessionService->setConnectorAddMessage($this->get('translator')->trans('create_rule.step1.connector')); - $sessionService->setParamConnectorAddType(strip_tags($type)); - $sessionService->setConnectorAnimation(true); + $sessionService->setConnectorAddMessage($this->get('translator')->trans('create_rule.step1.connector')); + $sessionService->setParamConnectorAddType(strip_tags($type)); + $sessionService->setConnectorAnimation(true); return $this->render('RegleBundle:Connector:createout.html.twig',array( diff --git a/src/Myddleware/RegleBundle/Controller/DefaultController.php b/src/Myddleware/RegleBundle/Controller/DefaultController.php index ad2f6cd28..0fc151ddd 100644 --- a/src/Myddleware/RegleBundle/Controller/DefaultController.php +++ b/src/Myddleware/RegleBundle/Controller/DefaultController.php @@ -39,6 +39,7 @@ use Myddleware\RegleBundle\Entity\ConnectorParam; use Myddleware\RegleBundle\Entity\Rule; use Myddleware\RegleBundle\Entity\RuleParam; +use Myddleware\RegleBundle\Entity\RuleParamAudit; use Myddleware\RegleBundle\Entity\RuleFilter; use Myddleware\RegleBundle\Entity\RuleField; use Myddleware\RegleBundle\Entity\RuleRelationShip; @@ -136,27 +137,28 @@ public function ruleDeleteAction(Request $request, $id) { $session = $request->getSession(); - // First, checking that the rule has document sent (close) + // First, checking that the rule has document not deleted $docClose = $this->getDoctrine() ->getManager() ->getRepository('RegleBundle:Document') ->findOneBy(array( 'rule' => $id, - 'globalStatus' => array('Close') + 'deleted' => 0 ) ); // Return to the view detail for the rule if we found a document close if (!empty($docClose)) { - $session->set('error', array($this->get('translator')->trans('error.rule.delete_document_close'))); + $session->set('error', array($this->get('translator')->trans('error.rule.delete_document'))); return $this->redirect($this->generateUrl('regle_open', array('id' => $id))); } - // First, checking that the rule has no document open or in error + // Then, checking that the rule has no document open or in error $docErrorOpen = $this->getDoctrine() ->getManager() ->getRepository('RegleBundle:Document') ->findOneBy(array( 'rule' => $id, + 'deleted' => 0, 'globalStatus' => array('Open', 'Error') ) ); @@ -166,19 +168,22 @@ public function ruleDeleteAction(Request $request, $id) return $this->redirect($this->generateUrl('regle_open', array('id' => $id))); } - // Checking if the rule is linked to an other one - $ruleRelationshipError = $this->getDoctrine() + // Checking if the rule is linked to an other one + $ruleRelationships = $this->getDoctrine() ->getManager() ->getRepository('RegleBundle:RuleRelationShip') - ->findOneBy(array('fieldId' => $id) - ); - // Return to the view detail of the rule if a rule relate to this one - if (!empty($ruleRelationshipError)) { - $session->set('error', array($this->get('translator')->trans('error.rule.delete_relationship_exists') . $ruleRelationshipError->getRule())); - return $this->redirect($this->generateUrl('regle_open', array('id' => $id))); + ->findBy(array('fieldId' => $id)); + + // Return to the view detail of the rule if a rule relate to this one exists and is not deleted + if (!empty($ruleRelationships)) { + foreach ($ruleRelationships as $ruleRelationship) { + if(empty($ruleRelationship->getDeleted())) { + $session->set('error', array($this->get('translator')->trans('error.rule.delete_relationship_exists') . $ruleRelationship->getRule())); + return $this->redirect($this->generateUrl('regle_open', array('id' => $id))); + } + } } - // Detecte si la session est le support --------- $permission = $this->get('myddleware.permission'); @@ -209,76 +214,13 @@ public function ruleDeleteAction(Request $request, $id) return $this->redirect($this->generateUrl('regle_list')); } - $doc = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:Document') - ->findOneBy(array( - 'rule' => $id - ) - ); - // On récupére l'EntityManager $this->getInstanceBdd(); - // si aucun document (flux) alors on supprime sinon on flag - if (is_null($doc)) { - // Rule fields - $rule_fields = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:RuleField') - ->findByRule($id); - if ($rule_fields) { - foreach ($rule_fields as $rule_field) { - $this->em->remove($rule_field); - $this->em->flush(); - } - } - - // Rule relationships - $rule_relationships = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:RuleRelationShip') - ->findByRule($id); - if ($rule_relationships) { - foreach ($rule_relationships as $rule_relationship) { - $this->em->remove($rule_relationship); - $this->em->flush(); - } - } - - // Rule params - $rule_params = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:RuleParam') - ->findByRule($id); - if ($rule_params) { - foreach ($rule_params as $rule_param) { - $this->em->remove($rule_param); - $this->em->flush(); - } - } - - // Rule filters - $rule_filters = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:RuleFilter') - ->findByRule($id); - - if ($rule_filters) { - foreach ($rule_filters as $rule_filter) { - $this->em->remove($rule_filter); - $this->em->flush(); - } - } - $this->em->remove($rule); - $this->em->flush(); - } else { // flag - - $rule->setDeleted(1); - $rule->setActive(0); - $this->em->persist($rule); - $this->em->flush(); - } + $rule->setDeleted(1); + $rule->setActive(0); + $this->em->persist($rule); + $this->em->flush(); return $this->redirect($this->generateUrl('regle_list')); } @@ -298,7 +240,7 @@ public function displayFluxAction($id) /* @var $sessionService SessionService */ $sessionService = $this->get('myddleware_session.service'); - $sessionService->setFluxFilterWhere("WHERE Document.rule_id = '" . $rule->getId() . "'"); + $sessionService->setFluxFilterWhere("WHERE Document.deleted = 0 AND Document.rule_id = '" . $rule->getId() . "'"); $sessionService->setFluxFilterRuleName($rule->getName()); return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); @@ -381,9 +323,19 @@ public function ruleUpdParamsAction($id) { $param->setName($p['name']); $param->setValue($p['value']); } else { + // Save param modification in the audit table + if ($p['value'] != $param->getValue()) { + $paramAudit = new RuleParamAudit(); + $paramAudit->setRuleParamId($p['id']); + $paramAudit->setDateModified(new \DateTime); + $paramAudit->setBefore($param->getValue()); + $paramAudit->setAfter($p['value']); + $paramAudit->setByUser($this->getUser()->getId()); + $this->em->persist($paramAudit); + } $param->setValue($p['value']); - } - $this->em->persist($param); + } + $this->em->persist($param); $this->em->flush(); } } @@ -514,13 +466,18 @@ public function ruleEditAction(Request $request, $id) ->getRepository('RegleBundle:Document') ->findOneBy(array( 'rule' => $id, + 'deleted' => 0, 'globalStatus' => array('Open', 'Error') ) ); // Return to the view detail fo the rule if we found a document open or in error if (!empty($docErrorOpen)) { - $session->set('error', array($this->get('translator')->trans('error.rule.edit_document_error_open'))); - return $this->redirect($this->generateUrl('regle_open', array('id' => $id))); + if ($this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { + $session->set('warning', array($this->get('translator')->trans('error.rule.edit_document_error_open_admin'))); + } else { + $session->set('error', array($this->get('translator')->trans('error.rule.edit_document_error_open'))); + return $this->redirect($this->generateUrl('regle_open', array('id' => $id))); + } } /* @var $sessionService SessionService */ @@ -1595,7 +1552,7 @@ public function ruleStepThreeAction(Request $request) 'in' => $this->get('translator')->trans('filter.in'), 'notin' => $this->get('translator')->trans('filter.notin') ); - + // paramètres de la règle $rule_params = array_merge($rule_params_source, $rule_params_target); @@ -1715,7 +1672,6 @@ public function ruleStepThreeAction(Request $request) 'parentRelationships' => $allowParentRelationship, 'lst_parent_fields' => $lstParentFields, 'regleId' => $ruleKey - ); $result = $this->beforeRender($result); @@ -1726,7 +1682,6 @@ public function ruleStepThreeAction(Request $request) $result['lst_rule'] = tools::composeListHtml($result['lst_rule'], $this->get('translator')->trans('create_rule.step3.relation.fields')); $result['lst_filter'] = tools::composeListHtml($result['lst_filter'], $this->get('translator')->trans('create_rule.step3.relation.fields')); - return $this->render('RegleBundle:Rule:create/step3.html.twig', $result); // ---------------- diff --git a/src/Myddleware/RegleBundle/Controller/FluxController.php b/src/Myddleware/RegleBundle/Controller/FluxController.php index 2116b085f..0f3f6aef0 100644 --- a/src/Myddleware/RegleBundle/Controller/FluxController.php +++ b/src/Myddleware/RegleBundle/Controller/FluxController.php @@ -1,861 +1,890 @@ -. -*********************************************************************************/ - -namespace Myddleware\RegleBundle\Controller; - -use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\SubmitType; -use Symfony\Component\Form\Extension\Core\Type\TextType; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Response; - -use Pagerfanta\Adapter\DoctrineORMAdapter; -use Pagerfanta\Adapter\ArrayAdapter; -use Pagerfanta\Pagerfanta; -use Pagerfanta\Exception\NotValidCurrentPageException; - -use Myddleware\RegleBundle\Entity\Solution; -use Myddleware\RegleBundle\Entity\Connector; -use Myddleware\RegleBundle\Entity\DocumentAudit; -use Myddleware\RegleBundle\Service\SessionService; - -use Myddleware\RegleBundle\Classes\document as doc; - -class FluxControllerCore extends Controller -{ - /* ****************************************************** - * FLUX - ****************************************************** */ - - public function fluxErrorByRuleAction($id) { - - /* @var $sessionService SessionService */ - $sessionService = $this->get('myddleware_session.service'); - - - $em = $this->getDoctrine()->getManager(); - - // Detecte si la session est le support --------- - $permission = $this->get('myddleware.permission'); - if( $permission->isAdmin($this->getUser()->getId()) ) { - $list_fields_sql = - array('id' => $id - ); - } - else { - $list_fields_sql = - array( - 'id' => $id, - 'createdBy' => $this->getUser()->getId() - ); - } - // Detecte si la session est le support --------- - - // Infos des flux - $rule = $em->getRepository('RegleBundle:Rule') - ->findBy( $list_fields_sql ); - if($rule) { - $sessionService->setFluxFilterRuleName($rule[0]->getName()); - $sessionService->setFluxFilterGlobalStatus('Error'); - $sessionService->setFluxFilterWhere("WHERE name='".$rule[0]->getName()."' AND global_status IN ('Error','Open') "); - } - else { - $sessionService->removeFluxFilter(); - } - - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - } - - // LISTE DES FLUX - public function fluxListAction(Request $request,$page,$search = 1) { - /* @var $sessionService SessionService */ - $sessionService = $this->get('myddleware_session.service'); - //--- Liste status traduction - $lstStatusTwig = doc::lstStatus(); - foreach ($lstStatusTwig as $key => $value) { - $lstStatus[ $this->get('translator')->trans( $value ) ] = $key; - } - asort($lstStatus); - //--- - - //--- Liste Global status traduction - $lstGblStatusTwig = doc::lstGblStatus(); - - foreach ($lstGblStatusTwig as $key => $value) { - $lstGblStatus[ $this->get('translator')->trans( $value ) ] = $key; - } - asort($lstGblStatus); - //--- - - $em = $this->getDoctrine()->getManager(); - - // Detecte si la session est le support --------- - $permission = $this->get('myddleware.permission'); - - if( $permission->isAdmin( $this->getUser()->getId()) ) { - - $rule = $this->getDoctrine() - ->getManager() - ->getRepository('RegleBundle:Rule') - ->findAll(); - } - else { - $list_fields_sql = - array('createdBy' => $this->getUser()->getId() - ); - - $rule = $em->getRepository('RegleBundle:Rule')->findBy($list_fields_sql); - } - // Detecte si la session est le support --------- - - // Liste des règles - $lstRuleName = array(); - if($rule) { - - foreach ($rule as $r) { - $lstRuleName[$r->getName()] = $r->getName(); - } - - asort($lstRuleName); - } - - $form = $this->createFormBuilder() - - /* ->add('date_create_start','text', array( - 'data'=> ($sessionService->isFluxFilterCDateCreateStartExist() ? $sessionService->getFluxFilterDateCreateStart() : false), - 'required'=> false, - 'attr' => array('class' => 'calendar'))) - - ->add('date_create_end','text', array( - 'data'=> ($sessionService->isFluxFilterCDateCreateEndExist() ? $sessionService->getFluxFilterDateCreateEnd() : false), - 'required'=> false, - 'attr' => array('class' => 'calendar'))) */ - - ->add('source_content',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCSourceContentExist() ? $sessionService->getFluxFilterSourceContent() : false), - 'required'=> false)) - - ->add('target_content',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCTargetContentExist() ? $sessionService->getFluxFilterTargetContent() : false), - 'required'=> false)) - - ->add('date_modif_start',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCDateModifStartExist() ? $sessionService->getFluxFilterDateModifStart() : false), - 'required'=> false, - 'attr' => array('class' => 'calendar'))) - - ->add('date_modif_end',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCDateModifEndExist() ? $sessionService->getFluxFilterDateModifEnd() : false), - 'required'=> false, - 'attr' => array('class' => 'calendar'))) - - ->add('rule',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCRuleExist() ? $sessionService->getFluxFilterRuleName() : false), - 'required'=> false )) - - ->add('rule', ChoiceType::class, array( - 'choices' => $lstRuleName, - 'data'=> ($sessionService->isFluxFilterCRuleExist() ? $sessionService->getFluxFilterRuleName() : false), - 'required' => false - )) - - ->add('status', ChoiceType::class, array( - 'choices' => $lstStatus, - 'data'=> ($sessionService->isFluxFilterCStatusExist() ? $sessionService->getFluxFilterStatus() : false), - 'required' => false - )) - - ->add('gblstatus', ChoiceType::class, array( - 'choices' => $lstGblStatus, - 'data'=> ($sessionService->isFluxFilterCGblStatusExist() ? $sessionService->getFluxFilterGlobalStatus() : false), - 'required' => false - )) - - ->add('click_filter', SubmitType::class, array( - 'attr' => array( - 'class' => 'btn-mydinv' - ), - 'label' => $this->get('translator')->trans( 'list_flux.btn.filter' ), - )) - - ->add('source_id',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCSourceIdExist() ? $sessionService->getFluxFilterSourceId() : false), - 'required'=> false )) - - ->add('target_id',TextType::class, array( - 'data'=> ($sessionService->isFluxFilterCTargetIdExist() ? $sessionService->getFluxFilterTargetId() : false), - 'required'=> false )) - - ->getForm(); - - $form->handleRequest( $request ); - // condition d'affichage - $where = ''; - $from = 'FROM Document '; - // $where = ($sessionService->isFluxFilterCWhereExist() ? $sessionService->getFluxFilterWhere() : ''); - if (!empty($sessionService->getFluxFilterWhere())) { - $where = $sessionService->getFluxFilterWhere(); - $sessionService->removeFluxFilter(); - } - - $conditions = 0; - //---[ FORM ]------------------------- - if( $form->get('click_filter')->isClicked() ) { - $data = $request->get($form->getName()); - $where = 'WHERE '; - - /* if(!empty( $data['date_create_start'] ) && is_string($data['date_create_start'])) { - $where .= "Document.date_created >= '".$data['date_create_start']."' "; - $conditions++; - $sessionService->setFluxFilterDateCreateStart($data['date_create_start']); - } - else { - $sessionService->removeFluxFilterDateCreateStart(); - } - - if(!empty( $data['date_create_end'] ) && is_string($data['date_create_end'])) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.date_created <= '".$data['date_create_end']."' "; - $conditions++; - $sessionService->setFluxFilterDateCreateEnd($data['date_create_end']); - } - else { - $sessionService->removeFluxFilterDateCreateEnd(); - } - */ - - if(!empty( $data['source_content'] ) && is_string($data['source_content'])) { - $from .= "INNER JOIN DocumentData AS DocumentDataSource ON Document.id = DocumentDataSource.doc_id "; - $where .= "DocumentDataSource.data LIKE '%".$data['source_content']."%' AND DocumentDataSource.type = 'S' "; - $conditions++; - $sessionService->setFluxFilterSourceContent($data['source_content']); - } - else { - $sessionService->removeFluxFilterSourceContent(); - } - - if(!empty( $data['target_content'] ) && is_string($data['target_content'])) { - $from .= "INNER JOIN DocumentData AS DocumentDataTarget ON Document.id = DocumentDataTarget.doc_id "; - $where .= "DocumentDataTarget.data LIKE '%".$data['target_content']."%' AND DocumentDataTarget.type = 'T' "; - $conditions++; - $sessionService->setFluxFilterTargetContent($data['target_content']); - } - else { - $sessionService->removeFluxFilterTargetContent(); - } - - - if(!empty( $data['date_modif_start'] ) && is_string($data['date_modif_start'])) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.date_modified >= '".$data['date_modif_start']."' "; - $conditions++; - $sessionService->setFluxFilterDateModifStart($data['date_modif_start']); - } - else { - $sessionService->removeFluxFilterDateModifStart(); - } - - if(!empty( $data['date_modif_end'] ) && is_string($data['date_modif_end'])) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.date_modified <= '".$data['date_modif_end']."' "; - $conditions++; - $sessionService->setFluxFilterDateModifEnd( $data['date_modif_end']); - } - else { - $sessionService->removeFluxFilterDateModifEnd(); - } - - if(!empty( $data['rule'] ) && is_string($data['rule'])) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Rule.name='".trim($data['rule'])."' "; - $conditions++; - $sessionService->setFluxFilterRuleName($data['rule']); - } - else { - $sessionService->removeFluxFilterRuleName(); - } - - if(!empty( $data['status'] )) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.status='".$data['status']."' "; - $conditions++; - $sessionService->setFluxFilterStatus($data['status']); - } - else { - $sessionService->removeFluxFilterStatus(); - } - - if(!empty( $data['gblstatus'] )) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.global_status='".$data['gblstatus']."' "; - $conditions++; - $sessionService->setFluxFilterGlobalStatus($data['gblstatus']); - } - else { - $sessionService->removeFluxFilterGblStatus(); - } - - if(!empty( $data['target_id'] )) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.target_id LIKE '".$data['target_id']."' "; - $conditions++; - $sessionService->setFluxFilterTargetId($data['target_id']); - } - else { - $sessionService->removeFluxFilterTargetId(); - } - - if(!empty( $data['source_id'] )) { - $where .= (($conditions > 0) ? "AND " : "" ); - $where .= "Document.source_id LIKE '".$data['source_id']."' "; - $conditions++; - $sessionService->setFluxFilterSourceId($data['source_id']); - } - else { - $sessionService->removeFluxFilterSourceId(); - } - - // si aucun condition alors on vide le where - if( $conditions == 0 ) { - $where = ''; - } - } // end clicked - //---[ FORM ]------------------------- - - // si première page on stock les conditions - if($page == 1) { - if(!empty($where) || $sessionService->isFluxFilterCWhereExist()) { - $sessionService->setFluxFilterWhere($where); - } - } - - // si pagination on récupère les conditions - if((int)$page > 1 && $sessionService->isFluxFilterCWhereExist()) { - $where = $sessionService->getFluxFilterWhere($where); - } - - $cond = ((!empty($where)) ? 'AND' : 'WHERE' ); - - - // Detecte si la session est le support --------- - $permission = $this->get('myddleware.permission'); - - if( $permission->isAdmin($this->getUser()->getId()) ) { - $user = ''; - } - else { - $user = $cond.' Document.created_by = '.$this->getUser()->getId(); - } - // Detecte si la session est le support --------- - - - $conn = $this->get( 'database_connection' ); - // Stop search if search parameter = 0 - if ( - empty($search) - AND $page == 1 - ) { - $where = " WHERE 0"; - } - - // Add limit to the query - $transferParameters = $this->container->getParameter('transfer'); - $limit = ''; - if (!empty($transferParameters['search_limit'])) { - $limit = ' LIMIT '.$transferParameters['search_limit']; - } - - $sql = "SELECT Document.*, users.username, Rule.name rule_name - $from - JOIN users ON(users.id = Document.created_by) - JOIN Rule ON(Rule.id = Document.rule_id) - $where - $user - ORDER BY date_modified DESC - $limit "; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $r = $stmt->fetchall(); - - $compact = $this->nav_pagination(array( - 'adapter_em_repository' => $r, - 'maxPerPage' => $this->container->getParameter('pager'), - 'page' => $page - ),false); - - // Si tout se passe bien dans la pagination - if( $compact ) { - - // Si aucune règle - if( $compact['nb'] < 1 && !intval($compact['nb'])) { - $compact['entities'] = ''; - $compact['pager'] = ''; - } - - // affiche le bouton pour supprimer les filtres si les conditions proviennent du tableau de bord - if($sessionService->isFluxFilterCExist()) { - $conditions = 1; - } - - return $this->render('RegleBundle:Flux:list.html.twig',array( - 'nb' => $compact['nb'], - 'entities' => $compact['entities'], - 'pager' => $compact['pager'], - 'form' => $form->createView(), - 'condition' => $conditions - ) - ); - } - else { - - throw $this->createNotFoundException('Error'); - } - } - - // Supprime le filtre des flux - public function fluxListDeleteFilterAction() { - - /* @var $sessionService SessionService */ - $sessionService = $this->get('myddleware_session.service'); - - if($sessionService->isFluxFilterExist()) { - $sessionService->removeFluxFilter(); - } - - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - } - - // Info d'un flux - public function fluxInfoAction($id,$page) { - try { - $em = $this->getDoctrine()->getManager(); - - // Detecte si la session est le support --------- - $permission = $this->get('myddleware.permission'); - $list_fields_sql = array('id' => $id); - - // Infos des flux - $doc = $em->getRepository('RegleBundle:Document') - ->findById($list_fields_sql); - if( !$permission->isAdmin($this->getUser()->getId()) ) { - if( - empty($doc[0]) - || $doc[0]->getCreatedBy() != $this->getUser()->getId() - ) { - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - } - } - // Detecte si la session est le support --------- - - // Get rule object - $rule = $em->getRepository('RegleBundle:Rule')->findOneById($doc[0]->getRule()); - - // Chargement des tables source, target, history - $source = $this->listeFluxTable($id,'S'); - $target = $this->listeFluxTable($id,'T'); - $history = $this->listeFluxTable($id,'H'); - - // Get rulefield object - $ruleFields = $em->getRepository('RegleBundle:RuleField')->findByRule($doc[0]->getRule()); - // Get each data for each rule fields - $targetData = array(); - $historyData = array(); - foreach($ruleFields as $ruleField) { - // There is no field in source when we use my_value, just a formula - if ($ruleField->getSource()!='my_value') { - // We keep only the fields in the rule - // It could be several fields in the source fields (in case of formula) - $sourceFields = explode(";",$ruleField->getSource()); - foreach ($sourceFields as $sourceField) { - // Fields can be absent in case the rule have changed since the data tranfer has been sent - if (isset($source[$sourceField])) { - $sourceData[$sourceField] = $source[$sourceField]; - } else { - $sourceData[$sourceField] = ''; - } - } - } - // Target and history - $targetField = $ruleField->getTarget(); - - if (isset($target[$targetField])) { - $targetData[$targetField] = $target[$targetField]; - if ( - isset($history[$targetField]) - && !empty($history) - ) { - $historyData[$targetField] = $history[$targetField]; - } - } else { - $targetData[$targetField] = ''; - } - } - // Get RuleRelationShip object - $RuleRelationShips = $em->getRepository('RegleBundle:RuleRelationShip')->findByRule($doc[0]->getRule()); - // Get each data for each rule relationship - foreach($RuleRelationShips as $RuleRelationShip) { - $sourceField = $RuleRelationShip->getFieldNameSource(); - if (isset($source[$sourceField])) { - $sourceData[$sourceField] = $source[$sourceField]; - } - // Target and history - $targetField = $RuleRelationShip->getFieldNameTarget(); - if (isset($target[$targetField])) { - $targetData[$targetField] = $target[$targetField]; - } - // Only if history exists and if the field exist in history - if (!empty($history[$targetField])) { - $historyData[$targetField] = $history[$targetField]; - } - } - - $compact = $this->nav_pagination(array( - 'adapter_em_repository' => $em->getRepository('RegleBundle:Log') - ->findBy( - array('document'=> $id), - array('id' => 'DESC') - ), - 'maxPerPage' => $this->container->getParameter('pager'), - 'page' => $page - ),false); - - // POST DOCUMENT - // Get the post documents (Document coming from a child rule) - $postDocuments = $em->getRepository('RegleBundle:Document')->findBy(array('parentId'=> $id)); - // Get the rule name of every child doc - $postDocumentsRule = array(); - foreach ($postDocuments as $postDocument) { - $postDocumentsRule[$postDocument->getId()] = $em->getRepository('RegleBundle:Rule')->findOneById( $postDocument->getRule())->getName(); - } - - // PARENT RELATE DOCUMENT - // Document link to other document, the parent ones - $parentRelationships = $em->getRepository('RegleBundle:DocumentRelationship')->findBy(array('doc_id'=> $doc[0]->getId())); - // Get the detail of documents related - $i = 0; - $parentDocuments = array(); - $parentDocumentsRule = array(); - foreach ($parentRelationships as $parentRelationship) { - $parentDocuments[$i] = $em->getRepository('RegleBundle:Document')->findOneById( $parentRelationship->getDocRelId()); - $parentDocuments[$i]->sourceField = $parentRelationship->getSourceField(); - // Get the rule name of every relate doc - foreach ($parentDocuments as $parentDocument) { - $parentDocumentsRule[$parentDocument->getId()] = $em->getRepository('RegleBundle:Rule')->findOneById( $parentDocument->getRule())->getName(); - } - $i++; - } - - // CHILD RELATE DOCUMENT - // Document link to other document, the child ones - $childRelationships = $em->getRepository('RegleBundle:DocumentRelationship')->findBy(array('doc_rel_id'=> $doc[0]->getId())); - // Get the detail of documents related - $i = 0; - $childDocuments = array(); - $childDocumentsRule = array(); - foreach ($childRelationships as $childRelationship) { - $childDocuments[$i] = $em->getRepository('RegleBundle:Document')->findOneById( $childRelationship->getDocId()); - $childDocuments[$i]->sourceField = $childRelationship->getSourceField(); - // Get the rule name of every relate doc - foreach ($childDocuments as $childDocument) { - $childDocumentsRule[$childDocument->getId()] = $em->getRepository('RegleBundle:Rule')->findOneById( $childDocument->getRule())->getName(); - } - $i++; - } - - // HISTORY DOCUMENT - // Get the history documents (all document for the same source) - $historyDocuments = $em->getRepository('RegleBundle:Document')->findBy(array('source'=> $doc[0]->getSource(), 'rule'=> $doc[0]->getRule())); - // If only one record, the history is the current document, so we remove it => no parent - if (count($historyDocuments) == 1) { - $historyDocuments = array(); - } - - // Add custom button - $name_solution_target = $rule->getConnectorTarget()->getSolution()->getName(); - $solution_target = $this->get('myddleware_rule.'.$name_solution_target); - $solution_target_btn = $solution_target->getDocumentButton( $doc[0]->getId() ); - - $name_solution_source = $rule->getConnectorSource()->getSolution()->getName(); - $solution_source = $this->get('myddleware_rule.'.$name_solution_source); - $solution_source_btn = $solution_source->getDocumentButton( $doc[0]->getId() ); - - $list_btn = array_merge( $solution_target_btn, $solution_source_btn ); - - // Call the view - return $this->render('RegleBundle:Flux:view/view.html.twig',array( - 'current_document' => $id, - 'source' => $sourceData, - 'target' => $targetData, - 'history' => $historyData, - 'doc' => $doc[0], - 'nb' => $compact['nb'], - 'entities' => $compact['entities'], - 'pager' => $compact['pager'], - 'rule' => $rule, - 'post_documents' => $postDocuments, - 'post_Documents_Rule' => $postDocumentsRule, - 'nb_post_documents' => count($postDocuments), - 'child_documents' => $childDocuments, - 'child_Documents_Rule' => $childDocumentsRule, - 'nb_child_documents' => count($childDocuments), - 'parent_documents' => $parentDocuments, - 'parent_Documents_Rule' => $parentDocumentsRule, - 'nb_parent_documents' => count($parentDocuments), - 'history_documents' => $historyDocuments, - 'nb_history_documents' => count($historyDocuments), - 'ctm_btn' => $list_btn, - 'read_record_btn' => $solution_source->getReadRecord() - ) - ); - } - catch(Exception $e) { - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - exit; - } - - } - - // Sauvegarde flux - public function fluxSaveAction(Request $request) { - if($request->getMethod()=='POST') { - // Get the field and value from the request - $fields = strip_tags($request->request->get('fields')); - $value = strip_tags($request->request->get('value')); - - if(isset($value)) { - // get the EntityManager - $em = $this->getDoctrine()->getManager(); - // Get target data for the document - $documentDataEntity = $em->getRepository('RegleBundle:DocumentData') - ->findOneBy( array( - 'doc_id' => $request->request->get('flux'), - 'type' => 'T' - ) - ); - if(!empty($documentDataEntity)) { - $target = json_decode($documentDataEntity->getData(),true); - $beforeValue = $target[$fields]; - // Change the value - $target[$fields] = $value; - // Save the modification - $documentDataEntity->setData(json_encode($target)); // Encode in JSON - - // Insert in audit - $oneDocAudit = new DocumentAudit(); - $oneDocAudit->setDoc( $request->get('flux') ); - $oneDocAudit->setDateModified( new \DateTime ); - $oneDocAudit->setBefore( $beforeValue ); - $oneDocAudit->setAfter( $value ); - $oneDocAudit->setByUser( $this->getUser()->getId() ); - $oneDocAudit->setName( $fields ); - $em->persist($oneDocAudit); - $em->flush(); - echo $value; - exit; - } - } - } - throw $this->createNotFoundException('Failed to modify the field '.$fields); - } - - // Relancer un flux - public function fluxRerunAction($id) { - try { - if(!empty($id)) { - $job = $this->get('myddleware_job.job'); - $job->actionMassTransfer('rerun',array($id)); - } - return $this->redirect( $this->generateURL('flux_info', array( 'id'=>$id )) ); - } - catch(Exception $e) { - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - } - } - - // Annuler un flux - public function fluxCancelAction($id) { - try { - if(!empty($id)) { - $job = $this->get('myddleware_job.job'); - $job->actionMassTransfer('cancel',array($id)); - } - return $this->redirect( $this->generateURL('flux_info', array( 'id'=>$id )) ); - } - catch(Exception $e) { - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - } - } - - // Read record - public function fluxReadRecordAction($id) { - try { - if(!empty($id)) { - // Get the rule id and the source_id from the document id - $em = $this->getDoctrine()->getManager(); - $doc = $em->getRepository('RegleBundle:Document')->findOneById($id); - if (!empty($doc)) { - if (!empty($doc->getSource())) { - $job = $this->get('myddleware_job.job'); - $job->runBackgroundJob('readrecord',array($doc->getRule(),'id',$doc->getSource())); - } - } - } - return $this->redirect( $this->generateURL('flux_info', array( 'id'=>$id )) ); - } - catch(Exception $e) { - return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); - } - } - - - // Exécute une action d'un bouton dynamique - public function fluxBtnDynAction($method,$id,$solution) { - $solution_ws = $this->get('myddleware_rule.'.mb_strtolower($solution) ); - $solution_ws->documentAction( $id, $method ); - - return $this->redirect($this->generateUrl('flux_info', array('id'=>$id))); - } - - - public function fluxMassCancelAction() { - if(isset($_POST['ids']) && count($_POST['ids']) > 0) { - $job = $this->get('myddleware_job.job'); - $job->actionMassTransfer('cancel',$_POST['ids']); - } - exit; - } - - public function fluxMassRunAction() { - - if(isset($_POST['ids']) && count($_POST['ids']) > 0) { - $job = $this->get('myddleware_job.job'); - $job->actionMassTransfer('rerun',$_POST['ids']); - } - - exit; - } - - /* ****************************************************** - * METHODES PRATIQUES - ****************************************************** */ - - // Crée la pagination avec le Bundle Pagerfanta en fonction d'une requete - private function nav_pagination($params, $orm = true) { - - /* - * adapter_em_repository = requete - * maxPerPage = integer - * page = page en cours - */ - - if(is_array($params)) { - /* DOC : - * $pager->setCurrentPage($page); - $pager->getNbResults(); - $pager->getMaxPerPage(); - $pager->getNbPages(); - $pager->haveToPaginate(); - $pager->hasPreviousPage(); - $pager->getPreviousPage(); - $pager->hasNextPage(); - $pager->getNextPage(); - $pager->getCurrentPageResults(); - */ - - $compact = array(); - - #On passe l’adapter au bundle qui va s’occuper de la pagination - if($orm) { - $compact['pager'] = new Pagerfanta( new DoctrineORMAdapter($params['adapter_em_repository']) ); - } - else { - $compact['pager'] = new Pagerfanta( new ArrayAdapter($params['adapter_em_repository']) ); - } - - - - #On définit le nombre d’article à afficher par page (que l’on a biensur définit dans le fichier param) - $compact['pager']->setMaxPerPage($params['maxPerPage']); - try { - $compact['entities'] = $compact['pager'] - #On indique au pager quelle page on veut - ->setCurrentPage($params['page']) - #On récupère les résultats correspondant - ->getCurrentPageResults(); - - $compact['nb'] = $compact['pager']->getNbResults(); - - } catch (\Pagerfanta\Exception\NotValidCurrentPageException $e) { - #Si jamais la page n’existe pas on léve une 404 - throw $this->createNotFoundException("Cette page n'existe pas."); - } - - return $compact; - } - else { - return false; - } - } - - // Liste tous les flux d'un type - private function listeFluxTable($id,$type) { - try { - // Get document data - $documentDataEntity = $this->getDoctrine()->getManager()->getRepository('RegleBundle:DocumentData') - ->findOneBy( array( - 'doc_id' => $id, - 'type' => $type - ) - ); - if(!empty($documentDataEntity)) { - return json_decode($documentDataEntity->getData(),true); - } - return null; - } - catch(Exception $e) { - return false; - } - } - -} - - -/* * * * * * * * * * * * * * * * * * * * - si custom file exist alors on fait un include de la custom class - * * * * * * * * * * * * * * * * * * * */ -$file = __DIR__.'/../Custom/Controller/FluxController.php'; -if(file_exists($file)){ - require_once($file); -} -else { - //Sinon on met la classe suivante - class FluxController extends FluxControllerCore { - - } -} - - +. +*********************************************************************************/ + +namespace Myddleware\RegleBundle\Controller; + +use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\Extension\Core\Type\TextType; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Response; + +use Pagerfanta\Adapter\DoctrineORMAdapter; +use Pagerfanta\Adapter\ArrayAdapter; +use Pagerfanta\Pagerfanta; +use Pagerfanta\Exception\NotValidCurrentPageException; + +use Myddleware\RegleBundle\Entity\Solution; +use Myddleware\RegleBundle\Entity\Connector; +use Myddleware\RegleBundle\Entity\DocumentAudit; +use Myddleware\RegleBundle\Service\SessionService; + +use Myddleware\RegleBundle\Classes\document as doc; + +class FluxControllerCore extends Controller +{ + /* ****************************************************** + * FLUX + ****************************************************** */ + + public function fluxErrorByRuleAction($id) { + + /* @var $sessionService SessionService */ + $sessionService = $this->get('myddleware_session.service'); + + + $em = $this->getDoctrine()->getManager(); + + // Detecte si la session est le support --------- + $permission = $this->get('myddleware.permission'); + if( $permission->isAdmin($this->getUser()->getId()) ) { + $list_fields_sql = + array('id' => $id); + } + else { + $list_fields_sql = + array( + 'id' => $id, + 'createdBy' => $this->getUser()->getId() + ); + } + // Detecte si la session est le support --------- + + // Infos des flux + $rule = $em->getRepository('RegleBundle:Rule') + ->findBy( $list_fields_sql ); + if($rule) { + $sessionService->setFluxFilterRuleName($rule[0]->getName()); + $sessionService->setFluxFilterGlobalStatus('Error'); + $sessionService->setFluxFilterWhere("WHERE name='".$rule[0]->getName()."' AND global_status IN ('Error','Open') "); + } + else { + $sessionService->removeFluxFilter(); + } + + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + } + + // LISTE DES FLUX + public function fluxListAction(Request $request,$page,$search = 1) { + /* @var $sessionService SessionService */ + $sessionService = $this->get('myddleware_session.service'); + //--- Liste status traduction + $lstStatusTwig = doc::lstStatus(); + foreach ($lstStatusTwig as $key => $value) { + $lstStatus[ $this->get('translator')->trans( $value ) ] = $key; + } + asort($lstStatus); + //--- + + //--- Liste Global status traduction + $lstGblStatusTwig = doc::lstGblStatus(); + + foreach ($lstGblStatusTwig as $key => $value) { + $lstGblStatus[ $this->get('translator')->trans( $value ) ] = $key; + } + asort($lstGblStatus); + //--- + + //--- Liste type translation + $lstTypeTwig = doc::lstType(); + + foreach ($lstTypeTwig as $key => $value) { + $lstType[ $this->get('translator')->trans( $value ) ] = $key; + } + //--- + + $em = $this->getDoctrine()->getManager(); + + // Detecte si la session est le support --------- + $permission = $this->get('myddleware.permission'); + + if( $permission->isAdmin( $this->getUser()->getId()) ) { + + $rule = $this->getDoctrine() + ->getManager() + ->getRepository('RegleBundle:Rule') + ->findBy(array('deleted' => 0)); + } + else { + $list_fields_sql = + array('createdBy' => $this->getUser()->getId() + ); + + $rule = $em->getRepository('RegleBundle:Rule')->findBy($list_fields_sql); + } + // Detecte si la session est le support --------- + + // Liste des règles + $lstRuleName = array(); + if($rule) { + + foreach ($rule as $r) { + $lstRuleName[$r->getName()] = $r->getName(); + } + + asort($lstRuleName); + } + + $form = $this->createFormBuilder() + + /* ->add('date_create_start','text', array( + 'data'=> ($sessionService->isFluxFilterCDateCreateStartExist() ? $sessionService->getFluxFilterDateCreateStart() : false), + 'required'=> false, + 'attr' => array('class' => 'calendar'))) + + ->add('date_create_end','text', array( + 'data'=> ($sessionService->isFluxFilterCDateCreateEndExist() ? $sessionService->getFluxFilterDateCreateEnd() : false), + 'required'=> false, + 'attr' => array('class' => 'calendar'))) */ + + ->add('source_content',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCSourceContentExist() ? $sessionService->getFluxFilterSourceContent() : false), + 'required'=> false)) + + ->add('target_content',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCTargetContentExist() ? $sessionService->getFluxFilterTargetContent() : false), + 'required'=> false)) + + ->add('date_modif_start',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCDateModifStartExist() ? $sessionService->getFluxFilterDateModifStart() : false), + 'required'=> false, + 'attr' => array('class' => 'calendar'))) + + ->add('date_modif_end',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCDateModifEndExist() ? $sessionService->getFluxFilterDateModifEnd() : false), + 'required'=> false, + 'attr' => array('class' => 'calendar'))) + + ->add('rule',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCRuleExist() ? $sessionService->getFluxFilterRuleName() : false), + 'required'=> false )) + + ->add('rule', ChoiceType::class, array( + 'choices' => $lstRuleName, + 'data'=> ($sessionService->isFluxFilterCRuleExist() ? $sessionService->getFluxFilterRuleName() : false), + 'required' => false + )) + + ->add('status', ChoiceType::class, array( + 'choices' => $lstStatus, + 'data'=> ($sessionService->isFluxFilterCStatusExist() ? $sessionService->getFluxFilterStatus() : false), + 'required' => false + )) + + ->add('gblstatus', ChoiceType::class, array( + 'choices' => $lstGblStatus, + 'data'=> ($sessionService->isFluxFilterCGblStatusExist() ? $sessionService->getFluxFilterGlobalStatus() : false), + 'required' => false + )) + + ->add('type', ChoiceType::class, array( + 'choices' => $lstType, + 'data'=> ($sessionService->isFluxFilterTypeExist() ? $sessionService->getFluxFilterType() : false), + 'required' => false + )) + + ->add('click_filter', SubmitType::class, array( + 'attr' => array( + 'class' => 'btn-mydinv' + ), + 'label' => $this->get('translator')->trans( 'list_flux.btn.filter' ), + )) + + ->add('source_id',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCSourceIdExist() ? $sessionService->getFluxFilterSourceId() : false), + 'required'=> false )) + + ->add('target_id',TextType::class, array( + 'data'=> ($sessionService->isFluxFilterCTargetIdExist() ? $sessionService->getFluxFilterTargetId() : false), + 'required'=> false )) + + ->getForm(); + + $form->handleRequest( $request ); + // condition d'affichage + $where = ''; + $from = 'FROM Document '; + // $where = ($sessionService->isFluxFilterCWhereExist() ? $sessionService->getFluxFilterWhere() : ''); + if (!empty($sessionService->getFluxFilterWhere())) { + $where = $sessionService->getFluxFilterWhere(); + $sessionService->removeFluxFilter(); + } + + $conditions = 0; + //---[ FORM ]------------------------- + if( $form->get('click_filter')->isClicked() ) { + $data = $request->get($form->getName()); + $where = 'WHERE Document.deleted = 0 AND '; + + /* if(!empty( $data['date_create_start'] ) && is_string($data['date_create_start'])) { + $where .= "Document.date_created >= '".$data['date_create_start']."' "; + $conditions++; + $sessionService->setFluxFilterDateCreateStart($data['date_create_start']); + } + else { + $sessionService->removeFluxFilterDateCreateStart(); + } + + if(!empty( $data['date_create_end'] ) && is_string($data['date_create_end'])) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.date_created <= '".$data['date_create_end']."' "; + $conditions++; + $sessionService->setFluxFilterDateCreateEnd($data['date_create_end']); + } + else { + $sessionService->removeFluxFilterDateCreateEnd(); + } + */ + + if(!empty( $data['source_content'] ) && is_string($data['source_content'])) { + $from .= "INNER JOIN DocumentData AS DocumentDataSource ON Document.id = DocumentDataSource.doc_id "; + $where .= "DocumentDataSource.data LIKE '%".$data['source_content']."%' AND DocumentDataSource.type = 'S' "; + $conditions++; + $sessionService->setFluxFilterSourceContent($data['source_content']); + } + else { + $sessionService->removeFluxFilterSourceContent(); + } + + if(!empty( $data['target_content'] ) && is_string($data['target_content'])) { + $from .= "INNER JOIN DocumentData AS DocumentDataTarget ON Document.id = DocumentDataTarget.doc_id "; + $where .= "DocumentDataTarget.data LIKE '%".$data['target_content']."%' AND DocumentDataTarget.type = 'T' "; + $conditions++; + $sessionService->setFluxFilterTargetContent($data['target_content']); + } + else { + $sessionService->removeFluxFilterTargetContent(); + } + + + if(!empty( $data['date_modif_start'] ) && is_string($data['date_modif_start'])) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.date_modified >= '".$data['date_modif_start']."' "; + $conditions++; + $sessionService->setFluxFilterDateModifStart($data['date_modif_start']); + } + else { + $sessionService->removeFluxFilterDateModifStart(); + } + + if(!empty( $data['date_modif_end'] ) && is_string($data['date_modif_end'])) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.date_modified <= '".$data['date_modif_end']."' "; + $conditions++; + $sessionService->setFluxFilterDateModifEnd( $data['date_modif_end']); + } + else { + $sessionService->removeFluxFilterDateModifEnd(); + } + + if(!empty( $data['rule'] ) && is_string($data['rule'])) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Rule.name='".trim($data['rule'])."' "; + $conditions++; + $sessionService->setFluxFilterRuleName($data['rule']); + } + else { + $sessionService->removeFluxFilterRuleName(); + } + + if(!empty( $data['status'] )) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.status='".$data['status']."' "; + $conditions++; + $sessionService->setFluxFilterStatus($data['status']); + } + else { + $sessionService->removeFluxFilterStatus(); + } + + if(!empty( $data['gblstatus'] )) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.global_status='".$data['gblstatus']."' "; + $conditions++; + $sessionService->setFluxFilterGlobalStatus($data['gblstatus']); + } + else { + $sessionService->removeFluxFilterGblStatus(); + } + + if(!empty( $data['type'] )) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.type='".$data['type']."' "; + $conditions++; + $sessionService->setFluxFilterType($data['type']); + } + else { + $sessionService->removeFluxFilterGblStatus(); + } + + if(!empty( $data['target_id'] )) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.target_id LIKE '".$data['target_id']."' "; + $conditions++; + $sessionService->setFluxFilterTargetId($data['target_id']); + } + else { + $sessionService->removeFluxFilterTargetId(); + } + + if(!empty( $data['source_id'] )) { + $where .= (($conditions > 0) ? "AND " : "" ); + $where .= "Document.source_id LIKE '".$data['source_id']."' "; + $conditions++; + $sessionService->setFluxFilterSourceId($data['source_id']); + } + else { + $sessionService->removeFluxFilterSourceId(); + } + + // si aucun condition alors on vide le where + if( $conditions == 0 ) { + $where = ''; + } + } // end clicked + //---[ FORM ]------------------------- + + // si première page on stock les conditions + if($page == 1) { + if(!empty($where) || $sessionService->isFluxFilterCWhereExist()) { + $sessionService->setFluxFilterWhere($where); + } + } + + // si pagination on récupère les conditions + if((int)$page > 1 && $sessionService->isFluxFilterCWhereExist()) { + $where = $sessionService->getFluxFilterWhere($where); + } + + $cond = ((!empty($where)) ? 'AND' : 'WHERE' ); + + + // Detecte si la session est le support --------- + $permission = $this->get('myddleware.permission'); + + if( $permission->isAdmin($this->getUser()->getId()) ) { + $user = ''; + } + else { + $user = $cond.' Document.created_by = '.$this->getUser()->getId(); + } + // Detecte si la session est le support --------- + + + $conn = $this->get( 'database_connection' ); + // Stop search if search parameter = 0 + if ( + empty($search) + AND $page == 1 + ) { + $where = " WHERE 0"; + $user = ""; + } + + // Add limit to the query + $transferParameters = $this->container->getParameter('transfer'); + $limit = ''; + if (!empty($transferParameters['search_limit'])) { + $limit = ' LIMIT '.$transferParameters['search_limit']; + } + + $sql = "SELECT Document.*, users.username, Rule.name rule_name + $from + JOIN users ON(users.id = Document.created_by) + JOIN Rule ON(Rule.id = Document.rule_id) + $where + $user + ORDER BY date_modified DESC + $limit "; + $stmt = $conn->prepare($sql); + $stmt->execute(); + $r = $stmt->fetchall(); + + $compact = $this->nav_pagination(array( + 'adapter_em_repository' => $r, + 'maxPerPage' => $this->container->getParameter('pager'), + 'page' => $page + ),false); + + // Si tout se passe bien dans la pagination + if( $compact ) { + + // Si aucune règle + if( $compact['nb'] < 1 && !intval($compact['nb'])) { + $compact['entities'] = ''; + $compact['pager'] = ''; + } + + // affiche le bouton pour supprimer les filtres si les conditions proviennent du tableau de bord + if($sessionService->isFluxFilterCExist()) { + $conditions = 1; + } + + return $this->render('RegleBundle:Flux:list.html.twig',array( + 'nb' => $compact['nb'], + 'entities' => $compact['entities'], + 'pager' => $compact['pager'], + 'form' => $form->createView(), + 'condition' => $conditions + ) + ); + } + else { + + throw $this->createNotFoundException('Error'); + } + } + + // Supprime le filtre des flux + public function fluxListDeleteFilterAction() { + + /* @var $sessionService SessionService */ + $sessionService = $this->get('myddleware_session.service'); + + if($sessionService->isFluxFilterExist()) { + $sessionService->removeFluxFilter(); + } + + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + } + + // Info d'un flux + public function fluxInfoAction(Request $request,$id,$page) { + try { + $session = $request->getSession(); + $em = $this->getDoctrine()->getManager(); + + // Detecte si la session est le support --------- + $permission = $this->get('myddleware.permission'); + $list_fields_sql = array('id' => $id); + + // Infos des flux + $doc = $em->getRepository('RegleBundle:Document') + ->findBy($list_fields_sql); + + if($doc[0]->getDeleted()) { + $session->set('warning', array($this->get('translator')->trans('error.document.deleted_flag'))); + } + if( !$permission->isAdmin($this->getUser()->getId()) ) { + if( + empty($doc[0]) + || $doc[0]->getCreatedBy() != $this->getUser()->getId() + ) { + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + } + } + // Detecte si la session est le support --------- + + // Get rule object + $rule = $em->getRepository('RegleBundle:Rule')->findOneById($doc[0]->getRule()); + + // Chargement des tables source, target, history + $source = $this->listeFluxTable($id,'S'); + $target = $this->listeFluxTable($id,'T'); + $history = $this->listeFluxTable($id,'H'); + + // Get rulefield object + $ruleFields = $em->getRepository('RegleBundle:RuleField')->findByRule($doc[0]->getRule()); + // Get each data for each rule fields + $targetData = array(); + $historyData = array(); + foreach($ruleFields as $ruleField) { + // There is no field in source when we use my_value, just a formula + if ($ruleField->getSource()!='my_value') { + // We keep only the fields in the rule + // It could be several fields in the source fields (in case of formula) + $sourceFields = explode(";",$ruleField->getSource()); + foreach ($sourceFields as $sourceField) { + // Fields can be absent in case the rule have changed since the data tranfer has been sent + if (isset($source[$sourceField])) { + $sourceData[$sourceField] = $source[$sourceField]; + } else { + $sourceData[$sourceField] = ''; + } + } + } + // Target and history + $targetField = $ruleField->getTarget(); + + if (isset($target[$targetField])) { + $targetData[$targetField] = $target[$targetField]; + if ( + isset($history[$targetField]) + && !empty($history) + ) { + $historyData[$targetField] = $history[$targetField]; + } + } else { + $targetData[$targetField] = ''; + } + } + // Get RuleRelationShip object + $RuleRelationShips = $em->getRepository('RegleBundle:RuleRelationShip')->findByRule($doc[0]->getRule()); + // Get each data for each rule relationship + foreach($RuleRelationShips as $RuleRelationShip) { + $sourceField = $RuleRelationShip->getFieldNameSource(); + if (isset($source[$sourceField])) { + $sourceData[$sourceField] = $source[$sourceField]; + } + // Target and history + $targetField = $RuleRelationShip->getFieldNameTarget(); + if (isset($target[$targetField])) { + $targetData[$targetField] = $target[$targetField]; + } + // Only if history exists and if the field exist in history + if (!empty($history[$targetField])) { + $historyData[$targetField] = $history[$targetField]; + } + } + + $compact = $this->nav_pagination(array( + 'adapter_em_repository' => $em->getRepository('RegleBundle:Log') + ->findBy( + array('document'=> $id), + array('id' => 'DESC') + ), + 'maxPerPage' => $this->container->getParameter('pager'), + 'page' => $page + ),false); + + // POST DOCUMENT + // Get the post documents (Document coming from a child rule) + $postDocuments = $em->getRepository('RegleBundle:Document')->findBy(array('parentId'=> $id)); + // Get the rule name of every child doc + $postDocumentsRule = array(); + foreach ($postDocuments as $postDocument) { + $postDocumentsRule[$postDocument->getId()] = $em->getRepository('RegleBundle:Rule')->findOneById( $postDocument->getRule())->getName(); + } + + // PARENT RELATE DOCUMENT + // Document link to other document, the parent ones + $parentRelationships = $em->getRepository('RegleBundle:DocumentRelationship')->findBy(array('doc_id'=> $doc[0]->getId())); + // Get the detail of documents related + $i = 0; + $parentDocuments = array(); + $parentDocumentsRule = array(); + foreach ($parentRelationships as $parentRelationship) { + $parentDocuments[$i] = $em->getRepository('RegleBundle:Document')->findOneById( $parentRelationship->getDocRelId()); + $parentDocuments[$i]->sourceField = $parentRelationship->getSourceField(); + // Get the rule name of every relate doc + foreach ($parentDocuments as $parentDocument) { + $parentDocumentsRule[$parentDocument->getId()] = $em->getRepository('RegleBundle:Rule')->findOneById( $parentDocument->getRule())->getName(); + } + $i++; + } + + // CHILD RELATE DOCUMENT + // Document link to other document, the child ones + $childRelationships = $em->getRepository('RegleBundle:DocumentRelationship')->findBy(array('doc_rel_id'=> $doc[0]->getId())); + // Get the detail of documents related + $i = 0; + $childDocuments = array(); + $childDocumentsRule = array(); + foreach ($childRelationships as $childRelationship) { + $childDocuments[$i] = $em->getRepository('RegleBundle:Document')->findOneById( $childRelationship->getDocId()); + $childDocuments[$i]->sourceField = $childRelationship->getSourceField(); + // Get the rule name of every relate doc + foreach ($childDocuments as $childDocument) { + $childDocumentsRule[$childDocument->getId()] = $em->getRepository('RegleBundle:Rule')->findOneById( $childDocument->getRule())->getName(); + } + $i++; + } + + // HISTORY DOCUMENT + // Get the history documents (all document for the same source) + $historyDocuments = $em->getRepository('RegleBundle:Document')->findBy(array('source'=> $doc[0]->getSource(), 'rule'=> $doc[0]->getRule(), 'deleted' => 0)); + // If only one record, the history is the current document, so we remove it => no parent + if (count($historyDocuments) == 1) { + $historyDocuments = array(); + } + + // Add custom button + $name_solution_target = $rule->getConnectorTarget()->getSolution()->getName(); + $solution_target = $this->get('myddleware_rule.'.$name_solution_target); + $solution_target_btn = $solution_target->getDocumentButton( $doc[0]->getId() ); + + $name_solution_source = $rule->getConnectorSource()->getSolution()->getName(); + $solution_source = $this->get('myddleware_rule.'.$name_solution_source); + $solution_source_btn = $solution_source->getDocumentButton( $doc[0]->getId() ); + + $list_btn = array_merge( $solution_target_btn, $solution_source_btn ); + + // Call the view + return $this->render('RegleBundle:Flux:view/view.html.twig',array( + 'current_document' => $id, + 'source' => $sourceData, + 'target' => $targetData, + 'history' => $historyData, + 'doc' => $doc[0], + 'nb' => $compact['nb'], + 'entities' => $compact['entities'], + 'pager' => $compact['pager'], + 'rule' => $rule, + 'post_documents' => $postDocuments, + 'post_Documents_Rule' => $postDocumentsRule, + 'nb_post_documents' => count($postDocuments), + 'child_documents' => $childDocuments, + 'child_Documents_Rule' => $childDocumentsRule, + 'nb_child_documents' => count($childDocuments), + 'parent_documents' => $parentDocuments, + 'parent_Documents_Rule' => $parentDocumentsRule, + 'nb_parent_documents' => count($parentDocuments), + 'history_documents' => $historyDocuments, + 'nb_history_documents' => count($historyDocuments), + 'ctm_btn' => $list_btn, + 'read_record_btn' => $solution_source->getReadRecord() + ) + ); + } + catch(Exception $e) { + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + exit; + } + + } + + // Sauvegarde flux + public function fluxSaveAction(Request $request) { + if($request->getMethod()=='POST') { + // Get the field and value from the request + $fields = strip_tags($request->request->get('fields')); + $value = strip_tags($request->request->get('value')); + + if(isset($value)) { + // get the EntityManager + $em = $this->getDoctrine()->getManager(); + // Get target data for the document + $documentDataEntity = $em->getRepository('RegleBundle:DocumentData') + ->findOneBy( array( + 'doc_id' => $request->request->get('flux'), + 'type' => 'T' + ) + ); + if(!empty($documentDataEntity)) { + $target = json_decode($documentDataEntity->getData(),true); + $beforeValue = $target[$fields]; + // Change the value + $target[$fields] = $value; + // Save the modification + $documentDataEntity->setData(json_encode($target)); // Encode in JSON + + // Insert in audit + $oneDocAudit = new DocumentAudit(); + $oneDocAudit->setDoc( $request->get('flux') ); + $oneDocAudit->setDateModified( new \DateTime ); + $oneDocAudit->setBefore( $beforeValue ); + $oneDocAudit->setAfter( $value ); + $oneDocAudit->setByUser( $this->getUser()->getId() ); + $oneDocAudit->setName( $fields ); + $em->persist($oneDocAudit); + $em->flush(); + echo $value; + exit; + } + } + } + throw $this->createNotFoundException('Failed to modify the field '.$fields); + } + + // Relancer un flux + public function fluxRerunAction($id) { + try { + if(!empty($id)) { + $job = $this->get('myddleware_job.job'); + $job->actionMassTransfer('rerun','document',array($id)); + } + return $this->redirect( $this->generateURL('flux_info', array( 'id'=>$id )) ); + } + catch(Exception $e) { + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + } + } + + // Annuler un flux + public function fluxCancelAction($id) { + try { + if(!empty($id)) { + $job = $this->get('myddleware_job.job'); + $job->actionMassTransfer('cancel','document',array($id)); + } + return $this->redirect( $this->generateURL('flux_info', array( 'id'=>$id )) ); + } + catch(Exception $e) { + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + } + } + + // Read record + public function fluxReadRecordAction($id) { + try { + if(!empty($id)) { + // Get the rule id and the source_id from the document id + $em = $this->getDoctrine()->getManager(); + $doc = $em->getRepository('RegleBundle:Document')->findOneById($id); + if (!empty($doc)) { + if (!empty($doc->getSource())) { + $job = $this->get('myddleware_job.job'); + $job->runBackgroundJob('readrecord',array($doc->getRule(),'id',$doc->getSource())); + } + } + } + return $this->redirect( $this->generateURL('flux_info', array( 'id'=>$id )) ); + } + catch(Exception $e) { + return $this->redirect($this->generateUrl('flux_list', array('search' => 1))); + } + } + + + // Exécute une action d'un bouton dynamique + public function fluxBtnDynAction($method,$id,$solution) { + $solution_ws = $this->get('myddleware_rule.'.mb_strtolower($solution) ); + $solution_ws->documentAction( $id, $method ); + + return $this->redirect($this->generateUrl('flux_info', array('id'=>$id))); + } + + + public function fluxMassCancelAction() { + if(isset($_POST['ids']) && count($_POST['ids']) > 0) { + $job = $this->get('myddleware_job.job'); + $job->actionMassTransfer('cancel','document',$_POST['ids']); + } + exit; + } + + public function fluxMassRunAction() { + + if(isset($_POST['ids']) && count($_POST['ids']) > 0) { + $job = $this->get('myddleware_job.job'); + $job->actionMassTransfer('rerun','document',$_POST['ids']); + } + + exit; + } + + /* ****************************************************** + * METHODES PRATIQUES + ****************************************************** */ + + // Crée la pagination avec le Bundle Pagerfanta en fonction d'une requete + private function nav_pagination($params, $orm = true) { + + /* + * adapter_em_repository = requete + * maxPerPage = integer + * page = page en cours + */ + + if(is_array($params)) { + /* DOC : + * $pager->setCurrentPage($page); + $pager->getNbResults(); + $pager->getMaxPerPage(); + $pager->getNbPages(); + $pager->haveToPaginate(); + $pager->hasPreviousPage(); + $pager->getPreviousPage(); + $pager->hasNextPage(); + $pager->getNextPage(); + $pager->getCurrentPageResults(); + */ + + $compact = array(); + + #On passe l’adapter au bundle qui va s’occuper de la pagination + if($orm) { + $compact['pager'] = new Pagerfanta( new DoctrineORMAdapter($params['adapter_em_repository']) ); + } + else { + $compact['pager'] = new Pagerfanta( new ArrayAdapter($params['adapter_em_repository']) ); + } + + + + #On définit le nombre d’article à afficher par page (que l’on a biensur définit dans le fichier param) + $compact['pager']->setMaxPerPage($params['maxPerPage']); + try { + $compact['entities'] = $compact['pager'] + #On indique au pager quelle page on veut + ->setCurrentPage($params['page']) + #On récupère les résultats correspondant + ->getCurrentPageResults(); + + $compact['nb'] = $compact['pager']->getNbResults(); + + } catch (\Pagerfanta\Exception\NotValidCurrentPageException $e) { + #Si jamais la page n’existe pas on léve une 404 + throw $this->createNotFoundException("Cette page n'existe pas."); + } + + return $compact; + } + else { + return false; + } + } + + // Liste tous les flux d'un type + private function listeFluxTable($id,$type) { + try { + // Get document data + $documentDataEntity = $this->getDoctrine()->getManager()->getRepository('RegleBundle:DocumentData') + ->findOneBy( array( + 'doc_id' => $id, + 'type' => $type + ) + ); + if(!empty($documentDataEntity)) { + return json_decode($documentDataEntity->getData(),true); + } + return null; + } + catch(Exception $e) { + return false; + } + } + +} + + +/* * * * * * * * * * * * * * * * * * * * + si custom file exist alors on fait un include de la custom class + * * * * * * * * * * * * * * * * * * * */ +$file = __DIR__.'/../Custom/Controller/FluxController.php'; +if(file_exists($file)){ + require_once($file); +} +else { + //Sinon on met la classe suivante + class FluxController extends FluxControllerCore { + + } +} + + diff --git a/src/Myddleware/RegleBundle/DataFixtures/ORM/LoadSolutionData.php b/src/Myddleware/RegleBundle/DataFixtures/ORM/LoadSolutionData.php index 3195933e1..3754b81a1 100644 --- a/src/Myddleware/RegleBundle/DataFixtures/ORM/LoadSolutionData.php +++ b/src/Myddleware/RegleBundle/DataFixtures/ORM/LoadSolutionData.php @@ -56,6 +56,8 @@ class LoadSolutionData implements FixtureInterface array('name' => 'sage50', 'active' => 1,'source' => 1,'target' => 1), array('name' => 'hubspot', 'active' => 1,'source' => 1,'target' => 1), array('name' => 'erpnext', 'active' => 1,'source' => 1,'target' => 1), + array('name' => 'myddlewareapi', 'active' => 1,'source' => 1,'target' => 0), + array('name' => 'medialogistique', 'active' => 1,'source' => 1,'target' => 1), ); public function load(ObjectManager $manager){ diff --git a/src/Myddleware/RegleBundle/Entity/Connector.php b/src/Myddleware/RegleBundle/Entity/Connector.php index 24334c9dd..1b2ea1709 100644 --- a/src/Myddleware/RegleBundle/Entity/Connector.php +++ b/src/Myddleware/RegleBundle/Entity/Connector.php @@ -115,6 +115,14 @@ class Connector */ private $modifiedBy; + /** + * @var boolean + * + * @ORM\Column(name="deleted", type="boolean", nullable=false) + * + */ + private $deleted; + /** * Constructor */ @@ -373,5 +381,26 @@ public function setConnectorParams($connectorParams = null) return $this->connectorParams = $connectorParams; } - + /** + * Set deleted + * + * @param integer $deleted + * @return Rule + */ + public function setDeleted($deleted) + { + $this->deleted = $deleted; + + return $this; + } + + /** + * Get deleted + * + * @return integer + */ + public function getDeleted() + { + return $this->deleted; + } } diff --git a/src/Myddleware/RegleBundle/Entity/ConnectorRepository.php b/src/Myddleware/RegleBundle/Entity/ConnectorRepository.php index 4781d7f10..3239828ed 100644 --- a/src/Myddleware/RegleBundle/Entity/ConnectorRepository.php +++ b/src/Myddleware/RegleBundle/Entity/ConnectorRepository.php @@ -42,7 +42,7 @@ public function findAllConnectorByUser($id,$type) $qb = $this->createQueryBuilder('c'); $qb->select('c.id as id_connector, c.label,s.name') ->leftJoin('c.solution', 's') - ->where('c.createdBy = :user_id AND s.active = 1 AND s.'.$type.' = 1 '); + ->where('c.createdBy = :user_id AND c.deleted AND s.active = 1 AND s.'.$type.' = 1 '); // ->setParameter('user_id', $id); return $qb->getQuery() @@ -56,10 +56,13 @@ public function findListConnectorByUser($is_support,$id) { $qb->innerJoin('c.solution', 'sol') ->addSelect('sol.name solution'); - + + // Get all connector not deleted depending on the user is support or not if($is_support === false) { - $qb->where('c.createdBy = :user_id') + $qb->where('c.createdBy = :user_id AND c.deleted = 0') ->setParameter('user_id', $id); + } else { + $qb->where('c.deleted = 0'); } $qb->orderBy('c.id', 'DESC'); diff --git a/src/Myddleware/RegleBundle/Entity/Document.php b/src/Myddleware/RegleBundle/Entity/Document.php index 12298ea45..eb5e181c4 100644 --- a/src/Myddleware/RegleBundle/Entity/Document.php +++ b/src/Myddleware/RegleBundle/Entity/Document.php @@ -37,6 +37,7 @@ * @ORM\Index(name="global_status", columns={"global_status"}), * @ORM\Index(name="source_id", columns={"source_id"}), * @ORM\Index(name="target_id", columns={"target_id"}), + * @ORM\Index(name="rule_id", columns={"rule_id"}), * @ORM\Index(name="date_modified", columns={"date_modified"}) * }) */ @@ -161,6 +162,14 @@ class Document */ private $parentId; + /** + * @var boolean + * + * @ORM\Column(name="deleted", type="boolean", nullable=false) + * + */ + private $deleted; + /** * Set id * @@ -505,4 +514,28 @@ public function getParentId() { return $this->parentId; } + + /** + * Set deleted + * + * @param integer $deleted + * @return Rule + */ + public function setDeleted($deleted) + { + $this->deleted = $deleted; + + return $this; + } + + /** + * Get deleted + * + * @return integer + */ + public function getDeleted() + { + return $this->deleted; + } + } \ No newline at end of file diff --git a/src/Myddleware/RegleBundle/Entity/RuleParamAudit.php b/src/Myddleware/RegleBundle/Entity/RuleParamAudit.php new file mode 100644 index 000000000..a789bd180 --- /dev/null +++ b/src/Myddleware/RegleBundle/Entity/RuleParamAudit.php @@ -0,0 +1,256 @@ +. +*********************************************************************************/ + +namespace Myddleware\RegleBundle\Entity; + +use Doctrine\ORM\Mapping as ORM; + +/** + * RuleParamAudit + * @ORM\Table() + * @ORM\Entity + * @ORM\Table(indexes={ + * @ORM\Index(name="index_job_id", columns={"job_id"}), + * @ORM\Index(name="index_rule_param_id", columns={"rule_param_id"}) + *}) + */ +class RuleParamAudit +{ + /** + * @var integer + * + * @ORM\Column(name="id", type="integer") + * @ORM\Id + * @ORM\GeneratedValue(strategy="AUTO") + */ + private $id; + + /** + * @ORM\PrePersist() + */ + public function preSave() { + $this->id = uniqid(); + } + + /** + * @var integer + * + * + * @ORM\Column(name="rule_param_id", type="integer") + * + */ + private $ruleParamId; + + /** + * @var datetime + * + * @ORM\Column(name="modified", type="datetime", nullable=false) + * + */ + private $dateModified; + + /** + * @var integer + * + * @ORM\Column(name="before_value", type="string", nullable=true) + * + */ + private $before; + + /** + * @var integer + * + * @ORM\Column(name="after_value", type="string", nullable=true) + * + */ + private $after; + + /** + * @var string + * + * + * @ORM\Column(name="user", type="string", nullable=true) + * + */ + private $byUser; + + + /** + * @var string + * + * @ORM\Column(name="job_id", type="string", length=255, nullable=true) + * + */ + private $job; + + + /** + * Get id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Set ruleParamId + * + * @param string $ruleParamId + * @return RuleParamAudit + */ + public function setRuleParamId($ruleParamId) + { + $this->ruleParamId = $ruleParamId; + + return $this; + } + + /** + * Get ruleParamId + * + * @return string + */ + public function getDoc() + { + return $this->ruleParamId; + } + + /** + * Set dateModified + * + * @param \DateTime $dateModified + * @return RuleParamAudit + */ + public function setDateModified($dateModified) + { + $this->dateModified = $dateModified; + + return $this; + } + + /** + * Get dateModified + * + * @return \DateTime + */ + public function getDateModified() + { + return $this->dateModified; + } + + /** + * Set before + * + * @param string $before + * @return RuleParamAudit + */ + public function setBefore($before) + { + $this->before = $before; + + return $this; + } + + /** + * Get before + * + * @return string + */ + public function getBefore() + { + return $this->before; + } + + /** + * Set after + * + * @param string $after + * @return RuleParamAudit + */ + public function setAfter($after) + { + $this->after = $after; + + return $this; + } + + /** + * Get after + * + * @return string + */ + public function getAfter() + { + return $this->after; + } + + /** + * Set byUser + * + * @param string $byUser + * @return RuleParamAudit + */ + public function setByUser($byUser) + { + $this->byUser = $byUser; + + return $this; + } + + /** + * Get byUser + * + * @return string + */ + public function getByUser() + { + return $this->byUser; + } + + /** + * Set job + * + * @param string $job + * @return Log + */ + public function setJob($job) + { + $this->job = $job; + + return $this; + } + + /** + * Get job + * + * @return string + */ + public function getJob() + { + return $this->job; + } +} \ No newline at end of file diff --git a/src/Myddleware/RegleBundle/Form/ConnectorParamType.php b/src/Myddleware/RegleBundle/Form/ConnectorParamType.php index b0a3455b7..fc2266b07 100644 --- a/src/Myddleware/RegleBundle/Form/ConnectorParamType.php +++ b/src/Myddleware/RegleBundle/Form/ConnectorParamType.php @@ -31,44 +31,37 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('value',TextType::class,['error_bubbling' => true])->addModelTransformer(new ConnectorParamsValueTransformer($this->_secret)); $builder->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { - $connectorParam = $event->getData(); - $form = $event->getForm(); - $type = TextType::class; - $option['attr']['class'] = 'params'; - - $id = $connectorParam->getId(); - $name = $connectorParam->getName(); - $option['attr']['data-param'] = $name; - - if ($name == 'wsdl') { - // $option['id'] = 'param_' . $name; - $option['attr']['readonly'] = 'readonly'; - $option['attr']['data-id'] = $id; - $option['attr']['placeholder'] = 'create_connector.upload_placeholder'; - } + $connectorParam = $event->getData(); + $form = $event->getForm(); + $type = TextType::class; + $option['attr']['class'] = 'params'; + + $id = $connectorParam->getId(); + $name = $connectorParam->getName(); + $option['attr']['data-param'] = $name; + + if ($name == 'wsdl' or $name == 'file') { + // $option['id'] = 'param_' . $name; + $option['attr']['readonly'] = 'readonly'; + $option['attr']['data-id'] = $id; + $option['attr']['placeholder'] = 'create_connector.upload_placeholder'; + } - foreach ($this->_solutionFieldsLogin as $f){ - if($f['name'] == $connectorParam->getName()){ - - - - $type = $f['type']; - $option['label'] = 'solution.fields.'.$f['name']; - if($type == 'password'){ - $option['attr']['autocomplete'] = 'off'; - $option['attr']['value'] = $connectorParam->getValue(); // Force value of the password - } - } - } - $form->add('value', $type, $option); - if($connectorParam->getValue() == null){ - $form->add('name', HiddenType::class, ['data' => $name]); - } - - - }); - - + foreach ($this->_solutionFieldsLogin as $f){ + if($f['name'] == $connectorParam->getName()){ + $type = $f['type']; + $option['label'] = 'solution.fields.'.$f['name']; + if($type == 'Symfony\Component\Form\Extension\Core\Type\PasswordType'){ + $option['attr']['autocomplete'] = 'off'; + $option['attr']['value'] = $connectorParam->getValue(); // Force value of the password + } + } + } + $form->add('value', $type, $option); + if($connectorParam->getValue() == null){ + $form->add('name', HiddenType::class, ['data' => $name]); + } + }); } diff --git a/src/Myddleware/RegleBundle/Resources/config/services.yml b/src/Myddleware/RegleBundle/Resources/config/services.yml index 47dbe69e2..544ee0966 100644 --- a/src/Myddleware/RegleBundle/Resources/config/services.yml +++ b/src/Myddleware/RegleBundle/Resources/config/services.yml @@ -123,6 +123,11 @@ services: myddleware_rule.erpnext: class: Myddleware\RegleBundle\Solutions\erpnext arguments: ["@logger", "@service_container", "@doctrine.dbal.default_connection"] + myddleware_rule.myddlewareapi: + class: Myddleware\RegleBundle\Solutions\myddlewareapi + myddleware_rule.medialogistique: + class: Myddleware\RegleBundle\Solutions\medialogistique + arguments: ["@logger", "@service_container", "@doctrine.dbal.default_connection"] myddleware_rule.rule: class: Myddleware\RegleBundle\Classes\rule arguments: ["@logger", "@service_container", "@doctrine.dbal.default_connection", 'rule'] diff --git a/src/Myddleware/RegleBundle/Resources/public/images/solution/medialogistique.png b/src/Myddleware/RegleBundle/Resources/public/images/solution/medialogistique.png new file mode 100644 index 0000000000000000000000000000000000000000..f5f05a0053ab4853c7034cec520072033024d23e GIT binary patch literal 742 zcmeAS@N?(olHy`uVBq!ia0vp^mLSZ*1SFZOL@og-#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=BdgAk26#O}>JGfvMWl#W5tq`R$DJUWXk7j{P>VYfqnlnEiw5 zo}UVGP3(JLx@vF;eo;u$Zwhc>IokY4KAA~JXF%3=pOfenVwHZQSk zIBFnmU(3gkp6hvWu0ro!foDh7=<;ky4ZHf`rD=NZ)dZde_SuDZOg<<4DRd7|3fJ5a zr(5Ly;yBy2)v0r{dJjh#uQ5Gr)pAB9>ZN4B4V8%MnQzwL_KCI9vTklo{(tPZ)2}7BX4*t6F|3+$Hs+pfEstn*_Edj? zYne%Yf=hQ{2Cs&8}M( z7Sr&xV9h*(%wmQa{1#`wU$k+a8ew(tUh4mzJl#33#SVSV?BwuBC_2$Lp}qHUTdAg3 z4ClL!FC{f%8~T(*)15EwahVf&Jd^3EBbbGfBBJ=t)iavjnmX@~=0bj8+GOx_^>bP0 Hl+XkKUN=h& literal 0 HcmV?d00001 diff --git a/src/Myddleware/RegleBundle/Resources/translations/messages.en.yml b/src/Myddleware/RegleBundle/Resources/translations/messages.en.yml index 050aa7974..ae9276aa7 100644 --- a/src/Myddleware/RegleBundle/Resources/translations/messages.en.yml +++ b/src/Myddleware/RegleBundle/Resources/translations/messages.en.yml @@ -1,721 +1,735 @@ -# /********************************************************************************* - # * This file is part of Myddleware. - - # * @package Myddleware - # * @copyright Copyright (C) 2013 - 2015 Stéphane Faure - CRMconsult EURL - # * @copyright Copyright (C) 2015 - 2016 Stéphane Faure - Myddleware ltd - contact@myddleware.com - # * @link http://www.myddleware.com - - # This file is part of Myddleware. - - # Myddleware is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation, either version 3 of the License, or - # (at your option) any later version. - - # Myddleware is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - - # You should have received a copy of the GNU General Public License - # along with Myddleware. If not, see . -# *********************************************************************************/ - -panel: - solutions: - title: Start by connecting these applications - click: Click to see how to create this connector. - graph_tranfer_rule: - desc: Transfer sent by rule - graph_error: - title: Number of transfers by statut - list_error: - nb: Number of errors by rule - list_job: - title: Last jobs details - duration: second(s) - nb : Data transfers with error - graph_histo: - title: Transfer historic - graph_job_histo: - title: Job historic -create_rule: - tabs: - one: Connection - two: Modules selection - three: Fields - four: Simulation - five: Relations - six: Filters - seven: Confirmation - step1: - list_empty: No solution - list_selected: Selection - valid: Confirm the connections - name: Name of your rule - choose_connector: Choose your connector - choose_module: Choose your module - btn_mapping: Go to the fields mapping - btn_confirm: Confirm this rule - connector: New connector created with success - step2: - title: Modules selection - choice_module: Please select a module - valid: Send - step3: - filter: Filter - filter_choice: does not have a filter - filter_fields: Search a field... - empty_fields_target: No field found in the target - empty_simulate: 'There is no data in the source server or fields in the target solution' - empty_field_simulate: Empty content - data: Test data - infobulle: Double click to remove - previous: Previous step - next: Next step - syncdata: - label: Synchronization type - create_modify: Create and update data - create_only: Create data only - search_only: Retrieving existing data only - data_wait: Loading... Please wait - title: Fields - placeholder: Please drag your fields here - info_fields: List of the possible values - addfield: - custom: Add a custom field - alert: - fields: some of the required fields are currently empty. You can fill out several source fields towards a target field. - fields_title: Required fields - formula: - fields: Fields - function: Functions - create: Create a formula - compose: Compose your formula - confirm: Confirm - delete: Delete - close: Close - error: Your rule contains one or more syntax errors - confirm: - success: Successful registration - error: An error has occured - valid: Confirm - relation: - empty: No relation - select: No rule - source: Source - target: Target - rule: Rules - fields: Fields source - parent_detail_view: Parent - parent: Parent relationship to merge several data transfers - record_id: Record ID - yes: Yes - params: - duplicate: Fields to avoid duplicates - sync: Bidirectional synchronization - save_wait: Please wait... - -filter: - content: contains - notcontent: does not contain - begin: starts with - end: ends with - gt: is greater than - lt: is less than - equal: is equal to  - different: is different from - gteq: is greater than or equal to  - lteq: is less than or equal to  - in: is included in the following table separated by; - notin: is not included in the following table separated by ; - -view_rule: - action: - exec_all: Execute all active rules - confirm_exec_all: Do you want to execute all active rules? - exec_error: Rerun all errors - confirm_exec_error: Do you want to rerun all transfers in error? - exec_rule: Run the rule - edit_rule: Edit the rule - confirm_edit_rule: Do you want to change this rule? - delete_rule: Delete the rule - confirm_delete_rule: Do you want to delete this rule? - displayflux: Display the transfers - new_rule: Create a new rule - tabs: - info: Information - mapping: Mapping of the fields - relation: Relations - params: Parameters - filter: Filters - title: - rule: Rule - connector: Connectors - source: Source - target: Target - infos: - active: Enabling the automatic synchronisation - id: Id - name: Name - version: Version - datecreated: Creation date - datemodified: Modification date - mode: Mode - bidirectional: Bidirectional - duplicate_fields: Fields to avoid duplicates - connector: - title: Connector - solution: Solution - module: Module - mapping: - empty: No field - formula_empty: No formula - formula: Formula - module_target: Target module - module_source: Source Module - relate: - empty: No relation - solution_source: Source - solution_target: Target - rule : Rules - filters: - empty: No filter - params: - save: Save - simule: Simulate Transfers - result: Estimated transfers - details: " Represents the number of transfers that will be created for the next lunch of this rule. This number can't be greater than the rule limit you have set up (default 100) and the API limit of your source application." - -rule: - source: Source - target: Target - open: Open - workon: You are working on the rule - yoursource: Your source solution - yourtarget: Your target solution - help: What should I do ? - -list_rule: - title: Liste of the rules - total: Number of rules - empty: You do not have a rule yet ! - delete: Are you sure you want to delete this rule? - create_first_rule: You can create your first rule - th: - name: Name - version: Version - active: Activation - date_created: Date of creation - option: Options - btn: - delete: Delete - edit: Edit - view: Refer to the form - -animate: - rulename: Name of your rule - wait: Please wait... - solution: - source: source - target: target - carousel: - next: Next - previous: Previous - choice: - module: Modules selection - template: Default templates selection - name: Name - description: Description - empty: No template for these solutions, if you want a template, please contact us via contact@myddleware.com - tutoriel: - link: http://community.myddleware.com/index.php/tutorial/#rules - textlink: Do you need help ? Read our tutorial. - -create_connector: - title: Creation of a connector - save: Save the connection - connexion: Name of the connection - test: Test - valid: Click here to create an other connector - help: Need assistance ? - source: Source - target: Target - upload_placeholder: Choose your file - upload_btn: Upload - upload_error: The file could not be saved on the server - upload_error_ext: Extension not allowed - upload_success: The file has been successfully upload - upload_delete: Deleting file - params_error: An error occurred while saving the settings - -list_connector: - empty: You have no connector yet ! - delete: Do you want to delete this connector? - total: Number of connectors - create_first_connector: You can create your first connector - th: - name: Name - date_created: Date of creation - option: Options - btn: - delete: Delete - edit: Edit - view: Refer to the form - -view_connector: - btn: - save: Save - delete: Delete - confirm_delete: Do you confirm that this connector should be deleted ? - info: - title: Connection parameters - solution: solution - tabs: - info: Information - help: Assistance - link_help: Click here to have more information on this connector - help: - link: http://community.myddleware.com/index.php/ - -list_flux: - start: Start - end: End - total: Number of transfers - empty: No transfer found - btn: - filter: Filter - filter_delete: Delete the research filters - cancel: Cancel transfers - mass_cancel_confirm: Cancel the selected transfers? - reload: Reload transfers - mass_reload_confirm: Reload the selected transfers? - filter: - delete_confirm: Are you sure you want to delete the research filters? - date_created: Date of creation - date_modified: Date of modification - rule: Rule - status: Status - global_status: Global status - id: Id - source_id: Source id - target_id: Target id - confirm: Filter - name: Name - content: Transfer content - source_content: Source - target_content: Target - tab: - id: Doc Id - name: Name - version: Version - source_id: Source id - target_id: Target id - date_created: Date of creation - date_modified: Date of modification - statut: Status - source_date_modified: Date of reference - type: Type - source_field: Field linked - -flux: - gbl_status: - open: Opened - close: Closed - cancel: cancelled - error: Error - status: - new: New - predecessor_ok: Predecessor OK - relate_ok : Relation OK - transformed: Transformed - ready_to_send: Ready to be sent - filter_ok: Filter OK - send: Sent - found: Found - filter: Filter Cancelled - no_send: Not sent - cancel: Sending cancelled - filter_ko: Filter error - create_ko: Creation error - predecessor_ko: Predecessor error - relate_ko: Relation error - error_transformed: Transformation error - error_checking: Checking error - error_sending: Sending error - not_found: Not found - -view_flux: - empty: No data - empty_log: No log - target: Target - source: Source - history: History - id: Id - nblogs: Number of logs - nbChildDocuments: Child transfers - nbParentDocuments: Parent transfers - nbHistoryDocuments: History transfers - nbPostDocuments: Post transfers - btn: - reload: Reload the transfer - cancel: Cancel the transfer - readrecord: Generate new transfer - header: - rule: Rule - statut: Status - mode: Mode - type: Type - attempt: Attempt - gblstatut: Global Status - version: Version - parent: Parent - log: - id: Id - ref: Reference - job: Job - date_created: Date of creation - type: Type - msg: Message - -list_task: - total: Total of tasks - empty: No task - th: - id: Id - status: Status - param: Parameter - begin: Start date - end: End date - message: Message - close: Closed - open: Opened - cancel: Cancelled - manual: Manual - error: Error - -view_task: - empty_log: No log - task_stop: STOP TASK - refresh: REFRESH - nblogs: Number of logs - header: - id: Id - status: Status - begin: Start date - end: End date - message: Message - log: - id: Id - ref: Reference - transfer: Transfer - date_created: Date of creation - type: Type - msg: Message - -view_account: - title: My account - user_info: Your informations - change_password : Change password - profile_edit: Edition profile - support: - enabled: Support enabled - disabled: Support disabled - label: - language: Language - popup: - locale: Please wait, the change of your language is under process. You will be redirected to the login page. - -function: - all: All - category: - mathematical: Maths - text: Text - date: Date and hour - description: - text: - trim: Delete the spaces (or other characters) at the beginning and the end of each string - lower: Put all in lower-case characters - upper: Put all in upper-case characters - changeValue: changeValue($var, $arrayKeyToValue) / Replace the value of $var by the corresponding value on the $arrayKeyToValue. Example changeValue( {FIELD},"('A':'1','B':'2')") - substr: substr( string $string , int $start [, int $length ] ) / Return part of a string - striptags: striptags( string $str [, string $allowable_tags ] ) / Strip HTML and PHP tags from a string - htmlEntityDecode: htmlEntityDecode ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") ]] )/ Convert all HTML entities to their applicable characters - replace: replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] ) / Replace all occurrences of the search string with the replacement string - utf8encode: utf8encode ( string $data ) / Encodes an ISO-8859-1 string to UTF-8 - utf8decode: utf8decode ( string $data ) / Converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1 - htmlentities: htmlentities ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convert all applicable characters to HTML entities - htmlspecialchars: htmlspecialchars ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convert special characters to HTML entities - chr: chr ( int $bytevalue ) Generate a single-byte string from a number - mathematical: - round: Rounding a floating point number - ceil: Rounding up - abs: Absolute value - date: - date: Set a date/local time - microtime: Return the current Unix timestamp with the microseconds - changeTimeZone: changeTimeZone($dateToChange, $oldTimeZone, $newTimeZone) / Change the timezone of the previous date in first parameter - changeFormatDate: changeFormatDate($dateToChange, $oldFormat, $newFormat) / Convert the previous date into first parameter in the previous format into second parameter - -solution: - fields: - login: User - password: Password - url: Url - token: Token - tokensecret: Secret token - consumerkey: Consumer key - consumersecret: Consumer secret - apikey: Api key - apiuser: Api user - apikeysecret: Api secret key - mail_gotomeeting: Mail GotoMeeting - accountid: Account Identifier - clientid: Client ID - clientsecret: Client secret - instance: Instance number (Enter 0 if you have none) - company: Company ID - user: User ID - sandbox: Sandbox (1 if yes, 0 if not) - wsdl: File wsdl - host: Host Server - dbname: Database name - database_name: Database name - dbdriver: Database driver - dbport: Database port access - port: Database port access - ftpport: Port (default 22) - directory: Directory with files - shop: Shop - redirect_uri: Redirect URI - applicationName: Application name - params: - dateref: Reference (data will be read from this parameter) - limit: Limit (read limit for each call) - active: Activation - delete: Data deletion (period after document data will be deleted in Myddleware) - activate: activated - desactivate: Deactivate - 1_minute: 1 minute - 5_minute: 5 minutes - 15_minute: 15 minutes - 30_minute: 30 minutes - 1_hour: 1 hour - 2_hour: 2 hours - 12_hour: 12 hours - 0_day: Less than 1 day - 1_day: 1 day - 7_day: 7 days - 14_day: 14 days - 30_day: 30 days - 60_day: 60 days - -error: - connexion: Connection failed - general: Unexpected error - rule: - valid: Not valid rule - order: Please follow the steps in order - mapping: An unexpected error has occured on the fields mapping - source_module: Source module loading error - source_module_all: Source module error - source_module_connect: Source module connection error - source_module_load_list: Source module loading error - target_module: Target module loading error - target_module_connect: Target module connection error - target_module_all: Target module error - target_module_load_list: Target modules loading error - edit_document_error_open: Failed to edit the rule because there is at least one transfer open or in error in this rule. Close or cancel these transfers to be able to edit this rule. - edit_rule_deleted: Failed to edit the rule because this rule is deleted. - delete_document_error_open: Failed to delete the rule because there is at least one transfer open or in error in this rule. Cancel these transfers to be able to delete this rule. - delete_document_close: Failed to delete the rule because data has been successfully sent via this rule. - delete_relationship_exists: Failed to delete the rule because it is linked to another rule. Delete first the rule related or just the relationship with the current rule. Rule related: - update: Failed to edit the rule. - account: - language_change: Failed to change the language : - template: - creation: Failed to generate the template. Please go to our forum and ask for our help https://github.com/Myddleware/myddleware/issues - -title: - account: - view: My account - index: - panel: Control panel - rule: - create_name: Creation of the rule - create: Creation of a rule - edit: Editing the rule - list: Rules list - view: Rule form - connector: - create: Creation of a connector - edit: Editing the connector - list: Connectors list - flux: - list: Transfers list - view: Transfer form - task: - list: Tasks list - view: The task form - credit: - view: Credits purchases - support: - view: Interventions purchases - -menu: - index: Homepage - rule: - title: Rules - createv1: Creation (v1) - createv2: Creation - list: List - connector: - title: Connectors - create: Creation - list: List - flux: - title: Transfers - list: List - job: - title: Tasks - list: List - support: Support - -breadcrumb: - rule_list: Rules list - transfert_list: Transfers list - task_list: Tasks list - connector_list: Connectors list - -menu_user: - account: My account - jobscheduler: Job scheduler - management_smtp: Configuration smtp - logout: Logout - -help: - title: Help - viewrule: - info: > - On this page, you will find general information on your rule. Here you can enable automatic synchronisation of your rule by setting the activation button on ON. - If your rule is activated, a task will run your rule every 5 minutes. However you can perform your rule manually by clicking on " Run the rule" even if the automatic synchronisation is not enabled. - To change more parameters in your rule, go to the tab "parameter" on this page. - mapping: > - On this page you will find all the fields of your source and target applications used in your rule. You will also find the formulas for data transformation. - If you need help to create your formulas, go to our blog at the following adress : See the page on formulas. - relate: > - Here you will find all the relations to link data in your applications More information on relations at the following adress: see the page on relations - param: > - The reference date shows which data will be read in your source system. Only data that were created or modified after that date will be read and sent to the target system. - Therefore if you want to migrate your old data, you need to take a date in the past. If you only want to transfer the new data, then leave the day's date. - The number of days for deleting data indicates the number of days your data has been stored in Myddleware. Eventhough your data is encrypted in Myddleware, we do not allow a backup of more than 60 days. You can reduce this number of days, but keep in mind that we can not provide assistance on deleted data. - rule: - fields: > - Here you can select the correspondance between the fields of your 2 modules simply by a drag and drop. - For example, you can choose to put the name of a Sugar contact in the name of a Salesforce account, - for that, just drag the field "name" of your source module and drop it in the field "name" of your target solution. - To delete a field that was already placed, just double click on it. - You can also use formulas to transform your data. If you need assistance to create formulas, go to our blog at the following adress: See the page on formulas. - For more information or personalised assistance, feel free to contact us. - simulate: > - Here you can simulate the result of the rules you have implemented in the previous stage. - Click on the "test data" button, Myddleware will read a data of your source application to show you how it will be sent to your target application. - relate: > - This tab allows you to define the relations you want to implement in your interface. That way you can link several rules together. - For example, it is possible to transfer the relation between a contact and an account so that they will also be linked in the target solution. - More information on relations at the following adress: see the page on relations - filter: > - This tab allows you to filter the fields of your source application at play - For example, you can choose to take all the contacts whose country is "France". - More information on filters at the following adresse: see the page on filters - validate: > - The last stage, if the target application of your rule allows it, you can choose a de-duplication key. To be used in de-duplication, a field must be selected in the tab "field"of the rule. - For example, for a CRM application, you can de-duplicate all the contacts by their mail. Myddleware will check if the recording already exist in your target solution, before creating it. If it does not existe, Myddleware will create it.Otherwise it will just update it. - For more information or personalised assistance, feel free to contact us. - -session: - task: - msglink: You just launched a new task. You can see the details by clicking on this link - msginfo: If you want to follow it, just refresh the page until it gets the status 'end'. -twitter: - tweets: - ref: > - Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier - favoris: - ref: > - Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier - -messages: - rule: - failed_running_job: Failed to run the task. - failed_get_task_id: Failed to get the task id. - open_running_task: Click here if you want to open the running task. - another_task_running: Failed to create the task because another task is already running. Please wait for the end of this task or you can stop it manually. - failed_create_directory: An error occured while creating your directory. - template: - nb_rule: Number of generated rules: - help: 'Please, read this tutorial to help you to activate your rules : http://community.myddleware.com/index.php/how-to-use-a-template/.' - -email_notification: - subject: Myddleware notification - hello: Hi, - introduction: Here the statistics about your data transfer with Myddleware: - transfer_success: - Tranferts successfully sent: - transfer_error: - Tranferts in error: - transfer_open: - Tranferts open: - active_rule: Active rules: - no_active_rule: No active rule in Myddleware. - 100_first_erros: Here the 100 first errors: - error_list: Here the errors: - best_regards: Best regards, - signature: Myddleware team -email_alert: - subject: Myddleware alert - introduction: A job is running beyond the limit you have set up : - minute: minutes. - job_start: The job has begun at - job_id: . ID of this job : - recommandation: Please, check if this job is still transferring data. If it doesn't, please stop the job manually by opening the job and clicking on the button "Stop task". -jobscheduler: - title: Job scheduler - command: Comamand - date_created: Date created - active: Active - list: List - title: Jobscheduler - period: Period - job_order: Order job - date_modified: Date update - total : Total - create_by : create by - modified_by : modified by - paramName1 : Parameter 1 - paramValue1 : Parameter value 1 - paramName2 : Parameter 2 - paramValue2 : Parameter value 2 - actions: Action - new: Create - update: Update - cancel: Cancel - action: - new_jobscheduler : New command - view: - show : View details - description: - top : Schedule your Myddleware tasks by creating or modifiyng this table. More information here. - bottom : > - Add this task in your Linux or Windows task scheduler : php bin/console myddleware:jobScheduler --env=background
- For example with Linux, add this command in your contab if you want to run Myddleware scheduler every 5 minutes :
- */5 * * * * cd ; php bin/console myddleware:jobScheduler --env=background > /dev/null 2>&1 -management_smtp: - submit : Save configuration SMTP - cancel: Cancel - title : Management SMTP - description : 'You can configure email parameters here. More info here : https://symfony.com/doc/2.8/reference/configuration/swiftmailer.html' - sendtestmail: Send test mail - -management_smtp_sendmail: - subject: Myddleware - email configuration test - textMail: This test message has been sent by Myddleware. - +# /********************************************************************************* + # * This file is part of Myddleware. + + # * @package Myddleware + # * @copyright Copyright (C) 2013 - 2015 Stéphane Faure - CRMconsult EURL + # * @copyright Copyright (C) 2015 - 2016 Stéphane Faure - Myddleware ltd - contact@myddleware.com + # * @link http://www.myddleware.com + + # This file is part of Myddleware. + + # Myddleware is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + + # Myddleware is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with Myddleware. If not, see . +# *********************************************************************************/ + +panel: + solutions: + title: Start by connecting these applications + click: Click to see how to create this connector. + graph_tranfer_rule: + desc: Transfer sent by rule + graph_error: + title: Number of transfers by statut + list_error: + nb: Number of errors by rule + list_job: + title: Last jobs details + duration: second(s) + nb : Data transfers with error + graph_histo: + title: Transfer historic + graph_job_histo: + title: Job historic +create_rule: + tabs: + one: Connection + two: Modules selection + three: Fields + four: Simulation + five: Relations + six: Filters + seven: Confirmation + step1: + list_empty: No solution + list_selected: Selection + valid: Confirm the connections + name: Name of your rule + choose_connector: Choose your connector + choose_module: Choose your module + btn_mapping: Go to the fields mapping + btn_confirm: Confirm this rule + connector: New connector created with success + step2: + title: Modules selection + choice_module: Please select a module + valid: Send + step3: + filter: Filter + filter_choice: does not have a filter + filter_fields: Search a field... + empty_fields_target: No field found in the target + empty_simulate: 'There is no data in the source server or fields in the target solution' + empty_field_simulate: Empty content + data: Test data + infobulle: Double click to remove + previous: Previous step + next: Next step + syncdata: + label: Synchronization type + create_modify: Create and update data + create_only: Create data only + search_only: Retrieving existing data only + data_wait: Loading... Please wait + title: Fields + placeholder: Please drag your fields here + info_fields: List of the possible values + addfield: + custom: Add a custom field + alert: + fields: some of the required fields are currently empty. You can fill out several source fields towards a target field. + fields_title: Required fields + formula: + fields: Fields + function: Functions + create: Create a formula + compose: Compose your formula + confirm: Confirm + delete: Delete + close: Close + error: Your rule contains one or more syntax errors + confirm: + success: Successful registration + error: An error has occured + valid: Confirm + relation: + empty: No relation + select: No rule + source: Source + target: Target + rule: Rules + fields: Fields source + parent_detail_view: Parent + parent: Parent relationship to merge several data transfers + record_id: Record ID + yes: Yes + params: + duplicate: Fields to avoid duplicates + sync: Bidirectional synchronization + save_wait: Please wait... + +filter: + content: contains + notcontent: does not contain + begin: starts with + end: ends with + gt: is greater than + lt: is less than + equal: is equal to  + different: is different from + gteq: is greater than or equal to  + lteq: is less than or equal to  + in: is included in the following table separated by semicolon + notin: is not included in the following table separated by semicolon + +view_rule: + action: + exec_all: Execute all active rules + confirm_exec_all: Do you want to execute all active rules? + exec_error: Rerun all errors + confirm_exec_error: Do you want to rerun all transfers in error? + exec_rule: Run the rule + edit_rule: Edit the rule + confirm_edit_rule: Do you want to change this rule? + delete_rule: Delete the rule + confirm_delete_rule: Do you want to delete this rule? + displayflux: Display the transfers + new_rule: Create a new rule + tabs: + info: Information + mapping: Mapping of the fields + relation: Relations + params: Parameters + filter: Filters + title: + rule: Rule + connector: Connectors + source: Source + target: Target + infos: + active: Enabling the automatic synchronisation + id: Id + name: Name + version: Version + datecreated: Creation date + datemodified: Modification date + mode: Mode + bidirectional: Bidirectional + duplicate_fields: Fields to avoid duplicates + connector: + title: Connector + solution: Solution + module: Module + mapping: + empty: No field + formula_empty: No formula + formula: Formula + module_target: Target module + module_source: Source Module + relate: + empty: No relation + solution_source: Source + solution_target: Target + rule : Rules + filters: + empty: No filter + params: + save: Save + simule: Simulate Transfers + result: Estimated transfers + details: " Represents the number of transfers that will be created for the next lunch of this rule. This number can't be greater than the rule limit you have set up (default 100) and the API limit of your source application." + +rule: + source: Source + target: Target + open: Open + workon: You are working on the rule + yoursource: Your source solution + yourtarget: Your target solution + help: What should I do ? + +list_rule: + title: Liste of the rules + total: Number of rules + empty: You do not have a rule yet ! + delete: Are you sure you want to delete this rule? + create_first_rule: You can create your first rule + th: + name: Name + version: Version + active: Activation + date_created: Date of creation + option: Options + btn: + delete: Delete + edit: Edit + view: Refer to the form + +animate: + rulename: Name of your rule + wait: Please wait... + solution: + source: source + target: target + carousel: + next: Next + previous: Previous + choice: + module: Modules selection + template: Default templates selection + name: Name + description: Description + empty: No template for these solutions, if you want a template, please contact us via contact@myddleware.com + tutoriel: + link: http://community.myddleware.com/index.php/tutorial/#rules + textlink: Do you need help ? Read our tutorial. + +create_connector: + title: Creation of a connector + save: Save the connection + connexion: Name of the connection + test: Test + valid: Click here to create an other connector + help: Need assistance ? + source: Source + target: Target + upload_placeholder: Choose your file + upload_btn: Upload + upload_error: The file could not be saved on the server + upload_error_ext: Extension not allowed + upload_success: The file has been successfully upload + upload_delete: Deleting file + params_error: An error occurred while saving the settings + +list_connector: + empty: You have no connector yet ! + delete: Do you want to delete this connector? + total: Number of connectors + create_first_connector: You can create your first connector + th: + name: Name + date_created: Date of creation + option: Options + btn: + delete: Delete + edit: Edit + view: Refer to the form + +view_connector: + btn: + save: Save + delete: Delete + confirm_delete: Do you confirm that this connector should be deleted ? + info: + title: Connection parameters + solution: solution + tabs: + info: Information + help: Assistance + link_help: Click here to have more information on this connector + help: + link: http://community.myddleware.com/index.php/ + +list_flux: + start: Start + end: End + total: Number of transfers + empty: No transfer found + btn: + filter: Filter + filter_delete: Delete the research filters + cancel: Cancel transfers + mass_cancel_confirm: Cancel the selected transfers? + reload: Reload transfers + mass_reload_confirm: Reload the selected transfers? + filter: + delete_confirm: Are you sure you want to delete the research filters? + date_created: Date of creation + date_modified: Date of modification + rule: Rule + status: Status + global_status: Global status / Type + id: Id + source_id: Source id + target_id: Target id + confirm: Filter + name: Name + content: Transfer content + source_content: Source + target_content: Target + tab: + id: Doc Id + name: Name + version: Version + source_id: Source id + target_id: Target id + date_created: Creation date + date_modified: Modification date + statut: Status + source_date_modified: Date of reference + type: Type + source_field: Field linked + reference: Reference + +flux: + gbl_status: + open: Opened + close: Closed + cancel: cancelled + error: Error + status: + new: New + predecessor_ok: Predecessor OK + relate_ok : Relation OK + transformed: Transformed + ready_to_send: Ready to be sent + filter_ok: Filter OK + send: Sent + found: Found + filter: Filter Cancelled + no_send: Not sent + cancel: Sending cancelled + filter_ko: Filter error + create_ko: Creation error + predecessor_ko: Predecessor error + relate_ko: Relation error + error_transformed: Transformation error + error_checking: Checking error + error_sending: Sending error + not_found: Not found + type: + update: Update + create: Create + search: Search + +view_flux: + empty: No data + empty_log: No log + target: Target + source: Source + history: History + id: Id + nblogs: Number of logs + nbChildDocuments: Child transfers + nbParentDocuments: Parent transfers + nbHistoryDocuments: History transfers + nbPostDocuments: Post transfers + btn: + reload: Reload the transfer + cancel: Cancel the transfer + readrecord: Run the same record + header: + rule: Rule + statut: Status + mode: Mode + type: Type + attempt: Attempt + gblstatut: Global Status + version: Version + parent: Parent + dateref: Reference + date_created: Creation date + date_modified: Modification date + log: + id: Id + ref: Reference + job: Job + date_created: Date of creation + type: Type + msg: Message + +list_task: + total: Total of tasks + empty: No task + th: + id: Id + status: Status + param: Parameter + begin: Start date + end: End date + message: Message + close: Closed + open: Opened + cancel: Cancelled + manual: Manual + error: Error + +view_task: + empty_log: No log + task_stop: STOP TASK + refresh: REFRESH + nblogs: Number of logs + header: + id: Id + status: Status + begin: Start date + end: End date + message: Message + log: + id: Id + ref: Reference + transfer: Transfer + date_created: Date of creation + type: Type + msg: Message + +view_account: + title: My account + user_info: Your informations + change_password : Change password + profile_edit: Edition profile + support: + enabled: Support enabled + disabled: Support disabled + label: + language: Language + popup: + locale: Please wait, the change of your language is under process. You will be redirected to the login page. + +function: + all: All + category: + mathematical: Maths + text: Text + date: Date and hour + description: + text: + trim: Delete the spaces (or other characters) at the beginning and the end of each string + lower: Put all in lower-case characters + upper: Put all in upper-case characters + changeValue: changeValue($var, $arrayKeyToValue) / Replace the value of $var by the corresponding value on the $arrayKeyToValue. Example changeValue( {FIELD},"('A':'1','B':'2')") + substr: substr( string $string , int $start [, int $length ] ) / Return part of a string + striptags: striptags( string $str [, string $allowable_tags ] ) / Strip HTML and PHP tags from a string + htmlEntityDecode: htmlEntityDecode ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") ]] )/ Convert all HTML entities to their applicable characters + replace: replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] ) / Replace all occurrences of the search string with the replacement string + utf8encode: utf8encode ( string $data ) / Encodes an ISO-8859-1 string to UTF-8 + utf8decode: utf8decode ( string $data ) / Converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1 + htmlentities: htmlentities ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convert all applicable characters to HTML entities + htmlspecialchars: htmlspecialchars ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convert special characters to HTML entities + chr: chr ( int $bytevalue ) Generate a single-byte string from a number + mathematical: + round: Rounding a floating point number + ceil: Rounding up + abs: Absolute value + date: + date: Set a date/local time + microtime: Return the current Unix timestamp with the microseconds + changeTimeZone: changeTimeZone($dateToChange, $oldTimeZone, $newTimeZone) / Change the timezone of the previous date in first parameter + changeFormatDate: changeFormatDate($dateToChange, $oldFormat, $newFormat) / Convert the previous date into first parameter in the previous format into second parameter + +solution: + fields: + login: User + password: Password + url: Url + token: Token + tokensecret: Secret token + consumerkey: Consumer key + consumersecret: Consumer secret + apikey: Api key + apiuser: Api user + apikeysecret: Api secret key + mail_gotomeeting: Mail GotoMeeting + accountid: Account Identifier + clientid: Client ID + clientsecret: Client secret + instance: Instance number (Enter 0 if you have none) + company: Company ID + user: User ID + sandbox: Sandbox (1 if yes, 0 if not) + wsdl: File wsdl + file: File + host: Host Server + dbname: Database name + database_name: Database name + dbdriver: Database driver + dbport: Database port access + port: Database port access + ftpport: Port (default 22) + directory: Directory with files + shop: Shop + redirect_uri: Redirect URI + applicationName: Application name + hashkey: Hash key + id_auth: Auth ID + params: + dateref: Reference (data will be read from this parameter) + limit: Limit (read limit for each call) + active: Activation + delete: Data deletion (period after document data will be deleted in Myddleware) + activate: activated + desactivate: Deactivate + 1_minute: 1 minute + 5_minute: 5 minutes + 15_minute: 15 minutes + 30_minute: 30 minutes + 1_hour: 1 hour + 2_hour: 2 hours + 12_hour: 12 hours + 0_day: Less than 1 day + 1_day: 1 day + 7_day: 7 days + 14_day: 14 days + 30_day: 30 days + 60_day: 60 days + +error: + connexion: Connection failed + general: Unexpected error + rule: + valid: Not valid rule + order: Please follow the steps in order + mapping: An unexpected error has occured on the fields mapping + source_module: Source module loading error + source_module_all: Source module error + source_module_connect: Source module connection error + source_module_load_list: Source module loading error + target_module: Target module loading error + target_module_connect: Target module connection error + target_module_all: Target module error + target_module_load_list: Target modules loading error + edit_document_error_open: Failed to edit the rule because there is at least one transfer open or in error in this rule. Close or cancel these transfers to be able to edit this rule. + edit_document_error_open_admin: There is at least one transfer open or in error in this rule. We advise you to manage these transfers before editing this rule. + edit_rule_deleted: Failed to edit the rule because this rule is deleted. + delete_document: Failed to delete the rule because there is at least one data transfer not deleted on this rule. Remove these transfers to be able to delete this rule. + delete_relationship_exists: Failed to delete the rule because it is linked to another rule. Delete first the rule related or just the relationship with the current rule. Rule related: + update: Failed to edit the rule. + account: + language_change: Failed to change the language : + template: + creation: Failed to generate the template. Please go to our forum and ask for our help https://github.com/Myddleware/myddleware/issues + connector: + remove_with_rule: Failed to remove this connector because it is used by a rule. Please remove first the rule + document: + deleted_flag: This data transfer is flagged deleted. It isn't used when Myddleware manage relationships and checks. + +title: + account: + view: My account + index: + panel: Control panel + rule: + create_name: Creation of the rule + create: Creation of a rule + edit: Editing the rule + list: Rules list + view: Rule form + connector: + create: Creation of a connector + edit: Editing the connector + list: Connectors list + flux: + list: Transfers list + view: Transfer form + task: + list: Tasks list + view: The task form + credit: + view: Credits purchases + support: + view: Interventions purchases + +menu: + index: Homepage + rule: + title: Rules + createv1: Creation (v1) + createv2: Creation + list: List + connector: + title: Connectors + create: Creation + list: List + flux: + title: Transfers + list: List + job: + title: Tasks + list: List + support: Support + +breadcrumb: + rule_list: Rules list + transfert_list: Transfers list + task_list: Tasks list + connector_list: Connectors list + +menu_user: + account: My account + jobscheduler: Job scheduler + management_smtp: Configuration smtp + logout: Logout + +help: + title: Help + viewrule: + info: > + On this page, you will find general information on your rule. Here you can enable automatic synchronisation of your rule by setting the activation button on ON. + If your rule is activated, a task will run your rule every 5 minutes. However you can perform your rule manually by clicking on " Run the rule" even if the automatic synchronisation is not enabled. + To change more parameters in your rule, go to the tab "parameter" on this page. + mapping: > + On this page you will find all the fields of your source and target applications used in your rule. You will also find the formulas for data transformation. + If you need help to create your formulas, go to our blog at the following adress : See the page on formulas. + relate: > + Here you will find all the relations to link data in your applications More information on relations at the following adress: see the page on relations + param: > + The reference date shows which data will be read in your source system. Only data that were created or modified after that date will be read and sent to the target system. + Therefore if you want to migrate your old data, you need to take a date in the past. If you only want to transfer the new data, then leave the day's date. + The number of days for deleting data indicates the number of days your data has been stored in Myddleware. Eventhough your data is encrypted in Myddleware, we do not allow a backup of more than 60 days. You can reduce this number of days, but keep in mind that we can not provide assistance on deleted data. + rule: + fields: > + Here you can select the correspondance between the fields of your 2 modules simply by a drag and drop. + For example, you can choose to put the name of a Sugar contact in the name of a Salesforce account, + for that, just drag the field "name" of your source module and drop it in the field "name" of your target solution. + To delete a field that was already placed, just double click on it. + You can also use formulas to transform your data. If you need assistance to create formulas, go to our blog at the following adress: See the page on formulas. + For more information or personalised assistance, feel free to contact us. + simulate: > + Here you can simulate the result of the rules you have implemented in the previous stage. + Click on the "test data" button, Myddleware will read a data of your source application to show you how it will be sent to your target application. + relate: > + This tab allows you to define the relations you want to implement in your interface. That way you can link several rules together. + For example, it is possible to transfer the relation between a contact and an account so that they will also be linked in the target solution. + More information on relations at the following adress: see the page on relations + filter: > + This tab allows you to filter the fields of your source application at play + For example, you can choose to take all the contacts whose country is "France". + More information on filters at the following adresse: see the page on filters + validate: > + The last stage, if the target application of your rule allows it, you can choose a de-duplication key. To be used in de-duplication, a field must be selected in the tab "field"of the rule. + For example, for a CRM application, you can de-duplicate all the contacts by their mail. Myddleware will check if the recording already exist in your target solution, before creating it. If it does not existe, Myddleware will create it.Otherwise it will just update it. + For more information or personalised assistance, feel free to contact us. + +session: + task: + msglink: You just launched a new task. You can see the details by clicking on this link + msginfo: If you want to follow it, just refresh the page until it gets the status 'end'. +twitter: + tweets: + ref: > + Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier + favoris: + ref: > + Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier + +messages: + rule: + failed_running_job: Failed to run the task. + failed_get_task_id: Failed to get the task id. + open_running_task: Click here if you want to open the running task. + another_task_running: Failed to create the task because another task is already running. Please wait for the end of this task or you can stop it manually. + failed_create_directory: An error occured while creating your directory. + template: + nb_rule: Number of generated rules: + help: 'Please, read this tutorial to help you to activate your rules : http://community.myddleware.com/index.php/how-to-use-a-template/.' + +email_notification: + subject: Myddleware notification + hello: Hi, + introduction: Here the statistics about your data transfer with Myddleware: + transfer_success: - Tranferts successfully sent: + transfer_error: - Tranferts in error: + transfer_open: - Tranferts open: + active_rule: Active rules: + no_active_rule: No active rule in Myddleware. + 100_first_erros: Here the 100 first errors: + error_list: Here the errors: + best_regards: Best regards, + signature: Myddleware team +email_alert: + subject: Myddleware alert + introduction: A job is running beyond the limit you have set up : + minute: minutes. + job_start: The job has begun at + job_id: . ID of this job : + recommandation: Please, check if this job is still transferring data. If it doesn't, please stop the job manually by opening the job and clicking on the button "Stop task". +jobscheduler: + title: Job scheduler + command: Comamand + date_created: Date created + active: Active + list: List + title: Jobscheduler + period: Period + job_order: Order job + date_modified: Date update + total : Total + create_by : create by + modified_by : modified by + paramName1 : Parameter 1 + paramValue1 : Parameter value 1 + paramName2 : Parameter 2 + paramValue2 : Parameter value 2 + actions: Action + new: Create + update: Update + cancel: Cancel + action: + new_jobscheduler : New command + view: + show : View details + description: + top : Schedule your Myddleware tasks by creating or modifiyng this table. More information here. + bottom : > + Add this task in your Linux or Windows task scheduler : php bin/console myddleware:jobScheduler --env=background
+ For example with Linux, add this command in your contab if you want to run Myddleware scheduler every 5 minutes :
+ */5 * * * * cd ; php bin/console myddleware:jobScheduler --env=background > /dev/null 2>&1 +management_smtp: + submit : Save configuration SMTP + cancel: Cancel + title : Management SMTP + description : 'You can configure email parameters here. More info here : https://symfony.com/doc/2.8/reference/configuration/swiftmailer.html' + sendtestmail: Send test mail + +management_smtp_sendmail: + subject: Myddleware - email configuration test + textMail: This test message has been sent by Myddleware. diff --git a/src/Myddleware/RegleBundle/Resources/translations/messages.fr.yml b/src/Myddleware/RegleBundle/Resources/translations/messages.fr.yml index 8557a577f..93dd84ccb 100644 --- a/src/Myddleware/RegleBundle/Resources/translations/messages.fr.yml +++ b/src/Myddleware/RegleBundle/Resources/translations/messages.fr.yml @@ -1,721 +1,736 @@ -# /********************************************************************************* - # * This file is part of Myddleware. - - # * @package Myddleware - # * @copyright Copyright (C) 2013 - 2015 Stéphane Faure - CRMconsult EURL - # * @copyright Copyright (C) 2015 - 2016 Stéphane Faure - Myddleware ltd - contact@myddleware.com - # * @link http://www.myddleware.com - - # This file is part of Myddleware. - - # Myddleware is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation, either version 3 of the License, or - # (at your option) any later version. - - # Myddleware is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - - # You should have received a copy of the GNU General Public License - # along with Myddleware. If not, see . -# *********************************************************************************/ - -panel: - solutions: - title: Connectez dès à présent ces différentes solutions - click: Cliquez pour savoir comment créer ce connecteur. - graph_tranfer_rule: - desc: Tranferts envoyés par règle - graph_error: - title: Nombre de transferts par statut - list_error: - nb: Nombre d'erreurs par règle - list_job: - title: Détail des derniers jobs - duration: seconde(s) - nb : Transferts de données en erreur - graph_histo: - title: Historique des transferts - graph_job_histo: - title: Historique des jobs -create_rule: - tabs: - one: Connexion - two: Choix des modules - three: Champs - four: Simulation - five: Relations - six: Filtres - seven: Validation - step1: - list_empty: Aucune solution - list_selected: Choix - valid: Valider les connexions - name: Nom de votre règle - choose_connector: Choisissez votre connecteur - choose_module: Choisissez votre module - btn_mapping: Passer au mapping des champs - btn_confirm: Confirmer cette règle - connector: Votre connecteur a bien été créé - step2: - title: Choix des modules - choice_module: Veuillez choisir un module - valid: Envoyer - step3: - filter: Filtre - filter_choice: n’a pas de filtre - filter_fields: Rechercher un champ... - empty_fields_target: Aucun champ trouvé dans cible - empty_simulate: Attention il n'existe pas de donnée dans le serveur source ou de champs dans la solution cible - empty_field_simulate: Contenu vide - data: Tester les données - infobulle: Double clic pour effacer - previous: Etape précédente - next: Etape suivante - syncdata: - label: Type de synchronisation - create_modify: Création et modification de données - create_only: Création de données seulement - search_only: Récupération de données existantes seulement - data_wait: Chargement en cours... Merci de patienter - title: Champs - placeholder: Veuillez faire glisser vos champs ici - info_fields: Liste des valeurs possibles - addfield: - custom: Ajouter un champ personnalisé - alert: - fields: Il existe des champs obligatoires qui sont actuellement vides. Il vous est possible de renseigner plusieurs champs source vers un champ cible. - fields_title: Champs obligatoires - formula: - fields: Champs - function: Fonctions - create: Créer une formule - compose: Composer votre formule - confirm: Confirmer - delete: Effacer - close: Fermer - error: Votre règle comporte une ou plusieurs erreurs de syntaxe - confirm: - success: Enregistrement avec succès - error: Une erreur est survenue - valid: Valider - relation: - empty: Aucune relation - select: Aucune règle - source: Source - target: Cible - rule: Règles - fields: Champs source - parent_detail_view: Parent - parent: "Relation parent : fusion de plusieurs transferts de données" - record_id: ID enregistrement - yes: Oui - params: - duplicate: Champs pour éviter les doublons - sync: Synchronisation bidirectionnelle - save_wait: Veuillez patienter... - -filter: - content: contient - notcontent: ne contient pas - begin: commence par - end: se termine par - gt: est supérieur à - lt: est inférieur à - equal: est égale à - different: est différent de - gteq: est supérieur ou égal à - lteq: est inférieur ou égal à - in: est compris dans le tableau suivant séparé par des ; - notin: n’est pas compris dans le tableau suivant séparé par des ; - -view_rule: - action: - exec_all: Exéc. les règles actives - confirm_exec_all: Souhaitez-vous exécuter toutes les règles actives ? - exec_error: Relancer les erreurs - confirm_exec_error: Souhaitez-vous relancer tous les transferts en erreur ? - exec_rule: Exécuter la règle - edit_rule: Editer la règle - confirm_edit_rule: Souhaitez-vous modifier cette règle ? - delete_rule: Supprimer la règle - confirm_delete_rule: Souhaitez-vous supprimer cette règle ? - displayflux: Voir les transferts - new_rule: Créer une règle - tabs: - info: Informations - mapping: Mapping des champs - relation: Relations - params: Paramètres - filter: Filtres - title: - rule: Règle - connector: Connecteurs - source: Source - target: Cible - infos: - active: Activation de la synchronisation automatique - id: Identifiant - name: Nom - version: Version - datecreated: Date de création - datemodified: Date de modification - mode: Mode - bidirectional: Bidirectionnelle - duplicate_fields: Champs de dédoublonnage - connector: - title: Connecteur - solution: Solution - module: Module - mapping: - empty: Aucun champ - formula_empty: Aucune formule - formula: Formule - module_target: Module Cible - module_source: Module Source - relate: - empty: Aucune relation - solution_source: Source - solution_target: Cible - rule : Règles - filters: - empty: Aucun filtre - - params: - save: Sauvegarder - simule: Simuler Transferts - result: Nombre de transferts estimé - details: Représente le nombre de tansferts qui vont être créés lors du prochain envoi de cette règle. Ce numbre ne peut pas être plus grand que le paramètre limit de votre règle que vous avez paramétrez (défaut 100) et que la limite de l'API de votre application source. - -rule: - source: Source - target: Cible - open: Ouvrir - workon: Vous travaillez sur la règle - yoursource: Votre solution source - yourtarget: Votre solution cible - help: Que dois-je faire ? - -list_rule: - title: Liste des règles - total: Nombre de règles - empty: Vous n'avez pas encore de règle ! - delete: Etes-vous sûr de vouloir supprimer cette règle ? - create_first_rule: Vous pouvez créer votre première règle - th: - name: Nom - version: Version - active: Activation - date_created: Date de création - option: Options - btn: - delete: Supprimer - edit: Editer - view: Voir la fiche - -animate: - rulename: Nom de votre règle - wait: Veuillez patienter... - solution: - source: source - target: cible - carousel: - next: Suivant - previous: Précèdent - choice: - module: Choix des modules - template: Choix des modèles prédéfinis - name: Nom - description: Description - empty: "Pas de modèle établit pour ces solutions, si vous en désirez un, contactez-nous via contact@myddleware.com" - tutoriel: - link: "http://community.myddleware.com/index.php/tutorial/#rules" - textlink: "Besoin d'aide ? Lisez notre tutoriel." - -create_connector: - title: Création d'un connecteur - save: Enregistrer la connexion - connexion: Nom de la connexion - test: Tester - valid: Cliquez-ici pour créer un autre connecteur - help: "Besoin d'aide ?" - source: Source - target: Cible - upload_placeholder: Sélectionner votre fichier - upload_btn: Transférer - upload_error: Le fichier n'a pas pu être enregistré sur le serveur - upload_error_ext: L'extension n'est pas autorisée - upload_success: Le fichier a bien été transféré - upload_delete: Suppression du fichier - params_error: Une erreur s'est produite lors de l'enregistrement des paramêtres - -list_connector: - empty: Vous n'avez pas encore de connecteur ! - delete: "Désirez-vous supprimer ce connecteur ?" - total: Nombre de connecteurs - create_first_connector: Vous pouvez créer votre premier connecteur - th: - name: Nom - date_created: Date de création - option: Options - btn: - delete: Supprimer - edit: Editer - view: Voir la fiche - -view_connector: - btn: - save: Sauvegarder - delete: Supprimer - confirm_delete: Confirmez-vous la suppression de ce connecteur ? - info: - title: Paramètres de connexion - solution: solution - tabs: - info: Informations - help: Aide - link_help: Cliquez-ici pour avoir plus d'informations sur ce connecteur - help: - link: http://community.myddleware.com/index.php/ - -list_flux: - start: Début - end: Fin - total: Nombre de transferts - empty: Aucun transfert trouvé - btn: - filter: Filtrer - filter_delete: Supprimer les filtres de recherche - cancel: Annuler les transferts - mass_cancel_confirm: Annuler les transferts sélectionnés ? - reload: Relancer les transferts - mass_reload_confirm: Relancer les transferts selectionnés ? - filter: - delete_confirm: Êtes-vous sûre de vouloir effacer les filtres de recherche ? - date_created: Date de création - date_modified: Date de modification - rule: Règle - status: Statut - global_status: Statut global - id: Identifiant - source_id: Id source - target_id: Id cible - confirm: Filtrer - name: Nom - content: Contenu du transfer - source_content: Source - target_content: Target - tab: - id: Doc Id - name: Nom - version: Version - source_id: Id source - target_id: Id cible - date_created: Date de création - date_modified: Date de modification - statut: Status - source_date_modified: Date de référence - type: Type - source_field: Champ lié - -flux: - gbl_status: - open: Ouvert - close: Fermé - cancel: Annulé - error: Erreur - status: - new: Nouveau - predecessor_ok: Prédécesseur OK - relate_ok : Relation OK - transformed: Transformé - ready_to_send: Prêt à être envoyé - filter_ok: Filtre OK - send: Envoyé - found: Trouvé - filter: Filtre annulé - no_send: Non envoyé - cancel: Envoi annulé - filter_ko: Filtre en erreur - create_ko: Création en erreur - predecessor_ko: Prédécesseur en erreur - relate_ko: Relation en erreur - error_transformed: Transformation en erreur - error_checking: Vérification en erreur - error_sending: Envoi en erreur - Not_found: Non trouvée - -view_flux: - empty: Pas de données - empty_log: Aucune log - target: Cible - source: Source - history: Historique - id: Identifiant - nblogs: Nombre de logs - nbChildDocuments: Tranferts fils - nbParentDocuments: Tranferts parents - nbHistoryDocuments: Historique des transferts - nbPostDocuments: Tranferts post - btn: - reload: Relancer le transfert - cancel: Annuler le transfert - readrecord: Générer un nouveau transfer - header: - rule: Règle - statut: Status - mode: Mode - type: Type - attempt: Tentative - gblstatut: Global Status - version: Version - parent: Parent - log: - id: Id - ref: Référence - job: Job - date_created: Date de création - type: Type - msg: Message - -list_task: - total: Total de tâches - empty: Aucune tâche - th: - id: Identifiant - status: Statut - param: Paramètre - begin: Date de début - end: Date de fin - message: Message - close: Fermé - open: Ouvert - cancel: Annulé - manual: Manuelle - error: Erreur - -view_task: - empty_log: Aucune log - task_stop: ARRET DE LA TACHE - refresh: RAFRAICHIR - nblogs: Nombre de logs - header: - id: Identifiant - status: Statut - begin: Date de début - end: Date de fin - message: Message - log: - id: Id - ref: Référence - transfer: Transfert - date_created: Date de création - type: Type - msg: Message - -view_account: - title: Mon compte - user_info: Mes informations - change_password : Changer mot de passe - profile_edit: Edition profile - support: - enabled: Support activé - disabled: Support désactivé - label: - language: Langue - popup: - locale: Changement de la langue en cours, merci de bien vouloir patienter. Vous allez être rediriger vers la page d'authentification. - -function: - all: Toutes - category: - mathematical: Maths - text: Texte - date: Date et heure - description: - text: - trim: Supprime les espaces (ou d'autres caractères) en début et fin de chaîne - lower: Met tous les caractères en minuscules - upper: Met tous les caractères en majuscules - changeValue: changeValue($var, $arrayKeyToValue) / Remplace la valeur de $var par la valeur correspondante du tableau $arrayKeyToValue. Exemple changeValue( {FIELD},"('A':'1','B':'2')") - substr: substr ( string $string , int $start [, int $length ] ) / Retourne un segment de chaîne. - striptags: striptags( string $str [, string $allowable_tags ] ) / Supprime les balises HTML et PHP d'une chaîne - htmlEntityDecode: htmlEntityDecode ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") ]] )/ Convertit toutes les entités HTML en caractères normaux - replace: replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] ) / Remplace toutes les occurrences dans une chaîne - utf8encode: utf8encode ( string $data ) / Convertit une chaîne ISO-8859-1 en UTF-8 - utf8decode: utf8decode ( string $data ) / Convertit une chaîne UTF-8 en ISO-8859-1 - htmlentities: htmlentities ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convertit tous les caractères éligibles en entités HTML - htmlspecialchars: htmlspecialchars ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convertit les caractères spéciaux en entités HTML - chr: chr ( int $bytevalue ) Générer une chaîne d'un octet à partir d'un nombre - mathematical: - round: Arrondit un nombre à virgule flottante - ceil: Arrondit au nombre supérieur - abs: Valeur absolue - date: - date: Formate une date/heure locale - microtime: Retourne le timestamp UNIX actuel avec les microsecondes - changeTimeZone: changeTimeZone($dateToChange, $oldTimeZone, $newTimeZone) / Change le timezone de la date passée en premier paramètre - changeFormatDate: changeFormatDate($dateToChange, $oldFormat, $newFormat) / Convertit la date passée en premier paramètre dans le format passé en deuxième paramètre - -solution: - fields: - login: Utilisateur - password: Mot de passe - url: Url - token: Jeton - tokensecret: Secret jeton - consumerkey: Clé consommateur - consumersecret: Secret consommateur - apikey: Clé api - apiuser: Utilisateur api - apikeysecret: Clé api secret - mail_gotomeeting: Mail GotoMeeting - accountid: Identifiant de compte - clientid: Client ID - clientsecret: Client secret - instance: Numéro d'instance (Entrez 0 si vous n'en avez pas) - company: Company ID - user: User ID - sandbox: Sandbox (1 si oui, 0 sinon) - wsdl: Fichier wsdl - host: Serveur Host - dbname: Nom de la base de données - database_name: Nom de la base de données - dbdriver: Driver (pilote) de la base de données - dbport: Port d'accès à la base de données - port: Port d'accès à la base de données - ftpport: Port (défaut 22) - directory: Répertoire avec les fichiers - shop: Magasin - redirect_uri: URL de redirection - applicationName: Nom de l'application - params: - dateref: Référence (Les données seront lues à partir de ce paramètre) - limit: Limite (Nombre de données lues maximum par appel) - active: Activation - delete: Suppression de données (délais de suppression des données des documents dans Myddleware) - activate: Activé - desactivate: Désactivé - 1_minute: 1 minute - 5_minute: 5 minutes - 15_minute: 15 minutes - 30_minute: 30 minutes - 1_hour: 1 heure - 2_hour: 2 heures - 12_hour: 12 heures - 0_day: Inférieure à 1 jour - 1_day: 1 jour - 7_day: 7 jours - 14_day: 14 jours - 30_day: 30 jours - 60_day: 60 jours - -error: - connexion: Connexion impossible - general: Erreur inattendue - rule: - valid: Règle non valide - order: Veuillez suivre l'ordre des étapes - mapping: Une erreur inattendue s'est produite au mapping des champs - source_module: Erreur de chargement du module source - source_module_all: Erreur du module source - source_module_connect: Erreur de connexion du module source - source_module_load_list: Erreur de chargement du module source - target_module: Erreur de chargement du module cible - target_module_connect: Erreur de connexion du module cible - target_module_all: Erreur du module cible - target_module_load_list: Erreur de chargement des modules cible - edit_document_error_open: Impossible d'éditer la règle car au moins un transfert est ouvert ou en erreur sur cette règle. Veuillez annuler ou relancer ces transferts pour pouvoir éditer cette règle. - edit_rule_deleted: Impossible d'éditer la règle car elle est supprimée. - delete_document_error_open: Impossible de supprimer la règle car au moins un transfert est ouvert ou en erreur sur cette règle. Veuillez annuler ces transferts pour pouvoir éditer cette règle. - delete_document_close: Impossible de supprimer la règle car des données ont été envoyées via cette règle. - delete_relationship_exists: Impossible de supprimer la règle car elle est liée à une autre règle. Supprimer premièrement la règle liée ou bien la relation avec cette règle. Règle liée: - update: Impossible d'éditer la règle. - account: - language_change: Impossible de modifier le langage : - template: - creation: Erreur lors de le génération des règles du modèle. N'hésitez pas à demander de l'aide sur notre forum https://github.com/Myddleware/myddleware/issues - -title: - account: - view: Mon compte - index: - panel: Tableau de bord - rule: - create_name: Création de la règle - create: Création d'une règle - edit: Edition de la règle - list: Liste des règles - view: Fiche de la règle - connector: - create: Création d'un connecteur - edit: Edition du connecteur - list: Liste des connecteurs - flux: - list: Liste des transferts - view: Fiche du transfert - task: - list: Liste des tâches - view: Fiche de la tâche - credit: - view: Achats de crédits - support: - view: Achats d'interventions - -menu: - index: Accueil - rule: - title: Règles - createv1: Création (v1) - createv2: Création - list: Liste - connector: - title: Connecteurs - create: Création - list: Liste - flux: - title: Transferts - list: Liste - job: - title: Tâches - list: Liste - support: Support - -breadcrumb: - rule_list: Liste des règles - transfert_list: Liste des transferts - task_list: Liste des tâches - connector_list: Liste des connecteurs - -menu_user: - account: Mon compte. - jobscheduler: Planificateur de tâche - management_smtp: Configuration smtp - logout: Déconnexion - -help: - title: Aide - viewrule: - info: > - Dans cette page, vous trouvez les informations générales de votre règle. Ici vous pouvez activer la synchronisation automatique de votre règle en passant le bouton d'activation à ON. - Si votre règle est activée, une tâche viendra exécuter votre règle toutes les 5 minutes. Cependant vous pouvez exécuter votre règle manuellement en cliquant sur "Exécuter la règle" même si la synchronisation automatique n'est pas activée. - Si vous souhaitez modifier plus de paramètres de votre règle, rendez-vous dans l'onglet paramètre de cette page. - mapping: > - Dans cette page vous trouvez l'ensemble des champs de vos applications source et cible utilisés dans votre règle. Vous y trouvez également les formules de transformation de données. - Si vous souhaitez de l'aide pour la réalisation de formules, rendez-vous sur notre blog à l'adresse suivante : Voir la page sur les formules. - relate: > - Ici vous trouvez l'ensemble des relations permettant de lier des données dans vos applications. Plus d'informations sur les relations à l'adresse suivante : Voir la page sur les relations - param: > - La date de référence indique quelles données vous allez lire dans votre système source. Seules les données ayant été créées ou modifiées après cette date seront lues et envoyées dans le système cible. - Donc si vous souhaitez migrer vos anciennes données, vous devez prendre une date dans le passé. Si vous souhaitez seulement transférer les nouvelles données alors laissez la date du jour. - Le nombre de jours pour la suppression des données indique le nombre de jours de stockage de vos données dans Myddleware. Même si vos données sont cryptées dans Myddleware, nous n'autorisons pas une sauvegarde de plus de 60 jours. Vous pouvez réduire ce nombre de jours, cependant sachez que nous ne pourrons pas faire de support sur des données supprimées. - rule: - fields: > - Ici vous pouvez choisir la correspondance entre les champs de vos 2 modules par un simple glisser-déposer. - Par exemple, vous pouvez choisir de mettre le nom d'un contact Sugar dans le nom d'un compte Salesforce, - pour cela il vous suffit de prendre le champ "name" de votre module source et de le mettre dans le champ "name" de votre solution cible. - Pour supprimer un champ déjà placé, il vous suffit de double-cliquer dessus. - Pour pouvez également utiliser des formules afin de transformer vos données. Si vous souhaitez de l'aide pour la réalisation de formulle, rendez-vous sur notre blog à l'adresse suivante : Voir la page sur les formules. - Pour toute information complémentaire ou pour obtenir une aide personnalisée, n'hésitez pas à nous contacter. - simulate: > - Ici vous pouvez simuler le résultat des règles que vous avez mises en oeuvre dans l'étape précédente. - En cliquant sur le bouton "Tester les données", Myddleware ira lire une donnée de votre application source pour vous indiquer comment elle serait envoyée dans votre application cible. - relate: > - Cet onglet vous permet de définir les relations que vous souhaitez mettre en oeuvre dans votre interface. Vous pouvez ainsi lier plusieurs règles ensemble. - Par exemple, il vous est possible de transférer la relation entre un contact et un compte pour qu'ils soient aussi liés dans la solution cible. - Plus d'informations sur les relations à l'adresse suivante : Voir la page sur les relations - filter: > - Cet onglet vous permet de filtrer les champs de votre application source à la lecture. - Par exemple, vous pouvez choisir de prendre tous les contacts dont le pays est égal à "France". - Plus d'informations sur les filtres à l'adresse suivante : Voir la page sur les filtres - validate: > - Dernière étape, si l'application cible de votre règle le permet, vous pouvez choisir un clé de dé-doublonnage. Pour être utilisé en dé-doublonnage, un champ doit être choisi dans l'onglet "champ" de la règle. - Par exemple, pour une application CRM, vous pouvez dé-doublonner tous les contacts par leur mail. Ainsi Myddleware ira vérifier si l'enregistrement existe déjà dans votre solution cible avant de le créer. S'il n'existe pas, Myddleware le créera sinon il ne fera que le mettre à jour. - Pour toute information complémentaire ou pour obtenir une aide personnalisée, n'hésitez pas à nous contacter. - -session: - task: - msglink: Vous venez de lancer une nouvelle tâche. Vous pouvez vous rendre sur la page de cette tâche en cliquant sur ce lien - msginfo: Si vous souhaitez suivre l'évolution de cette tâche vous pouvez rafraichir votre page jusqu'à son passsage au statut 'end'. - -twitter: - tweets: - ref: > - Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier - favoris: - ref: > - Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier - -messages: - rule: - failed_running_job: Erreur lors du lancement de la tâche. - failed_get_task_id: Impossible de récupérer l'identifiant de la tâche. - open_running_task: Vous pouvez ouvrir la tâche en cours en cliquant ici. - another_task_running: Impossible de créer la tâche car une autre tâche est en cours. Veuillez attendre la fin de son exécution ou vous pouvez l'arrêter. - failed_create_directory: Erreur lors de la création du repertoire temporaire. - template: - nb_rule: Nombre de règle générées: - help: "Nous vous recommandons de lire ce tutoriel pour vous aider à activer vos règles : http://community.myddleware.com/index.php/how-to-use-a-template/." - -email_notification: - subject: Notification Myddleware - hello: Bonjour, - introduction: Voici les statistiques concernant vos transferts de données avec la solution Myddleware: - transfer_success: - Nombre de tranferts envoyés avec succès: - transfer_error: - Nombre de tranferts en erreur: - transfer_open: - Nombre de tranferts ouverts: - active_rule: Vos règles actives dans Myddleware sont: - no_active_rule: Vous n'avez pas de règle active dans Myddleware. - 100_first_erros: Voici les 100 premières erreurs: - best_regards: Bien cordialement, - signature: L'équipe Myddleware -email_alert: - subject: Alerte Myddleware - introduction: "Une tâche en cours a dépassé la limite que vous avez autorisée :" - minute: minutes. - job_start: La tâche a commencé à - job_id: . ID ode la tâche : - recommandation: Vérifiez que la tâche est toujours en train de transférer des données. Si ce n'est pas le cas, nous vous recommandons de l'arrêter manuellement en ouvrant la tâche et en cliquant sur le bouton "Arrêter la tâche". -jobscheduler: - title: Planificateur de tâche - command: Comamande - date_created: Date création - active: Active - list: Liste - title: Jobscheduler - period: Période - job_order: Ordre job - date_modified: Date modifié - create_by : crée par - modified_by : modifié par - paramName1 : Paramètre 1 - paramValue1 : Paramètre valeur 1 - paramName2 : Paramètre 2 - paramValue2 : Paramètre valeur 2 - total : Total - actions: Action - update: Mise à jour - new: Creation - cancel: Annuler - action: - new_jobscheduler : Nouvelle commande - view: - show : Vue detaillé - description: - top : Planifiez vos tâches Myddleware en créant ou modifiant cette table. Plus d'information ici. - bottom : > - Planifiez la tâche suivante dans votre planificateur de tâche Windows ou Linux : php bin/console myddleware:jobScheduler --env=background
- Par exemple sous linux, ajouter cette ligne dans votre crontab si vous souhaitez lancer le planificateur toutes les 5 minutes :
- */5 * * * * cd ; php bin/console myddleware:jobScheduler --env=background > /dev/null 2>&1 -management_smtp: - submit : Enregistrer configuration SMTP - cancel: Annuler - title : Configuration SMTP - description : "Vous pouvez configurez l'envoi des email ici. Vous trouverez de la documentation ici : https://symfony.com/doc/2.8/reference/configuration/swiftmailer.html" - sendtestmail: Envoi test - -management_smtp_sendmail: - subject: Myddleware - Test de configuration email - textMail: Ce message de test a été envoyé par Myddleware. +# /********************************************************************************* + # * This file is part of Myddleware. + + # * @package Myddleware + # * @copyright Copyright (C) 2013 - 2015 Stéphane Faure - CRMconsult EURL + # * @copyright Copyright (C) 2015 - 2016 Stéphane Faure - Myddleware ltd - contact@myddleware.com + # * @link http://www.myddleware.com + + # This file is part of Myddleware. + + # Myddleware is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + + # Myddleware is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with Myddleware. If not, see . +# *********************************************************************************/ + +panel: + solutions: + title: Connectez dès à présent ces différentes solutions + click: Cliquez pour savoir comment créer ce connecteur. + graph_tranfer_rule: + desc: Tranferts envoyés par règle + graph_error: + title: Nombre de transferts par statut + list_error: + nb: Nombre d'erreurs par règle + list_job: + title: Détail des derniers jobs + duration: seconde(s) + nb : Transferts de données en erreur + graph_histo: + title: Historique des transferts + graph_job_histo: + title: Historique des jobs +create_rule: + tabs: + one: Connexion + two: Choix des modules + three: Champs + four: Simulation + five: Relations + six: Filtres + seven: Validation + step1: + list_empty: Aucune solution + list_selected: Choix + valid: Valider les connexions + name: Nom de votre règle + choose_connector: Choisissez votre connecteur + choose_module: Choisissez votre module + btn_mapping: Passer au mapping des champs + btn_confirm: Confirmer cette règle + connector: Votre connecteur a bien été créé + step2: + title: Choix des modules + choice_module: Veuillez choisir un module + valid: Envoyer + step3: + filter: Filtre + filter_choice: n’a pas de filtre + filter_fields: Rechercher un champ... + empty_fields_target: Aucun champ trouvé dans cible + empty_simulate: Attention il n'existe pas de donnée dans le serveur source ou de champs dans la solution cible + empty_field_simulate: Contenu vide + data: Tester les données + infobulle: Double clic pour effacer + previous: Etape précédente + next: Etape suivante + syncdata: + label: Type de synchronisation + create_modify: Création et modification de données + create_only: Création de données seulement + search_only: Récupération de données existantes seulement + data_wait: Chargement en cours... Merci de patienter + title: Champs + placeholder: Veuillez faire glisser vos champs ici + info_fields: Liste des valeurs possibles + addfield: + custom: Ajouter un champ personnalisé + alert: + fields: Il existe des champs obligatoires qui sont actuellement vides. Il vous est possible de renseigner plusieurs champs source vers un champ cible. + fields_title: Champs obligatoires + formula: + fields: Champs + function: Fonctions + create: Créer une formule + compose: Composer votre formule + confirm: Confirmer + delete: Effacer + close: Fermer + error: Votre règle comporte une ou plusieurs erreurs de syntaxe + confirm: + success: Enregistrement avec succès + error: Une erreur est survenue + valid: Valider + relation: + empty: Aucune relation + select: Aucune règle + source: Source + target: Cible + rule: Règles + fields: Champs source + parent_detail_view: Parent + parent: "Relation parent : fusion de plusieurs transferts de données" + record_id: ID enregistrement + yes: Oui + params: + duplicate: Champs pour éviter les doublons + sync: Synchronisation bidirectionnelle + save_wait: Veuillez patienter... + +filter: + content: contient + notcontent: ne contient pas + begin: commence par + end: se termine par + gt: est supérieur à + lt: est inférieur à + equal: est égale à + different: est différent de + gteq: est supérieur ou égal à + lteq: est inférieur ou égal à + in: est compris dans le tableau suivant séparé par des points virgules + notin: n’est pas compris dans le tableau suivant séparé par des points virgules + +view_rule: + action: + exec_all: Exéc. les règles actives + confirm_exec_all: Souhaitez-vous exécuter toutes les règles actives ? + exec_error: Relancer les erreurs + confirm_exec_error: Souhaitez-vous relancer tous les transferts en erreur ? + exec_rule: Exécuter la règle + edit_rule: Editer la règle + confirm_edit_rule: Souhaitez-vous modifier cette règle ? + delete_rule: Supprimer la règle + confirm_delete_rule: Souhaitez-vous supprimer cette règle ? + displayflux: Voir les transferts + new_rule: Créer une règle + tabs: + info: Informations + mapping: Mapping des champs + relation: Relations + params: Paramètres + filter: Filtres + title: + rule: Règle + connector: Connecteurs + source: Source + target: Cible + infos: + active: Activation de la synchronisation automatique + id: Identifiant + name: Nom + version: Version + datecreated: Date de création + datemodified: Date de modification + mode: Mode + bidirectional: Bidirectionnelle + duplicate_fields: Champs de dédoublonnage + connector: + title: Connecteur + solution: Solution + module: Module + mapping: + empty: Aucun champ + formula_empty: Aucune formule + formula: Formule + module_target: Module Cible + module_source: Module Source + relate: + empty: Aucune relation + solution_source: Source + solution_target: Cible + rule : Règles + filters: + empty: Aucun filtre + + params: + save: Sauvegarder + simule: Simuler Transferts + result: Nombre de transferts estimé + details: Représente le nombre de tansferts qui vont être créés lors du prochain envoi de cette règle. Ce numbre ne peut pas être plus grand que le paramètre limit de votre règle que vous avez paramétrez (défaut 100) et que la limite de l'API de votre application source. + +rule: + source: Source + target: Cible + open: Ouvrir + workon: Vous travaillez sur la règle + yoursource: Votre solution source + yourtarget: Votre solution cible + help: Que dois-je faire ? + +list_rule: + title: Liste des règles + total: Nombre de règles + empty: Vous n'avez pas encore de règle ! + delete: Etes-vous sûr de vouloir supprimer cette règle ? + create_first_rule: Vous pouvez créer votre première règle + th: + name: Nom + version: Version + active: Activation + date_created: Date de création + option: Options + btn: + delete: Supprimer + edit: Editer + view: Voir la fiche + +animate: + rulename: Nom de votre règle + wait: Veuillez patienter... + solution: + source: source + target: cible + carousel: + next: Suivant + previous: Précèdent + choice: + module: Choix des modules + template: Choix des modèles prédéfinis + name: Nom + description: Description + empty: "Pas de modèle établit pour ces solutions, si vous en désirez un, contactez-nous via contact@myddleware.com" + tutoriel: + link: "http://community.myddleware.com/index.php/tutorial/#rules" + textlink: "Besoin d'aide ? Lisez notre tutoriel." + +create_connector: + title: Création d'un connecteur + save: Enregistrer la connexion + connexion: Nom de la connexion + test: Tester + valid: Cliquez-ici pour créer un autre connecteur + help: "Besoin d'aide ?" + source: Source + target: Cible + upload_placeholder: Sélectionner votre fichier + upload_btn: Transférer + upload_error: Le fichier n'a pas pu être enregistré sur le serveur + upload_error_ext: L'extension n'est pas autorisée + upload_success: Le fichier a bien été transféré + upload_delete: Suppression du fichier + params_error: Une erreur s'est produite lors de l'enregistrement des paramêtres + +list_connector: + empty: Vous n'avez pas encore de connecteur ! + delete: "Désirez-vous supprimer ce connecteur ?" + total: Nombre de connecteurs + create_first_connector: Vous pouvez créer votre premier connecteur + th: + name: Nom + date_created: Date de création + option: Options + btn: + delete: Supprimer + edit: Editer + view: Voir la fiche + +view_connector: + btn: + save: Sauvegarder + delete: Supprimer + confirm_delete: Confirmez-vous la suppression de ce connecteur ? + info: + title: Paramètres de connexion + solution: solution + tabs: + info: Informations + help: Aide + link_help: Cliquez-ici pour avoir plus d'informations sur ce connecteur + help: + link: http://community.myddleware.com/index.php/ + +list_flux: + start: Début + end: Fin + total: Nombre de transferts + empty: Aucun transfert trouvé + btn: + filter: Filtrer + filter_delete: Supprimer les filtres de recherche + cancel: Annuler les transferts + mass_cancel_confirm: Annuler les transferts sélectionnés ? + reload: Relancer les transferts + mass_reload_confirm: Relancer les transferts selectionnés ? + filter: + delete_confirm: Êtes-vous sûre de vouloir effacer les filtres de recherche ? + date_created: Date de création + date_modified: Date de modification + rule: Règle + status: Statut + global_status: Statut global / Type + id: Identifiant + source_id: Id source + target_id: Id cible + confirm: Filtrer + name: Nom + content: Contenu du transfer + source_content: Source + target_content: Target + tab: + id: Doc Id + name: Nom + version: Version + source_id: Id source + target_id: Id cible + date_created: Date de création + date_modified: Date de modification + statut: Status + source_date_modified: Date de référence + type: Type + source_field: Champ lié + reference: Référence + +flux: + gbl_status: + open: Ouvert + close: Fermé + cancel: Annulé + error: Erreur + status: + new: Nouveau + predecessor_ok: Prédécesseur OK + relate_ok : Relation OK + transformed: Transformé + ready_to_send: Prêt à être envoyé + filter_ok: Filtre OK + send: Envoyé + found: Trouvé + filter: Filtre annulé + no_send: Non envoyé + cancel: Envoi annulé + filter_ko: Filtre en erreur + create_ko: Création en erreur + predecessor_ko: Prédécesseur en erreur + relate_ko: Relation en erreur + error_transformed: Transformation en erreur + error_checking: Vérification en erreur + error_sending: Envoi en erreur + Not_found: Non trouvée + type: + update: Update + create: Create + search: Search + +view_flux: + empty: Pas de données + empty_log: Aucune log + target: Cible + source: Source + history: Historique + id: Identifiant + nblogs: Nombre de logs + nbChildDocuments: Tranferts fils + nbParentDocuments: Tranferts parents + nbHistoryDocuments: Historique des transferts + nbPostDocuments: Tranferts post + btn: + reload: Relancer le transfert + cancel: Annuler le transfert + readrecord: Lancer la même donnée + header: + rule: Règle + statut: Status + mode: Mode + type: Type + attempt: Tentative + gblstatut: Global Status + version: Version + parent: Parent + dateref: Référence + date_created: Date de création + date_modified: Date de modification + log: + id: Id + ref: Référence + job: Job + date_created: Date de création + type: Type + msg: Message + +list_task: + total: Total de tâches + empty: Aucune tâche + th: + id: Identifiant + status: Statut + param: Paramètre + begin: Date de début + end: Date de fin + message: Message + close: Fermé + open: Ouvert + cancel: Annulé + manual: Manuelle + error: Erreur + +view_task: + empty_log: Aucune log + task_stop: ARRET DE LA TACHE + refresh: RAFRAICHIR + nblogs: Nombre de logs + header: + id: Identifiant + status: Statut + begin: Date de début + end: Date de fin + message: Message + log: + id: Id + ref: Référence + transfer: Transfert + date_created: Date de création + type: Type + msg: Message + +view_account: + title: Mon compte + user_info: Mes informations + change_password : Changer mot de passe + profile_edit: Edition profile + support: + enabled: Support activé + disabled: Support désactivé + label: + language: Langue + popup: + locale: Changement de la langue en cours, merci de bien vouloir patienter. Vous allez être rediriger vers la page d'authentification. + +function: + all: Toutes + category: + mathematical: Maths + text: Texte + date: Date et heure + description: + text: + trim: Supprime les espaces (ou d'autres caractères) en début et fin de chaîne + lower: Met tous les caractères en minuscules + upper: Met tous les caractères en majuscules + changeValue: changeValue($var, $arrayKeyToValue) / Remplace la valeur de $var par la valeur correspondante du tableau $arrayKeyToValue. Exemple changeValue( {FIELD},"('A':'1','B':'2')") + substr: substr ( string $string , int $start [, int $length ] ) / Retourne un segment de chaîne. + striptags: striptags( string $str [, string $allowable_tags ] ) / Supprime les balises HTML et PHP d'une chaîne + htmlEntityDecode: htmlEntityDecode ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") ]] )/ Convertit toutes les entités HTML en caractères normaux + replace: replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] ) / Remplace toutes les occurrences dans une chaîne + utf8encode: utf8encode ( string $data ) / Convertit une chaîne ISO-8859-1 en UTF-8 + utf8decode: utf8decode ( string $data ) / Convertit une chaîne UTF-8 en ISO-8859-1 + htmlentities: htmlentities ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convertit tous les caractères éligibles en entités HTML + htmlspecialchars: htmlspecialchars ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") [, bool $double_encode = true ]]] ) / Convertit les caractères spéciaux en entités HTML + chr: chr ( int $bytevalue ) Générer une chaîne d'un octet à partir d'un nombre + mathematical: + round: Arrondit un nombre à virgule flottante + ceil: Arrondit au nombre supérieur + abs: Valeur absolue + date: + date: Formate une date/heure locale + microtime: Retourne le timestamp UNIX actuel avec les microsecondes + changeTimeZone: changeTimeZone($dateToChange, $oldTimeZone, $newTimeZone) / Change le timezone de la date passée en premier paramètre + changeFormatDate: changeFormatDate($dateToChange, $oldFormat, $newFormat) / Convertit la date passée en premier paramètre dans le format passé en deuxième paramètre + +solution: + fields: + login: Utilisateur + password: Mot de passe + url: Url + token: Jeton + tokensecret: Secret jeton + consumerkey: Clé consommateur + consumersecret: Secret consommateur + apikey: Clé api + apiuser: Utilisateur api + apikeysecret: Clé api secret + mail_gotomeeting: Mail GotoMeeting + accountid: Identifiant de compte + clientid: Client ID + clientsecret: Client secret + instance: Numéro d'instance (Entrez 0 si vous n'en avez pas) + company: Company ID + user: User ID + sandbox: Sandbox (1 si oui, 0 sinon) + wsdl: Fichier wsdl + file: Fichier + host: Serveur Host + dbname: Nom de la base de données + database_name: Nom de la base de données + dbdriver: Driver (pilote) de la base de données + dbport: Port d'accès à la base de données + port: Port d'accès à la base de données + ftpport: Port (défaut 22) + directory: Répertoire avec les fichiers + shop: Magasin + redirect_uri: URL de redirection + applicationName: Nom de l'application + hashkey: Clé de hachage + authid: Id auth + params: + dateref: Référence (Les données seront lues à partir de ce paramètre) + limit: Limite (Nombre de données lues maximum par appel) + active: Activation + delete: Suppression de données (délais de suppression des données des documents dans Myddleware) + activate: Activé + desactivate: Désactivé + 1_minute: 1 minute + 5_minute: 5 minutes + 15_minute: 15 minutes + 30_minute: 30 minutes + 1_hour: 1 heure + 2_hour: 2 heures + 12_hour: 12 heures + 0_day: Inférieure à 1 jour + 1_day: 1 jour + 7_day: 7 jours + 14_day: 14 jours + 30_day: 30 jours + 60_day: 60 jours + +error: + connexion: Connexion impossible + general: Erreur inattendue + rule: + valid: Règle non valide + order: Veuillez suivre l'ordre des étapes + mapping: Une erreur inattendue s'est produite au mapping des champs + source_module: Erreur de chargement du module source + source_module_all: Erreur du module source + source_module_connect: Erreur de connexion du module source + source_module_load_list: Erreur de chargement du module source + target_module: Erreur de chargement du module cible + target_module_connect: Erreur de connexion du module cible + target_module_all: Erreur du module cible + target_module_load_list: Erreur de chargement des modules cible + edit_document_error_open: Impossible d'éditer la règle car au moins un transfert est ouvert ou en erreur sur cette règle. Veuillez annuler ou relancer ces transferts pour pouvoir éditer cette règle. + edit_document_error_open_admin: Au moins un transfert est ouvert ou en erreur sur cette règle. Il est recommandé de traiter ces transferts avant d'éditer la règle. + edit_rule_deleted: Impossible d'éditer la règle car elle est supprimée. + delete_document: Impossible de supprimer la règle car au moins un transfert de données existe sur cette règle. Veuillez supprimer ces transferts pour pouvoir supprimer cette règle. + delete_relationship_exists: Impossible de supprimer la règle car elle est liée à une autre règle. Supprimer premièrement la règle liée ou bien la relation avec cette règle. Règle liée: + update: Impossible d'éditer la règle. + account: + language_change: Impossible de modifier le langage : + template: + creation: Erreur lors de le génération des règles du modèle. N'hésitez pas à demander de l'aide sur notre forum https://github.com/Myddleware/myddleware/issues + connector: + remove_with_rule: Impossible de supprimer le connecteur car il est utilisé dans une règle. Supprimez premièrement la règle + document: + deleted_flag: Ce flux de données est indiqué comme supprimé. Il n'est donc pas pris en compte dans tous les calculs de relation fait par Myddleware. + +title: + account: + view: Mon compte + index: + panel: Tableau de bord + rule: + create_name: Création de la règle + create: Création d'une règle + edit: Edition de la règle + list: Liste des règles + view: Fiche de la règle + connector: + create: Création d'un connecteur + edit: Edition du connecteur + list: Liste des connecteurs + flux: + list: Liste des transferts + view: Fiche du transfert + task: + list: Liste des tâches + view: Fiche de la tâche + credit: + view: Achats de crédits + support: + view: Achats d'interventions + +menu: + index: Accueil + rule: + title: Règles + createv1: Création (v1) + createv2: Création + list: Liste + connector: + title: Connecteurs + create: Création + list: Liste + flux: + title: Transferts + list: Liste + job: + title: Tâches + list: Liste + support: Support + +breadcrumb: + rule_list: Liste des règles + transfert_list: Liste des transferts + task_list: Liste des tâches + connector_list: Liste des connecteurs + +menu_user: + account: Mon compte. + jobscheduler: Planificateur de tâche + management_smtp: Configuration smtp + logout: Déconnexion + +help: + title: Aide + viewrule: + info: > + Dans cette page, vous trouvez les informations générales de votre règle. Ici vous pouvez activer la synchronisation automatique de votre règle en passant le bouton d'activation à ON. + Si votre règle est activée, une tâche viendra exécuter votre règle toutes les 5 minutes. Cependant vous pouvez exécuter votre règle manuellement en cliquant sur "Exécuter la règle" même si la synchronisation automatique n'est pas activée. + Si vous souhaitez modifier plus de paramètres de votre règle, rendez-vous dans l'onglet paramètre de cette page. + mapping: > + Dans cette page vous trouvez l'ensemble des champs de vos applications source et cible utilisés dans votre règle. Vous y trouvez également les formules de transformation de données. + Si vous souhaitez de l'aide pour la réalisation de formules, rendez-vous sur notre blog à l'adresse suivante : Voir la page sur les formules. + relate: > + Ici vous trouvez l'ensemble des relations permettant de lier des données dans vos applications. Plus d'informations sur les relations à l'adresse suivante : Voir la page sur les relations + param: > + La date de référence indique quelles données vous allez lire dans votre système source. Seules les données ayant été créées ou modifiées après cette date seront lues et envoyées dans le système cible. + Donc si vous souhaitez migrer vos anciennes données, vous devez prendre une date dans le passé. Si vous souhaitez seulement transférer les nouvelles données alors laissez la date du jour. + Le nombre de jours pour la suppression des données indique le nombre de jours de stockage de vos données dans Myddleware. Même si vos données sont cryptées dans Myddleware, nous n'autorisons pas une sauvegarde de plus de 60 jours. Vous pouvez réduire ce nombre de jours, cependant sachez que nous ne pourrons pas faire de support sur des données supprimées. + rule: + fields: > + Ici vous pouvez choisir la correspondance entre les champs de vos 2 modules par un simple glisser-déposer. + Par exemple, vous pouvez choisir de mettre le nom d'un contact Sugar dans le nom d'un compte Salesforce, + pour cela il vous suffit de prendre le champ "name" de votre module source et de le mettre dans le champ "name" de votre solution cible. + Pour supprimer un champ déjà placé, il vous suffit de double-cliquer dessus. + Pour pouvez également utiliser des formules afin de transformer vos données. Si vous souhaitez de l'aide pour la réalisation de formulle, rendez-vous sur notre blog à l'adresse suivante : Voir la page sur les formules. + Pour toute information complémentaire ou pour obtenir une aide personnalisée, n'hésitez pas à nous contacter. + simulate: > + Ici vous pouvez simuler le résultat des règles que vous avez mises en oeuvre dans l'étape précédente. + En cliquant sur le bouton "Tester les données", Myddleware ira lire une donnée de votre application source pour vous indiquer comment elle serait envoyée dans votre application cible. + relate: > + Cet onglet vous permet de définir les relations que vous souhaitez mettre en oeuvre dans votre interface. Vous pouvez ainsi lier plusieurs règles ensemble. + Par exemple, il vous est possible de transférer la relation entre un contact et un compte pour qu'ils soient aussi liés dans la solution cible. + Plus d'informations sur les relations à l'adresse suivante : Voir la page sur les relations + filter: > + Cet onglet vous permet de filtrer les champs de votre application source à la lecture. + Par exemple, vous pouvez choisir de prendre tous les contacts dont le pays est égal à "France". + Plus d'informations sur les filtres à l'adresse suivante : Voir la page sur les filtres + validate: > + Dernière étape, si l'application cible de votre règle le permet, vous pouvez choisir un clé de dé-doublonnage. Pour être utilisé en dé-doublonnage, un champ doit être choisi dans l'onglet "champ" de la règle. + Par exemple, pour une application CRM, vous pouvez dé-doublonner tous les contacts par leur mail. Ainsi Myddleware ira vérifier si l'enregistrement existe déjà dans votre solution cible avant de le créer. S'il n'existe pas, Myddleware le créera sinon il ne fera que le mettre à jour. + Pour toute information complémentaire ou pour obtenir une aide personnalisée, n'hésitez pas à nous contacter. + +session: + task: + msglink: Vous venez de lancer une nouvelle tâche. Vous pouvez vous rendre sur la page de cette tâche en cliquant sur ce lien + msginfo: Si vous souhaitez suivre l'évolution de cette tâche vous pouvez rafraichir votre page jusqu'à son passsage au statut 'end'. + +twitter: + tweets: + ref: > + Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier + favoris: + ref: > + Entrez ALL pour tous les Tweets, vide pour les 200 derniers et un id de Tweet pour tous les tweets plus récents que ce dernier + +messages: + rule: + failed_running_job: Erreur lors du lancement de la tâche. + failed_get_task_id: Impossible de récupérer l'identifiant de la tâche. + open_running_task: Vous pouvez ouvrir la tâche en cours en cliquant ici. + another_task_running: Impossible de créer la tâche car une autre tâche est en cours. Veuillez attendre la fin de son exécution ou vous pouvez l'arrêter. + failed_create_directory: Erreur lors de la création du repertoire temporaire. + template: + nb_rule: Nombre de règle générées: + help: "Nous vous recommandons de lire ce tutoriel pour vous aider à activer vos règles : http://community.myddleware.com/index.php/how-to-use-a-template/." + +email_notification: + subject: Notification Myddleware + hello: Bonjour, + introduction: Voici les statistiques concernant vos transferts de données avec la solution Myddleware: + transfer_success: - Nombre de tranferts envoyés avec succès: + transfer_error: - Nombre de tranferts en erreur: + transfer_open: - Nombre de tranferts ouverts: + active_rule: Vos règles actives dans Myddleware sont: + no_active_rule: Vous n'avez pas de règle active dans Myddleware. + 100_first_erros: Voici les 100 premières erreurs: + best_regards: Bien cordialement, + signature: L'équipe Myddleware +email_alert: + subject: Alerte Myddleware + introduction: "Une tâche en cours a dépassé la limite que vous avez autorisée :" + minute: minutes. + job_start: La tâche a commencé à + job_id: . ID ode la tâche : + recommandation: Vérifiez que la tâche est toujours en train de transférer des données. Si ce n'est pas le cas, nous vous recommandons de l'arrêter manuellement en ouvrant la tâche et en cliquant sur le bouton "Arrêter la tâche". +jobscheduler: + title: Planificateur de tâche + command: Comamande + date_created: Date création + active: Active + list: Liste + title: Jobscheduler + period: Période + job_order: Ordre job + date_modified: Date modifié + create_by : crée par + modified_by : modifié par + paramName1 : Paramètre 1 + paramValue1 : Paramètre valeur 1 + paramName2 : Paramètre 2 + paramValue2 : Paramètre valeur 2 + total : Total + actions: Action + update: Mise à jour + new: Creation + cancel: Annuler + action: + new_jobscheduler : Nouvelle commande + view: + show : Vue detaillé + description: + top : Planifiez vos tâches Myddleware en créant ou modifiant cette table. Plus d'information ici. + bottom : > + Planifiez la tâche suivante dans votre planificateur de tâche Windows ou Linux : php bin/console myddleware:jobScheduler --env=background
+ Par exemple sous linux, ajouter cette ligne dans votre crontab si vous souhaitez lancer le planificateur toutes les 5 minutes :
+ */5 * * * * cd ; php bin/console myddleware:jobScheduler --env=background > /dev/null 2>&1 +management_smtp: + submit : Enregistrer configuration SMTP + cancel: Annuler + title : Configuration SMTP + description : "Vous pouvez configurez l'envoi des email ici. Vous trouverez de la documentation ici : https://symfony.com/doc/2.8/reference/configuration/swiftmailer.html" + sendtestmail: Envoi test + +management_smtp_sendmail: + subject: Myddleware - Test de configuration email + textMail: Ce message de test a été envoyé par Myddleware. diff --git a/src/Myddleware/RegleBundle/Resources/views/Ajax/result_liste_inputs.html.twig b/src/Myddleware/RegleBundle/Resources/views/Ajax/result_liste_inputs.html.twig index 1252a1e55..ca7a8346e 100644 --- a/src/Myddleware/RegleBundle/Resources/views/Ajax/result_liste_inputs.html.twig +++ b/src/Myddleware/RegleBundle/Resources/views/Ajax/result_liste_inputs.html.twig @@ -46,7 +46,7 @@ along with Myddleware. If not, see .
{{ form_label(field.value) }}
{{ form_widget(field.name) }} - {% if field.vars.value.name !='wsdl' %} + {% if field.vars.value.name !='wsdl' and field.vars.value.name !='file' %} {{ form_widget(field.value) }} {% else %} diff --git a/src/Myddleware/RegleBundle/Resources/views/Connector/edit/onglets/infos.html.twig b/src/Myddleware/RegleBundle/Resources/views/Connector/edit/onglets/infos.html.twig index dd2261c9d..ea6bd39f6 100644 --- a/src/Myddleware/RegleBundle/Resources/views/Connector/edit/onglets/infos.html.twig +++ b/src/Myddleware/RegleBundle/Resources/views/Connector/edit/onglets/infos.html.twig @@ -56,7 +56,7 @@ {{ form_label(field.value) }} - {% if field.vars.value.name !='wsdl' %} + {% if field.vars.value.name !='wsdl' and field.vars.value.name !='file' %} {{ form_widget(field.value) }} {% else %} diff --git a/src/Myddleware/RegleBundle/Resources/views/Flux/list.html.twig b/src/Myddleware/RegleBundle/Resources/views/Flux/list.html.twig index e51118302..f1bd8911d 100644 --- a/src/Myddleware/RegleBundle/Resources/views/Flux/list.html.twig +++ b/src/Myddleware/RegleBundle/Resources/views/Flux/list.html.twig @@ -56,12 +56,12 @@ {{ form_widget(form.date_create_end) }} #} -
{{'list_flux.filter.content'|trans}} - {{ form_label(form.source_content, 'list_flux.filter.source_content'|trans) }} - {{ form_widget(form.source_content) }} - {{ form_label(form.target_content, 'list_flux.filter.target_content'|trans) }} - {{ form_widget(form.target_content) }} -
+
{{'list_flux.filter.id'|trans}} + {{ form_label(form.source_id, 'list_flux.filter.source_id'|trans) }} + {{ form_widget(form.source_id) }} + {{ form_label(form.target_id, 'list_flux.filter.target_id'|trans) }} + {{ form_widget(form.target_id) }} +
{{'list_flux.filter.date_modified'|trans}} {{ form_label(form.date_modif_start, 'list_flux.start'|trans) }} @@ -73,16 +73,16 @@
{{'list_flux.filter.status'|trans}} {{ form_label(form.status, 'list_flux.filter.status'|trans) }} {{ form_widget(form.status) }} - {{ form_label(form.gblstatus, 'list_flux.filter.global_status'|trans) }} - {{ form_widget(form.gblstatus) }} + {{ form_label(form.gblstatus, 'list_flux.filter.global_status'|trans) }} + {{ form_widget(form.gblstatus) }} {{ form_widget(form.type) }}
-
{{'list_flux.filter.id'|trans}} - {{ form_label(form.source_id, 'list_flux.filter.source_id'|trans) }} - {{ form_widget(form.source_id) }} - {{ form_label(form.target_id, 'list_flux.filter.target_id'|trans) }} - {{ form_widget(form.target_id) }} -
+
{{'list_flux.filter.content'|trans}} + {{ form_label(form.source_content, 'list_flux.filter.source_content'|trans) }} + {{ form_widget(form.source_content) }} + {{ form_label(form.target_content, 'list_flux.filter.target_content'|trans) }} + {{ form_widget(form.target_content) }} +
@@ -115,7 +115,7 @@ {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.target_id'|trans}} - {{'list_flux.tab.date_created'|trans}} + {{'list_flux.tab.reference'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.statut'|trans}} {{'list_flux.tab.type'|trans}} @@ -133,7 +133,7 @@
{{ flux.rule_name }} {{ flux.source_id }} {{ flux.target_id }} - {{ flux.date_created|date("d/m/Y H:i:s") }} + {{ flux.source_date_modified }} {{ flux.date_modified|date("d/m/Y H:i:s") }}
{{ flux.status }} @@ -157,7 +157,7 @@ {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.target_id'|trans}} - {{'list_flux.tab.date_created'|trans}} + {{'list_flux.tab.reference'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.statut'|trans}} {{'list_flux.tab.type'|trans}} diff --git a/src/Myddleware/RegleBundle/Resources/views/Flux/view/view.html.twig b/src/Myddleware/RegleBundle/Resources/views/Flux/view/view.html.twig index 6944011a1..79c7341d7 100644 --- a/src/Myddleware/RegleBundle/Resources/views/Flux/view/view.html.twig +++ b/src/Myddleware/RegleBundle/Resources/views/Flux/view/view.html.twig @@ -61,7 +61,7 @@ {{'view_flux.btn.cancel'|trans}} - + {# BTN #} {% endif %} @@ -80,6 +80,9 @@ {{'view_flux.header.type'|trans}} {{'view_flux.header.attempt'|trans}} {{'view_flux.header.gblstatut'|trans}} + {{'view_flux.header.dateref'|trans}} + {{'view_flux.header.date_created'|trans}} + {{'view_flux.header.date_modified'|trans}} {% if doc.getParentId %} {{'view_flux.header.parent'|trans}} {% endif %} @@ -110,6 +113,9 @@ {% endif %}
+ {{ doc.getSourceDateModified|date("d/m/Y H:i:s") }} + {{ doc.getDateCreated|date("d/m/Y H:i:s") }} + {{ doc.getDateModified|date("d/m/Y H:i:s") }} {% if doc.getParentId %} {{ doc.getParentId }} {% endif %} diff --git a/src/Myddleware/RegleBundle/Service/SessionService.php b/src/Myddleware/RegleBundle/Service/SessionService.php index c76b6732e..9d8636f1b 100644 --- a/src/Myddleware/RegleBundle/Service/SessionService.php +++ b/src/Myddleware/RegleBundle/Service/SessionService.php @@ -934,6 +934,22 @@ public function getFluxFilterStatus() $myddlewareSession = $this->getMyddlewareSession(); return $myddlewareSession['flux_filter']['c']['status']; } + + public function setFluxFilterType($type) + { + $myddlewareSession = $this->getMyddlewareSession(); + $myddlewareSession['flux_filter']['c']['type'] = $type; + + $this->_session->set(self::MYDDLEWARE_SESSION_INDEX,$myddlewareSession); + } + + public function getFluxFilterType() + { + $myddlewareSession = $this->getMyddlewareSession(); + return $myddlewareSession['flux_filter']['c']['type']; + } + + public function setFluxFilterSourceId($sourceId) { @@ -1131,6 +1147,14 @@ public function removeFluxFilterTargetId() $this->_session->set(self::MYDDLEWARE_SESSION_INDEX,$myddlewareSession); } + public function removeFluxFilterType() + { + $myddlewareSession = $this->getMyddlewareSession(); + unset($myddlewareSession['flux_filter']['c']['type']); + + $this->_session->set(self::MYDDLEWARE_SESSION_INDEX,$myddlewareSession); + } + public function removeFluxFilterSourceId() { $myddlewareSession = $this->getMyddlewareSession(); @@ -1172,6 +1196,12 @@ public function isFluxFilterCStatusExist() $myddlewareSession = $this->getMyddlewareSession(); return isset($myddlewareSession['flux_filter']['c']['status']); } + + public function isFluxFilterTypeExist() + { + $myddlewareSession = $this->getMyddlewareSession(); + return isset($myddlewareSession['flux_filter']['c']['type']); + } public function isFluxFilterCRuleExist() { diff --git a/src/Myddleware/RegleBundle/Solutions/cirrusshield.php b/src/Myddleware/RegleBundle/Solutions/cirrusshield.php index 2707fc8fc..6060afc74 100644 --- a/src/Myddleware/RegleBundle/Solutions/cirrusshield.php +++ b/src/Myddleware/RegleBundle/Solutions/cirrusshield.php @@ -34,7 +34,7 @@ class cirrusshieldcore extends solution { protected $token; protected $update; protected $organizationTimezoneOffset; - protected $limitCall = 100; + protected $limitCall = 1; protected $required_fields = array('default' => array('Id','CreationDate','ModificationDate')); @@ -385,8 +385,12 @@ public function create($param) { // Check control before create $data = $this->checkDataBeforeCreate($param, $data); $xmlData .= '<'.$param['module'].'>'; - // Save the idoc to manage result - $xmlData .= ''.$idDoc.''; + + // Save the idoc to manage result in case of mass upsert + if ($this->limitCall > 1) { + $xmlData .= ''.$idDoc.''; + } + foreach ($data as $key => $value) { // Field only used for the update and contains the ID of the record in the target solution if ($key=='target_id') { @@ -434,35 +438,39 @@ public function create($param) { } // Manage results - if (!empty($resultCall[$param['module']])) { + if (!empty($resultCall[$param['module']])) { foreach ($resultCall[$param['module']] as $record) { // General error if (!empty($record['Message'])) { throw new \Exception($record['Message']); + } + // We use orderId as id document only when we execute to mass upsert. In this case this field orderid has to be created in Cirrus + if (!empty($record['orderid'])) { + $idDoc = $record['orderid']; } - + // Error managment for the record creation if (!empty($record['Success'])) { if ($record['Success'] == 'False') { - $result[$record['orderid']] = array( + $result[$idDoc] = array( 'id' => '-1', 'error' => $record['ErrorMessage'] ); } else { - $result[$record['orderid']] = array( + $result[$idDoc] = array( 'id' => $record['GUID'], 'error' => false ); } } else { - $result[$record['orderid']] = array( + $result[$idDoc] = array( 'id' => '-1', 'error' => 'No success flag returned by Cirrus Shield' ); } // Transfert status update - $this->updateDocumentStatus($record['orderid'],$result[$record['orderid']],$param); + $this->updateDocumentStatus($idDoc,$result[$idDoc],$param); } } } @@ -471,7 +479,7 @@ public function create($param) { catch (\Exception $e) { $error = $e->getMessage().' '.$e->getFile().' '.$e->getLine(); $result['error'] = $error; - } + } return $result; } diff --git a/src/Myddleware/RegleBundle/Solutions/erpnext.php b/src/Myddleware/RegleBundle/Solutions/erpnext.php index 10c0c2771..5500b5f94 100644 --- a/src/Myddleware/RegleBundle/Solutions/erpnext.php +++ b/src/Myddleware/RegleBundle/Solutions/erpnext.php @@ -46,10 +46,15 @@ class erpnextcore extends solution ); // Module list that allows to make parent relationships - protected $allowParentRelationship = array('Sales Invoice', 'Sales Order', 'Payment Entry', 'Item Attribute', 'Item'); + protected $allowParentRelationship = array('Sales Invoice', 'Sales Order', 'Payment Entry', 'Item Attribute', 'Item', 'Payment'); - protected $childModuleKey = array('Sales Invoice Item' => 'items', 'Sales Order Item' => 'items', 'Payment Entry Reference' => 'references', 'Item Attribute Value' => 'item_attribute_values', - 'Item Variant Attribute' => 'attributes'); + protected $childModuleKey = array( 'Sales Invoice Item' => 'items', + 'Sales Order Item' => 'items', + 'Payment Entry Reference' => 'references', + 'Item Attribute Value' => 'item_attribute_values', + 'Item Variant Attribute' => 'attributes', + 'Sales Invoice Payment' => 'payments' + ); // Get isTable parameter for each module protected $isTableModule = array(); @@ -127,11 +132,11 @@ public function get_module_fields($module, $type = 'source') { $modules = $this->get_modules(); // Get the list field for a module - $url = $this->paramConnexion['url'] . '/api/method/frappe.client.get_list?doctype=DocField&parent=' . rawurlencode($module) . '&fields=*&filters={%22parent%22:%22' . rawurlencode($module) . '%22}&limit_page_length=500'; + $url = $this->paramConnexion['url'] . '/api/method/frappe.desk.form.load.getdoctype?doctype='.$module; $recordList = $this->call($url, 'GET', ''); - // Format outpput data - if (!empty($recordList->message)) { - foreach ($recordList->message as $field) { + // Format outpput data + if (!empty($recordList->docs[0]->fields)) { + foreach ($recordList->docs[0]->fields as $field) { if (empty($field->label)) { continue; } @@ -219,11 +224,10 @@ public function get_module_fields($module, $type = 'source') { // Add relate field in the field mapping if (!empty($this->fieldsRelate)) { $this->moduleFields = array_merge($this->moduleFields, $this->fieldsRelate); - } - + } return $this->moduleFields; - } catch (\Exception $e) { - $this->logger->error($e->getMessage().' '.$e->getFile().' '.$e->getLine()); + } catch (\Exception $e) { + $this->logger->error($e->getMessage().' '.$e->getFile().' '.$e->getLine()); return false; } } // get_module_fields($module) diff --git a/src/Myddleware/RegleBundle/Solutions/lib/medialogistique/metadata.php b/src/Myddleware/RegleBundle/Solutions/lib/medialogistique/metadata.php new file mode 100644 index 000000000..ebafe15bc --- /dev/null +++ b/src/Myddleware/RegleBundle/Solutions/lib/medialogistique/metadata.php @@ -0,0 +1,93 @@ +. +*********************************************************************************/ + +$moduleFields = array ( + 'gestion_commande' => array( + 'code_interne' => array('label' => 'Code interne', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'compte_client' => array('label' => 'Compte client', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'ref_commande' => array('label' => 'Ref commande', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'date_commande' => array('label' => 'Date commande', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'date_livraison_demandee' => array('label' => 'Date livraison demandee', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'commentaire' => array('label' => 'Commentaire', 'type' => TextType::class, 'type_bdd' => 'varchar(255)', 'required' => 0), + 'origine' => array('label' => 'Origine', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'transporteur' => array('label' => 'Transporteur', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'fichier_source' => array('label' => 'Fichier source', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'reference_destinataire' => array('label' => 'Reference destinataire', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'Livr_nom' => array('label' => 'Livraison Nom', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Livr_adresse1' => array('label' => 'Livraison adresse1', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Livr_adresse2' => array('label' => 'Livraison adresse2', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Livr_cp' => array('label' => 'Livraison code postal', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Livr_ville' => array('label' => 'Livraison ville', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Livr_pays' => array('label' => 'Livraison pays (ISO)', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Fact_nom' => array('label' => 'Facturation Nom', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Fact_adresse1' => array('label' => 'Facturation adresse1', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Fact_adresse2' => array('label' => 'Facturation adresse2', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Fact_cp' => array('label' => 'Facturation code postal', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Fact_ville' => array('label' => 'Facturation ville', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'Fact_pays' => array('label' => 'Facturation pays (ISO)', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'email' => array('label' => 'Email', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'telephone' => array('label' => 'téléphone', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'article_EAN' => array('label' => 'Article EAN', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'article_ref_client' => array('label' => 'Article ref client', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'quantite' => array('label' => 'Quantite', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'prix_unit_TTC' => array('label' => 'Prix unitaire TTC', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'remise' => array('label' => 'Remise (%)', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'total_frais_port_TTC' => array('label' => 'Total frais port TTC', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'total_commande_TTC' => array('label' => 'Total commande TTC', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + 'valide' => array('label' => 'Statut commande', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1, 'option' => array( + '3' => 'En préparation', + '4' => 'Expédiée', + '9' => 'Facturée', + '10' => 'Expédiée Facturation externe', + '21' => 'Annulée' + )), + ), + + 'suivi_commande' => array( + 'valide' => array('label' => 'Statut commande', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1, 'option' => array( + '3' => 'En préparation', + '4' => 'Expédiée', + '9' => 'Facturée', + '10' => 'Expédiée Facturation externe', + '21' => 'Annulée' + )), + 'bordereau' => array('label' => 'Bordereau', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'qte_cmd' => array('label' => 'Quantité commandée', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + 'qte_exp' => array('label' => 'Quantité expédiée', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 0), + ), + ); + +$fieldsRelate = array( + 'suivi_commande' => array( + 'ref_client' => array('label' => 'Ref commande', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1), + ), + ); + + +// Metadata override if needed +$file = __DIR__.'/../../../Custom/Solutions/lib/moodle/metadata.php'; +if(file_exists($file)){ + require_once($file); +} \ No newline at end of file diff --git a/src/Myddleware/RegleBundle/Solutions/medialogistique.php b/src/Myddleware/RegleBundle/Solutions/medialogistique.php new file mode 100644 index 000000000..8895c9c62 --- /dev/null +++ b/src/Myddleware/RegleBundle/Solutions/medialogistique.php @@ -0,0 +1,412 @@ +. + *********************************************************************************/ + +namespace Myddleware\RegleBundle\Solutions; + +use DateTime; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Form\Extension\Core\Type\PasswordType; +use Symfony\Component\Form\Extension\Core\Type\TextType; + +class medialogistiquecore extends solution { + + protected $url = 'https://gestion.mvsbusiness.com/rest_ext/'; + + // Module list that allows to make parent relationships + protected $allowParentRelationship = array('gestion_commande'); + + protected $idByModule = array( + 'suivi_commande' => 'ref_client' + ); + + public function getFieldsLogin() { + return array( + array( + 'name' => 'clientid', + 'type' => TextType::class, + 'label' => 'solution.fields.clientid' + ), + array( + 'name' => 'authid', + 'type' => PasswordType::class, + 'label' => 'solution.fields.authid' + ), + array( + 'name' => 'hashkey', + 'type' => PasswordType::class, + 'label' => 'solution.fields.hashkey' + ) + ); + } + + // Login to Média logistique + public function login($paramConnexion) { + parent::login($paramConnexion); + try { + // Call the order list to check the login parameters (OK even if there is no order) + $timestamp = gmdate('U'); + // Build login parameters + $parameters = array( + 'id_client' => $this->paramConnexion['clientid'], + 'id_auth' => $this->paramConnexion['authid'], + 'expires' => $timestamp, + 'auth' => hash_hmac('sha256',$this->paramConnexion['authid'].'_'.$timestamp.'_gestion_commande',$this->paramConnexion['hashkey']) + ); + $result = $this->call($this->url.'gestion_commande/date/'.date('Y-m-d').'?'.http_build_query($parameters)); + + // We have to get a result action equal to Get_commande because this is the action we have called + if ( + empty($result->action) + OR $result->action <> 'Get_commande' + ) { + throw new \Exception('Failed to connect to Media Logistique.'); + } + + // Connection validation + $this->connexion_valide = true; + } catch (\Exception $e) { + $error = $e->getMessage(); + $this->logger->error($error); + return array('error' => $error); + } + } // login($paramConnexion) + + + public function get_modules($type = 'source') { + $modules = array( + 'gestion_commande' => 'Commande' + ); + if ($type == 'source') { + $modules = array( + 'suivi_commande' => 'Suivi commande' + ); + } + return $modules; + } // get_modules() + + // Get the fields available for the module in input + public function get_module_fields($module, $type = 'source') { + parent::get_module_fields($module, $type); + try{ + $this->moduleFields = array(); + $this->fieldsRelate = array(); + + // Use medialogistique metadata + require('lib/medialogistique/metadata.php'); + if (!empty($moduleFields[$module])) { + $this->moduleFields = $moduleFields[$module]; + } else { + throw new \Exception('Module '.$module.' unknown. Failed to get the module fields.'); + } + + // Field relate + if (!empty($fieldsRelate[$module])) { + $this->fieldsRelate = $fieldsRelate[$module]; + } + + // Add relate field in the field mapping + if (!empty($this->fieldsRelate)) { + $this->moduleFields = array_merge($this->moduleFields, $this->fieldsRelate); + } + + return $this->moduleFields; + } + catch (\Exception $e){ + return false; + } + } // get_module_fields($module) + + /** + * Function read data + * @param $param + * @return mixed + */ + public function read($param) { + try { + // Field id can change depending of the module + if(!empty($this->idByModule[$param['module']])) { // Si le champ id existe dans le tableau + $fieldId = $this->idByModule[$param['module']]; + } + + // Add required fields + $param['fields'] = $this->addRequiredField($param['fields']); + // Remove Myddleware 's system fields + $param['fields'] = $this->cleanMyddlewareElementId($param['fields']); + // Get the reference date field name + // $dateRefField = $this->getDateRefName($param['module'], $param['rule']['mode']); + + $fields = $param['fields']; + $result['date_ref'] = $param['date_ref']; + // Change to format Y-m-d + $param['date_ref'] = $this->dateTimeFromMyddleware($param['date_ref']); + $result['count'] = 0; + $lastCall = false; + + // Call the order list with the reference date in parameter + $timestamp = gmdate('U'); + // Build login parameters + $parameters = array( + 'id_client' => $this->paramConnexion['clientid'], + 'id_auth' => $this->paramConnexion['authid'], + 'expires' => $timestamp, + 'auth' => hash_hmac('sha256',$this->paramConnexion['authid'].'_'.$timestamp.'_gestion_commande',$this->paramConnexion['hashkey']) + ); + $yesterday = date("Y-m-d", strtotime( '-1 days' ) ); + while (!$lastCall) { + // If date ref = today or yesterday then we don't add the date in the URL + if ( + $param['date_ref'] == gmdate('Y-m-d') + OR $param['date_ref'] == $yesterday + ) { + $resultQuery = $this->call($this->url.'gestion_commande?'.http_build_query($parameters)); + $lastCall = true; + } else { + $resultQuery = $this->call($this->url.'gestion_commande/date/'.$param['date_ref'].'?'.http_build_query($parameters)); + } + + // If no result + if (!empty($resultQuery->ok)) { + foreach ($resultQuery->data as $recordData) { + // Date modified equal current date_ref + $record['date_modified'] = $this->dateTimeToMyddleware($param['date_ref']); + foreach ($fields as $field) { + $record[$field] = $recordData->$field; + } + // In case of suivi_commande module, a commande can be read several times, so we concatenate the commande ref and its status (valide) + if ($param['module'] == 'suivi_commande') { + $record['id'] = $recordData->ref_client.'_'.$recordData->valide; + } else { + $record['id'] = $recordData->$fieldId; + } + $result['values'][$record['id']] = $record; // last record + $result['count']++; + } + } + + + // Add 1 day to date_ref if not last call + if (!$lastCall) { + $dateRef = DateTime::createFromFormat('Y-m-d', $param['date_ref']); + $dateRef->modify('+1 day'); + $param['date_ref'] = $dateRef->format('Y-m-d'); + $result['date_ref'] = $this->dateTimeToMyddleware($param['date_ref']); + } + } + } catch (\Exception $e) { + $result['error'] = 'Error : ' . $e->getMessage().' '.$e->getFile().' '.$e->getLine(); + } + return $result; + }// end function read + + + // Permet de créer des données + public function create($param) { + $result = array(); + try { + foreach($param['data'] as $idDoc => $data) { + try { + // Order management only for now + if ($param['module']== 'gestion_commande') { + $createOrder = $this->createOrder($param, $idDoc); + $result = array_merge($result,$createOrder); + $this->updateDocumentStatus($idDoc, $createOrder[$idDoc], $param); + } + } catch (\Exception $e) { + $result[$idDoc] = array( + 'id' => '-1', + 'error' => $e->getMessage() + ); + } + + } + } catch (\Exception $e) { + $error = $e->getMessage().' '.$e->getFile().' '.$e->getLine(); + $result['error'] = $error; + } + return $result; + } + + protected function createOrder($param, $idDoc) { + $csvArray = array(); + $articles = array(); + $result[$idDoc]= array();; + $subDocIdArray = array(); + $csv = ''; + $order = $param['data'][$idDoc]; + // Search for article line as we have to generate one line in the csv file for each article + if (!empty($order['gestion_commande'])){ + foreach($order['gestion_commande'] as $subOrderObjectId => $subOrderObjectValue) { + // Save the subIdoc to change the sub data transfer status + $subDocIdArray[$subOrderObjectId] = array('id' => uniqid('', true)); + // Remove Myddleware fields (not relevant), we keep only the ones of the orderObject (not subOrderObject) + unset($subOrderObjectValue['id_doc_myddleware']); + unset($subOrderObjectValue['target_id']); + unset($subOrderObjectValue['source_date_modified']); + // In case of article object + if (isset($subOrderObjectValue['article_EAN'])) { + $articles[$subOrderObjectId] = $subOrderObjectValue; + } else { + $csvArray = array_merge($csvArray, $subOrderObjectValue); + } + + } + // Build the scv array in the right order + $csv = $this->buildCsv($order, $articles, $csvArray); + $timestamp = gmdate('U'); + // Build login parameters + $parameters = array( + 'id_client' => $this->paramConnexion['clientid'], + 'id_auth' => $this->paramConnexion['authid'], + 'expires' => $timestamp, + 'auth' => hash_hmac('sha256',$this->paramConnexion['authid'].'_'.$timestamp.'_gestion_commande',$this->paramConnexion['hashkey']) + ); + + // Call MediaLogistique function + $resultCall = $this->call($this->url.'gestion_commande?'.http_build_query($parameters), 'POST', array('csv' => $csv)); + + // Error management + if ($resultCall->ok == 1 AND $resultCall->data[0]->msg == 'OK') { + $result[$idDoc] = array('id' => $resultCall->data[0]->ref_cmd, 'error' => ''); + // If no exception, we update sub data transfer, main data transfer will be updated in the create function + if (!empty($subDocIdArray)) { + foreach($subDocIdArray as $idSubDoc => $valueSubDoc) { + $this->updateDocumentStatus($idSubDoc,$valueSubDoc,$param); + } + } + // Global error management + } elseif(!empty($resultCall->msg)) { + $result[$idDoc] = array('id' => -1, 'error' => $resultCall->msg); + // Order error management + } elseif(!empty($resultCall->data[0]->msg)) { + $result[$idDoc] = array('id' => -1, 'error' => $resultCall->data[0]->msg); + } else { + $result[$idDoc] = array('id' => -1, 'error' => 'No result from MVS. '); + } + + return $result; + } + } + + + // Build csv + protected function buildCsv($order, $articles, $csvArray) { + // Error if no article + if (empty($articles)) { + throw new \Exception('No article found in this order. Failed to create the order into Media Logistique.'); + } + // Build the csv string + $csv = ''; + foreach ($articles as $article) { + // Add Carriage Return expect for the first line + if (!empty($csv)) { + $csv .= chr(10); + } + $csv .= '"'.$order['code_interne'].'";"'.$order['compte_client'].'";"'.$order['ref_commande'].'";"'.$order['date_commande'].'";"'.$order['date_livraison_demandee'].'";'; + $csv .= (!empty($order['commentaire']) ? '"'.$order['commentaire'].'"' : '').';'; // Not requiered fields + $csv .= (!empty($order['origine']) ? '"'.$order['origine'].'"' : '').';'; // Not requiered fields + $csv .= (!empty($csvArray['transporteur']) ? '"'.$csvArray['transporteur'].'"' : '').';'; // Not requiered fields + $csv .= (!empty($csvArray['fichier_source']) ? '"'.$csvArray['fichier_source'].'"' : '').';'; // Not requiered fields + $csv .= (!empty($csvArray['reference_destinataire']) ? $csvArray['reference_destinataire'] : '').';'; // Not requiered fields + $csv .= '"'.$csvArray['Livr_nom'].'";"'.$csvArray['Livr_adresse1'].'";"'.$csvArray['Livr_adresse2'].'";"'.$csvArray['Livr_cp'].'";'; + $csv .= '"'.$csvArray['Livr_ville'].'";"'.$csvArray['Livr_pays'].'";"'.$csvArray['Fact_nom'].'";"'.$csvArray['Fact_adresse1'].'";"'.$csvArray['Fact_adresse2'].'";'; + $csv .= '"'.$csvArray['Fact_cp'].'";"'.$csvArray['Fact_ville'].'";"'.$csvArray['Fact_pays'].'";"'.$csvArray['email'].'";'.$csvArray['telephone'].';'.$article['article_EAN'].';'; + $csv .= (!empty($article['article_ref_client']) ? '"'.$article['article_ref_client'].'"' : '').';'; // Not requiered fields + $csv .= $article['quantite'].';'.$article['prix_unit_TTC'].';'; + $csv .= (!empty($article['remise']) ? $article['remise'] : '').';'; // Not requiered fields + $csv .= $order['total_frais_port_TTC'].';'.$order['total_commande_TTC']; + } + return $csv; + } + + + public function getRuleMode($module,$type) { + // only creationallowed for gestion_commande + if( + $type == 'target' + && in_array($module, array('gestion_commande')) + ) { + return array( + 'C' => 'create_only' + ); + } + return parent::getRuleMode($module,$type); + } + + // Convert Myddleware datetime format to MediaLogistique datetime format + protected function dateTimeFromMyddleware($dateTime) { + $date = new \DateTime($dateTime); + return $date->format('Y-m-d'); + }// dateTimeFromMyddleware($dateTime) + + // Convert MediaLogistique datetime format to Myddleware datetime format + protected function dateTimeToMyddleware($dateTime) { + $date = new \DateTime($dateTime); + return $date->format('Y-m-d H:i:s'); + }// dateTimeToMyddleware($dateTime) + + /** + * Function call + * @param $url + * @param string $method + * @param array $parameters + * @param int $timeout + * @return mixed|void + * @throws \Exception + */ + protected function call($url, $method = 'GET', $parameters = array(), $timeout = 300) { + if (!function_exists('curl_init') OR !function_exists('curl_setopt')) { + throw new \Exception('curl extension is missing!'); + } + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); + + // common description bellow + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + curl_setopt($ch, CURLOPT_SSLVERSION, 6); + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); + $response = curl_exec($ch); + // $info = curl_getinfo($ch); + curl_close($ch); + + return json_decode($response); + } +} + +/* * * * * * * * * * * * * * * * * * * * + si custom file exist alors on fait un include de la custom class + * * * * * * * * * * * * * * * * * * * */ +$file = __DIR__ . '/../Custom/Solutions/medialogistique.php'; +if (file_exists($file)) { + require_once($file); +} else { + //Sinon on met la classe suivante + class medialogistique extends medialogistiquecore + { + + } +} \ No newline at end of file diff --git a/src/Myddleware/RegleBundle/Solutions/myddlewareapi.php b/src/Myddleware/RegleBundle/Solutions/myddlewareapi.php new file mode 100644 index 000000000..d752b84a6 --- /dev/null +++ b/src/Myddleware/RegleBundle/Solutions/myddlewareapi.php @@ -0,0 +1,117 @@ +. +*********************************************************************************/ + +namespace Myddleware\RegleBundle\Solutions; + +use Symfony\Bridge\Monolog\Logger; +use Myddleware\RegleBundle\Classes\rule as ruleMyddleware; +use Symfony\Component\Form\Extension\Core\Type\PasswordType; +use Symfony\Component\Form\Extension\Core\Type\TextType; + +class myddlewareapicore extends solution { + + protected $driver; + protected $pdo; + protected $charset = 'utf8'; + + protected $stringSeparatorOpen = '`'; + protected $stringSeparatorClose = '`'; + + public function login($paramConnexion) { + parent::login($paramConnexion); + // Always OK because the connection comes from other application + $this->connexion_valide = true; + } // login($paramConnexion) + + public function getFieldsLogin() { + return array( + array( + 'name' => 'file', + 'type' => TextType::class, + 'label' => 'solution.fields.file' + ) + ); + } + + // Get all tables from the database + public function get_modules($type = 'source') { + try{ + $modules = array('Container' => 'Bittle container (new)'); + // $modules = array(); + // $modulesArray = explode(';', $this->paramConnexion['modules']); + // foreach ($modulesArray as $moduleArray) { + // $modules[$moduleArray] = $moduleArray; + // } + return $modules; + } catch (\Exception $e) { + $error = 'Error : '.$e->getMessage().' '.$e->getFile().' Line : ( '.$e->getLine().' )'; + return $error; + } + } + + // Get all fields from the table selected + public function get_module_fields($module, $type = 'source') { + parent::get_module_fields($module, $type); + try{ + $this->moduleFields = array(); + // Ajout du champs date + $this->moduleFields['Date'] = array('label' => 'Date', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => ($module == 'Container' ? 1 : 0)); + + // Il n'est pas nécessaire d'ajouter des champs obligatoire sur une règle child (le connecteur a déjà ses champs obligatoires avec la règle root) + if ($module == 'Container') { + // Ajout du champs metric + $this->moduleFields['Metric'] = array('label' => 'Metric', 'type' => 'varchar(255)', 'type_bdd' => 'varchar(255)', 'required' => 1); + } + return $this->moduleFields; + } + catch (\Exception $e){ + return false; + } + } // get_module_fields($module) + + // Ajout de champ personnalisé dans la target ex : bittle + public function getFieldMappingAdd($moduleTarget) { + return array( + 'Metric' => 'Metric', + 'Date' => 'Date', + 'Filter' => 'Filter', + 'Reference' => 'Reference' + ); + } +} + +/* * * * * * * * * * * * * * * * * * * * + si custom file exist alors on fait un include de la custom class + * * * * * * * * * * * * * * * * * * * */ +$file = __DIR__.'/../Custom/Solutions/myddlewareapi.php'; +if(file_exists($file)){ + require_once($file); +} +else { + //Sinon on met la classe suivante + class myddlewareapi extends myddlewareapicore { + + } +} \ No newline at end of file diff --git a/src/Myddleware/RegleBundle/Solutions/prestashop.php b/src/Myddleware/RegleBundle/Solutions/prestashop.php index 8f581af9e..494c04b59 100644 --- a/src/Myddleware/RegleBundle/Solutions/prestashop.php +++ b/src/Myddleware/RegleBundle/Solutions/prestashop.php @@ -177,7 +177,8 @@ public function get_modules($type = 'source') { $authorized = array("customers" => "The e-shop's customers", "customer_threads" => "Customer services threads", "customer_messages" => "Customer services messages", - "products" => "The products" + "products" => "The products", + "order_histories" => "The Order histories" ); return array_intersect_key($authorized, $modulesSource); @@ -275,16 +276,28 @@ public function get_module_fields($module, $type = 'source', $extension = false) } // Récupération des listes déroulantes if($module == 'orders' && isset($this->moduleFields['current_state'])) { - $order_states = $this->getList('order_state','order_states'); - $this->moduleFields['current_state']['option'] = $order_states; + try { + $order_states = $this->getList('order_state','order_states'); + $this->moduleFields['current_state']['option'] = $order_states; + } catch (\Exception $e) { + // No error if order_state not accessible, the order status list won't accessible + } } if($module == 'order_histories' && isset($this->fieldsRelate['id_order_state'])) { - $order_states = $this->getList('order_state','order_states'); - $this->fieldsRelate['id_order_state']['option'] = $order_states; + try { + $order_states = $this->getList('order_state','order_states'); + $this->fieldsRelate['id_order_state']['option'] = $order_states; + } catch (\Exception $e) { + // No error if order_state not accessible, the order status list won't accessible + } } if($module == 'supply_orders' && isset($this->moduleFields['id_supply_order_state'])) { - $supply_order_states = $this->getList('supply_order_state','supply_order_states'); - $this->moduleFields['id_supply_order_state']['option'] = $supply_order_states; + try { + $supply_order_states = $this->getList('supply_order_state','supply_order_states'); + $this->moduleFields['id_supply_order_state']['option'] = $supply_order_states; + } catch (\Exception $e) { + // No error if supply_order_state not accessible, the supply order status list won't accessible + } } // Ticket 450: Si c'est le module customer service messages, on rend la relation id_customer_thread obligatoire if($module == 'customer_messages') { @@ -411,7 +424,7 @@ public function xml2array ( $xmlObject, $out = array () ) // Permet de récupérer le dernier enregistrement de la solution (utilisé pour tester le flux) - public function read_last($param) { + public function read_last($param) { try { // try-catch Myddleware try{ // try-catch PrestashopWebservice $result = array(); @@ -459,6 +472,11 @@ public function read_last($param) { // Si le tableau de requête est présent alors construction de la requête if (!empty($param['query'])) { + // We return no result for order_histories as we never modify this module, always add a line. Avoid "no send" status + if ($param['module'] == 'order_histories') { + $result['done'] = false; + return $result; + } // Building of the option array if(!empty($param['query']['id'])) { $options['id'] = (int) $param['query']['id']; @@ -561,7 +579,7 @@ public function read_last($param) { } // read_last($param) // Permet de récupérer les enregistrements modifiés depuis la date en entrée dans la solution - public function read($param) { + public function read($param) { try { // try-catch Myddleware // traitement spécial pour module de relation Customers / Groupe if(array_key_exists($param['module'], $this->module_relationship_many_to_many)) { @@ -906,7 +924,6 @@ public function create($param) { // Function to modify opt (used for custom needs) $opt = $this->updateOptions('create1',$opt,$param); - // Call $xml = $this->webService->get($opt); $modele = $xml->children()->children(); @@ -948,7 +965,6 @@ public function create($param) { // Function to modify opt (used for custom needs) $opt = $this->updateOptions('create2',$opt,$param); - $new = $this->webService->add($opt); $result[$idDoc] = array( 'id' => (string)$new->children()->children()->id, @@ -982,6 +998,12 @@ public function create($param) { // Permet de modifier des données public function update($param) { + // We never update order_histories even if the methode update is called + // For this module we always create a new line (so create methode is called) + if ($param['module'] == 'order_histories') { + return $this->create($param); + } + foreach($param['data'] as $idDoc => $data) { try{ // try-catch Myddleware try{ // try-catch PrestashopWebservice diff --git a/src/Myddleware/RegleBundle/Solutions/sagecrm.php b/src/Myddleware/RegleBundle/Solutions/sagecrm.php index 1f42a02ab..8fec99c39 100644 --- a/src/Myddleware/RegleBundle/Solutions/sagecrm.php +++ b/src/Myddleware/RegleBundle/Solutions/sagecrm.php @@ -84,7 +84,7 @@ public function login($paramConnexion) { 'authentication' => SOAP_AUTHENTICATION_BASIC, 'exceptions' => TRUE ); - $this->paramConnexion['wsdl'] = __DIR__.'/../Custom/Solutions/sagecrm/wsdl/'.$this->paramConnexion['wsdl']; + $this->paramConnexion['wsdl'] = __DIR__.'/../Custom/Solutions/sagecrm/file/'.$this->paramConnexion['wsdl']; $client = new \SoapClient($this->paramConnexion['wsdl'], $options); $login_details = array('username' => $this->paramConnexion['login'], 'password' => $this->paramConnexion['password']); $response = $client->logon($login_details); diff --git a/src/Myddleware/RegleBundle/Solutions/solution.php b/src/Myddleware/RegleBundle/Solutions/solution.php index dfc466d19..6c4c6cfb6 100644 --- a/src/Myddleware/RegleBundle/Solutions/solution.php +++ b/src/Myddleware/RegleBundle/Solutions/solution.php @@ -506,7 +506,8 @@ protected function getInfoDocument($idDocument) { $sqlParams = " SELECT * FROM Document INNER JOIN Rule - ON Document.rule_id = Rule.id + ON Document.rule_id = Rule.id + AND Document.deleted = 0 WHERE id = :id_doc"; $stmt = $connection->prepare($sqlParams); $stmt->bindValue(":id_doc", $idDocument); @@ -518,7 +519,7 @@ protected function getInfoDocument($idDocument) { // Permet de récupérer la source ID du document en paramètre protected function getSourceId($idDoc) { // Récupération du source_id - $sql = "SELECT `source_id` FROM `Document` WHERE `id` = :idDoc"; + $sql = "SELECT `source_id` FROM `Document` WHERE `id` = :idDoc AND Document.deleted = 0"; $stmt = $this->conn->prepare($sql); $stmt->bindValue(":idDoc", $idDoc); $stmt->execute(); diff --git a/src/Myddleware/RegleBundle/Templates/prestashop_medialogistique_create_order.yml b/src/Myddleware/RegleBundle/Templates/prestashop_medialogistique_create_order.yml new file mode 100644 index 000000000..640924937 --- /dev/null +++ b/src/Myddleware/RegleBundle/Templates/prestashop_medialogistique_create_order.yml @@ -0,0 +1,97 @@ +name: prestashop_medialogistique_create_order +description: 'Send order from Prestashop to Media Logistique' +rules: + - + name: 'Order detail' + nameSlug: order_detail + sourceSolution: prestashop + targetSolution: medialogistique + sourceModule: order_details + targetModule: gestion_commande + fields: + - { target: article_EAN, source: product_ean13, formula: null } + - { target: prix_unit_TTC, source: product_price, formula: null } + - { target: quantite, source: product_quantity, formula: null } + params: + - { name: limit, value: '100' } + - { name: delete, value: '60' } + - { name: datereference, value: '1970-01-01 00:00:00' } + - { name: mode, value: '0' } + - + name: 'Shipping address' + nameSlug: shipping_address + sourceSolution: prestashop + targetSolution: medialogistique + sourceModule: addresses + targetModule: gestion_commande + fields: + - { target: Livr_adresse1, source: address1, formula: null } + - { target: Livr_adresse2, source: address2, formula: null } + - { target: Livr_cp, source: postcode, formula: null } + - { target: Livr_nom, source: firstname;lastname, formula: '{firstname}." ".{lastname}' } + - { target: Livr_pays, source: id_country, formula: 'changeValue( {id_country},"(''1'':''DE'',''2'':''AT'',''3'':''BE'',''4'':''CA'',''5'':''CN'',''6'':''ES'',''7'':''FI'',''8'':''FR'',''9'':''GR'',''10'':''IT'',''11'':''JP'',''12'':''LU'',''13'':''NL'',''14'':''PL'',''15'':''PT'',''16'':''CZ'',''17'':''GB'',''18'':''SE'',''19'':''CH'',''20'':''DK'',''21'':''US'',''22'':''HK'',''23'':''NO'',''24'':''AU'',''25'':''SG'',''26'':''IE'',''27'':''NZ'',''28'':''KR'',''29'':''IL'',''30'':''ZA'',''31'':''NG'',''32'':''CI'',''33'':''TG'',''34'':''BO'',''35'':''MU'',''36'':''RO'',''37'':''SK'',''38'':''DZ'',''39'':''AS'',''40'':''AD'',''41'':''AO'',''42'':''AI'',''43'':''AG'',''44'':''AR'',''45'':''AM'',''46'':''AW'',''47'':''AZ'',''48'':''BS'',''49'':''BH'',''50'':''BD'',''51'':''BB'',''52'':''BY'',''53'':''BZ'',''54'':''BJ'',''55'':''BM'',''56'':''BT'',''57'':''BW'',''58'':''BR'',''59'':''BN'',''60'':''BF'',''61'':''MM'',''62'':''BI'',''63'':''KH'',''64'':''CM'',''65'':''CV'',''66'':''CF'',''67'':''TD'',''68'':''CL'',''69'':''CO'',''70'':''KM'',''71'':''CD'',''72'':''CG'',''73'':''CR'',''74'':''HR'',''75'':''CU'',''76'':''CY'',''77'':''DJ'',''78'':''DM'',''79'':''DO'',''80'':''TL'',''81'':''EC'',''82'':''EG'',''83'':''SV'',''84'':''GQ'',''85'':''ER'',''86'':''EE'',''87'':''ET'',''88'':''FK'',''89'':''FO'',''90'':''FJ'',''91'':''GA'',''92'':''GM'',''93'':''GE'',''94'':''GH'',''95'':''GD'',''96'':''GL'',''97'':''GI'',''98'':''GP'',''99'':''GU'',''100'':''GT'',''101'':''GG'',''102'':''GN'',''103'':''GW'',''104'':''GY'',''105'':''HT'',''106'':''HM'',''107'':''VA'',''108'':''HN'',''109'':''IS'',''110'':''IN'',''111'':''ID'',''112'':''IR'',''113'':''IQ'',''114'':''IM'',''115'':''JM'',''116'':''JE'',''117'':''JO'',''118'':''KZ'',''119'':''KE'',''120'':''KI'',''121'':''KP'',''122'':''KW'',''123'':''KG'',''124'':''LA'',''125'':''LV'',''126'':''LB'',''127'':''LS'',''128'':''LR'',''129'':''LY'',''130'':''LI'',''131'':''LT'',''132'':''MO'',''133'':''MK'',''134'':''MG'',''135'':''MW'',''136'':''MY'',''137'':''MV'',''138'':''ML'',''139'':''MT'',''140'':''MH'',''141'':''MQ'',''142'':''MR'',''143'':''HU'',''144'':''YT'',''145'':''MX'',''146'':''FM'',''147'':''MD'',''148'':''MC'',''149'':''MN'',''150'':''ME'',''151'':''MS'',''152'':''MA'',''153'':''MZ'',''154'':''NA'',''155'':''NR'',''156'':''NP'',''157'':''AN'',''158'':''NC'',''159'':''NI'',''160'':''NE'',''161'':''NU'',''162'':''NF'',''163'':''MP'',''164'':''OM'',''165'':''PK'',''166'':''PW'',''167'':''PS'',''168'':''PA'',''169'':''PG'',''170'':''PY'',''171'':''PE'',''172'':''PH'',''173'':''PN'',''174'':''PR'',''175'':''QA'',''176'':''RE'',''177'':''RU'',''178'':''RW'',''179'':''BL'',''180'':''KN'',''181'':''LC'',''182'':''MF'',''183'':''PM'',''184'':''VC'',''185'':''WS'',''186'':''SM'',''187'':''ST'',''188'':''SA'',''189'':''SN'',''190'':''RS'',''191'':''SC'',''192'':''SL'',''193'':''SI'',''194'':''SB'',''195'':''SO'',''196'':''GS'',''197'':''LK'',''198'':''SD'',''199'':''SR'',''200'':''SJ'',''201'':''SZ'',''202'':''SY'',''203'':''TW'',''204'':''TJ'',''205'':''TZ'',''206'':''TH'',''207'':''TK'',''208'':''TO'',''209'':''TT'',''210'':''TN'',''211'':''TR'',''212'':''TM'',''213'':''TC'',''214'':''TV'',''215'':''UG'',''216'':''UA'',''217'':''AE'',''218'':''UY'',''219'':''UZ'',''220'':''VU'',''221'':''VE'',''222'':''VN'',''223'':''VG'',''224'':''VI'',''225'':''WF'',''226'':''EH'',''227'':''YE'',''228'':''ZM'',''229'':''ZW'',''230'':''AL'',''231'':''AF'',''232'':''AQ'',''233'':''BA'',''234'':''BV'',''235'':''IO'',''236'':''BG'',''237'':''KY'',''238'':''CX'',''239'':''CC'',''240'':''CK'',''241'':''GF'',''242'':''PF'',''243'':''TF'',''244'':''AX'')")' } + - { target: Livr_ville, source: city, formula: null } + - { target: telephone, source: phone;phone_mobile, formula: '({phone} != "" ? {phone} : {phone_mobile})' } + params: + - { name: limit, value: '100' } + - { name: delete, value: '60' } + - { name: datereference, value: '1970-01-01 00:00:00' } + - { name: mode, value: '0' } + - + name: 'Billing address' + nameSlug: billing_address + sourceSolution: prestashop + targetSolution: medialogistique + sourceModule: addresses + targetModule: gestion_commande + fields: + - { target: Fact_adresse1, source: address1, formula: null } + - { target: Fact_adresse2, source: address2, formula: null } + - { target: Fact_cp, source: postcode, formula: null } + - { target: Fact_nom, source: firstname;lastname, formula: '{firstname}." ".{lastname}' } + - { target: Fact_pays, source: id_country, formula: 'changeValue( {id_country},"(''1'':''DE'',''2'':''AT'',''3'':''BE'',''4'':''CA'',''5'':''CN'',''6'':''ES'',''7'':''FI'',''8'':''FR'',''9'':''GR'',''10'':''IT'',''11'':''JP'',''12'':''LU'',''13'':''NL'',''14'':''PL'',''15'':''PT'',''16'':''CZ'',''17'':''GB'',''18'':''SE'',''19'':''CH'',''20'':''DK'',''21'':''US'',''22'':''HK'',''23'':''NO'',''24'':''AU'',''25'':''SG'',''26'':''IE'',''27'':''NZ'',''28'':''KR'',''29'':''IL'',''30'':''ZA'',''31'':''NG'',''32'':''CI'',''33'':''TG'',''34'':''BO'',''35'':''MU'',''36'':''RO'',''37'':''SK'',''38'':''DZ'',''39'':''AS'',''40'':''AD'',''41'':''AO'',''42'':''AI'',''43'':''AG'',''44'':''AR'',''45'':''AM'',''46'':''AW'',''47'':''AZ'',''48'':''BS'',''49'':''BH'',''50'':''BD'',''51'':''BB'',''52'':''BY'',''53'':''BZ'',''54'':''BJ'',''55'':''BM'',''56'':''BT'',''57'':''BW'',''58'':''BR'',''59'':''BN'',''60'':''BF'',''61'':''MM'',''62'':''BI'',''63'':''KH'',''64'':''CM'',''65'':''CV'',''66'':''CF'',''67'':''TD'',''68'':''CL'',''69'':''CO'',''70'':''KM'',''71'':''CD'',''72'':''CG'',''73'':''CR'',''74'':''HR'',''75'':''CU'',''76'':''CY'',''77'':''DJ'',''78'':''DM'',''79'':''DO'',''80'':''TL'',''81'':''EC'',''82'':''EG'',''83'':''SV'',''84'':''GQ'',''85'':''ER'',''86'':''EE'',''87'':''ET'',''88'':''FK'',''89'':''FO'',''90'':''FJ'',''91'':''GA'',''92'':''GM'',''93'':''GE'',''94'':''GH'',''95'':''GD'',''96'':''GL'',''97'':''GI'',''98'':''GP'',''99'':''GU'',''100'':''GT'',''101'':''GG'',''102'':''GN'',''103'':''GW'',''104'':''GY'',''105'':''HT'',''106'':''HM'',''107'':''VA'',''108'':''HN'',''109'':''IS'',''110'':''IN'',''111'':''ID'',''112'':''IR'',''113'':''IQ'',''114'':''IM'',''115'':''JM'',''116'':''JE'',''117'':''JO'',''118'':''KZ'',''119'':''KE'',''120'':''KI'',''121'':''KP'',''122'':''KW'',''123'':''KG'',''124'':''LA'',''125'':''LV'',''126'':''LB'',''127'':''LS'',''128'':''LR'',''129'':''LY'',''130'':''LI'',''131'':''LT'',''132'':''MO'',''133'':''MK'',''134'':''MG'',''135'':''MW'',''136'':''MY'',''137'':''MV'',''138'':''ML'',''139'':''MT'',''140'':''MH'',''141'':''MQ'',''142'':''MR'',''143'':''HU'',''144'':''YT'',''145'':''MX'',''146'':''FM'',''147'':''MD'',''148'':''MC'',''149'':''MN'',''150'':''ME'',''151'':''MS'',''152'':''MA'',''153'':''MZ'',''154'':''NA'',''155'':''NR'',''156'':''NP'',''157'':''AN'',''158'':''NC'',''159'':''NI'',''160'':''NE'',''161'':''NU'',''162'':''NF'',''163'':''MP'',''164'':''OM'',''165'':''PK'',''166'':''PW'',''167'':''PS'',''168'':''PA'',''169'':''PG'',''170'':''PY'',''171'':''PE'',''172'':''PH'',''173'':''PN'',''174'':''PR'',''175'':''QA'',''176'':''RE'',''177'':''RU'',''178'':''RW'',''179'':''BL'',''180'':''KN'',''181'':''LC'',''182'':''MF'',''183'':''PM'',''184'':''VC'',''185'':''WS'',''186'':''SM'',''187'':''ST'',''188'':''SA'',''189'':''SN'',''190'':''RS'',''191'':''SC'',''192'':''SL'',''193'':''SI'',''194'':''SB'',''195'':''SO'',''196'':''GS'',''197'':''LK'',''198'':''SD'',''199'':''SR'',''200'':''SJ'',''201'':''SZ'',''202'':''SY'',''203'':''TW'',''204'':''TJ'',''205'':''TZ'',''206'':''TH'',''207'':''TK'',''208'':''TO'',''209'':''TT'',''210'':''TN'',''211'':''TR'',''212'':''TM'',''213'':''TC'',''214'':''TV'',''215'':''UG'',''216'':''UA'',''217'':''AE'',''218'':''UY'',''219'':''UZ'',''220'':''VU'',''221'':''VE'',''222'':''VN'',''223'':''VG'',''224'':''VI'',''225'':''WF'',''226'':''EH'',''227'':''YE'',''228'':''ZM'',''229'':''ZW'',''230'':''AL'',''231'':''AF'',''232'':''AQ'',''233'':''BA'',''234'':''BV'',''235'':''IO'',''236'':''BG'',''237'':''KY'',''238'':''CX'',''239'':''CC'',''240'':''CK'',''241'':''GF'',''242'':''PF'',''243'':''TF'',''244'':''AX'')")' } + - { target: Fact_ville, source: city, formula: null } + params: + - { name: limit, value: '100' } + - { name: delete, value: '60' } + - { name: datereference, value: '1970-01-01 00:00:00' } + - { name: mode, value: '0' } + - + name: Customers + nameSlug: customers + sourceSolution: prestashop + targetSolution: medialogistique + sourceModule: customers + targetModule: gestion_commande + fields: + - { target: email, source: email, formula: null } + params: + - { name: limit, value: '100' } + - { name: delete, value: '60' } + - { name: datereference, value: '1970-01-01 00:00:00' } + - { name: mode, value: '0' } + - + name: Orders + nameSlug: orders + sourceSolution: prestashop + targetSolution: medialogistique + sourceModule: orders + targetModule: gestion_commande + fields: + - { target: date_commande, source: date_add, formula: 'changeFormatDate( {date_add}, "Y-m-d H:i:s", "Y-m-d")' } + - { target: date_livraison_demandee, source: date_add, formula: 'changeFormatDate( {date_add}, "Y-m-d H:i:s", "Y-m-d")' } + - { target: ref_commande, source: reference, formula: null } + - { target: total_commande_TTC, source: total_paid_tax_incl, formula: null } + - { target: total_frais_port_TTC, source: total_shipping_tax_incl, formula: null } + - { target: code_interne, source: my_value, formula: '"CW1"' } + - { target: compte_client, source: my_value, formula: '"CLIENT"' } + relationships: + - { fieldNameSource: Myddleware_element_id, fieldNameTarget: id_order, fieldId: order_detail, parent: true } + - { fieldNameSource: id_customer, fieldNameTarget: Myddleware_element_id, fieldId: customers, parent: true } + - { fieldNameSource: id_address_delivery, fieldNameTarget: Myddleware_element_id, fieldId: shipping_address, parent: true } + - { fieldNameSource: id_address_invoice, fieldNameTarget: Myddleware_element_id, fieldId: billing_address, parent: true } + params: + - { name: limit, value: '100' } + - { name: delete, value: '60' } + - { name: datereference, value: '1970-01-01 00:00:00' } + - { name: mode, value: '0' } diff --git a/tests/MyddlewareApiBundle/Controller/DefaultControllerTest.php b/tests/MyddlewareApiBundle/Controller/DefaultControllerTest.php new file mode 100644 index 000000000..dfa7d92a9 --- /dev/null +++ b/tests/MyddlewareApiBundle/Controller/DefaultControllerTest.php @@ -0,0 +1,17 @@ +request('GET', '/'); + + $this->assertContains('Hello World', $client->getResponse()->getContent()); + } +} diff --git a/web/.htaccess b/web/.htaccess index 0c5f37def..9a2c90a7c 100644 --- a/web/.htaccess +++ b/web/.htaccess @@ -8,6 +8,9 @@ DirectoryIndex app.php RewriteEngine On + RewriteCond %{HTTP:Authorization} ^(.*) + RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] + # Determine the RewriteBase automatically and set it as environment variable. # If you are using Apache aliases to do mass virtual hosting or installed the # project in a subdirectory, the base path will be prepended to allow proper diff --git a/web/installMyddleware.php b/web/installMyddleware.php index 25b5182c9..690fe7975 100644 --- a/web/installMyddleware.php +++ b/web/installMyddleware.php @@ -95,10 +95,12 @@ 'config/public/parameters_smtp.yml file should be writable', 'Change the permissions "config/public/parameters_smtp.yml" file so that the web server can write into it.' ); +// Check php version +$symfonyRequirements->addRequirement( version_compare(phpversion(), '7.1', '>='), 'Wrong php version', 'Your php version is '.phpversion().'. Myddleware is compatible only with php version 7.1 and 7.2.'); +$symfonyRequirements->addRequirement( version_compare(phpversion(), '7.3', '<'), 'Wrong php version', 'Your php version is '.phpversion().'. Myddleware is compatible only with php version 7.1 and 7.2.'); $iniPath = $symfonyRequirements->getPhpIniConfigPath(); - echo_title('Myddleware Requirements Checker'); echo '> PHP is using the following php.ini file:'.'
';