diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6119917f226a5a16fd4103165beb5861724de6a1..68fe5ad2566a95bce6d5547d0ba919f6f4b42c93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,3 +7,17 @@ include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main file: "nc-apps-deploy.yml" + +build-vendor: + stage: build + extends: .composer:base + needs: ["build-frontend"] + before_script: + - composer install --no-dev + script: + - cp -a vendor dist/${APP_NAME} + - find dist/${APP_NAME} -type d -exec chmod 755 {} \; + - find dist/${APP_NAME} -type f -exec chmod 644 {} \; + artifacts: + paths: + - dist/ diff --git a/README.md b/README.md index 1c3a89f90dd533ff61c9ac7cd428c1faa2d1b8ad..d5a0529dced10460a486d3acec8f62e8affc1e33 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,17 @@ The values are: 'beta_group_name' => 'beta', 'beta_gitlab_email_id' => 'xyz@e.email', ``` + +## Welcome User Email notification + +- Configure the following parameters in `config.php` for welcome emails via Sendgrid: + - sendgrid_api_key + - sendgrid_template_ids + +The values should be set as follows: +``` +... +'sendgrid_api_key' => 'SENDGRID_API_KEY', +'welcome_sendgrid_template_ids' => [ 'en' => 'EN_TEMPLATE_ID', 'es' => 'ES_TEMPLATE_ID', ... ] +... +``` diff --git a/composer.json b/composer.json index 01f45f582c344c159ab35ab4d2f0fb0825e33afa..e061bddd0c11832f82a7da31e9d6aa2cf1438c31 100644 --- a/composer.json +++ b/composer.json @@ -6,5 +6,8 @@ "scripts": { "cs:check": "php-cs-fixer fix --dry-run --diff", "cs:fix": "php-cs-fixer fix" + }, + "require": { + "sendgrid/sendgrid": "^8.0" } } diff --git a/composer.lock b/composer.lock index 1e955cd4d085a6245ed9ede03f8cd1656d943644..fb7ca3a5a2e4f06b509d49ea93c4098092e7d947 100644 --- a/composer.lock +++ b/composer.lock @@ -4,110 +4,41 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5c8676ef88653f041796c086ecdf00db", - "packages": [], - "packages-dev": [ + "content-hash": "6d0f53432c77aa33e1562c40d5f39632", + "packages": [ { - "name": "composer/pcre", - "version": "3.0.2", + "name": "sendgrid/php-http-client", + "version": "3.14.4", "source": { "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "4482b6409ca6bfc2af043a5711cd21ac3e7a8dfb" + "url": "https://github.com/sendgrid/php-http-client.git", + "reference": "6d589564522be290c7d7c18e51bcd8b03aeaf0b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4482b6409ca6bfc2af043a5711cd21ac3e7a8dfb", - "reference": "4482b6409ca6bfc2af043a5711cd21ac3e7a8dfb", + "url": "https://api.github.com/repos/sendgrid/php-http-client/zipball/6d589564522be290c7d7c18e51bcd8b03aeaf0b6", + "reference": "6d589564522be290c7d7c18e51bcd8b03aeaf0b6", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6" }, "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-11-03T20:24:16+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": "^5.7 || ^6.5", + "sebastian/version": "^1.0.6", + "squizlabs/php_codesniffer": "~2.0" }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "suggest": { + "composer/ca-bundle": "Including this library will ensure that a valid CA bundle is available for secure connections" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Semver\\": "src" + "SendGrid\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -116,148 +47,116 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" + "name": "Matt Bernier", + "email": "mbernier@twilio.com" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "name": "Elmer Thomas", + "email": "ethomas@twilio.com" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", + "description": "HTTP REST client, simplified for PHP", + "homepage": "http://github.com/sendgrid/php-http-client", "keywords": [ - "semantic", - "semver", - "validation", - "versioning" + "api", + "fluent", + "http", + "rest", + "sendgrid" ], "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "issues": "https://github.com/sendgrid/php-http-client/issues", + "source": "https://github.com/sendgrid/php-http-client/tree/3.14.4" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2022-03-09T20:21:55+00:00" }, { - "name": "composer/xdebug-handler", - "version": "3.0.3", + "name": "sendgrid/sendgrid", + "version": "8.0.1", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "url": "https://github.com/sendgrid/sendgrid-php.git", + "reference": "285381257100b73aa50d8d70f0bcfb1f48b63747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/sendgrid/sendgrid-php/zipball/285381257100b73aa50d8d70f0bcfb1f48b63747", + "reference": "285381257100b73aa50d8d70f0bcfb1f48b63747", "shasum": "" }, "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "php": ">=7.3", + "sendgrid/php-http-client": "~3.10", + "starkbank/ecdsa": "0.*" + }, + "replace": { + "sendgrid/sendgrid-php": "*" }, "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^9", + "squizlabs/php_codesniffer": "3.*", + "swaggest/json-diff": "^3.4" }, "type": "library", "autoload": { "psr-4": { - "Composer\\XdebugHandler\\": "src" - } + "SendGrid\\Mail\\": "lib/mail/", + "SendGrid\\Stats\\": "lib/stats/", + "SendGrid\\Helper\\": "lib/helper/", + "SendGrid\\Contacts\\": "lib/contacts/", + "SendGrid\\EventWebhook\\": "lib/eventwebhook/" + }, + "classmap": [ + "lib/BaseSendGridClientInterface.php", + "lib/SendGrid.php", + "lib/TwilioEmail.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", + "description": "This library allows you to quickly and easily send emails through Twilio SendGrid using PHP.", + "homepage": "http://github.com/sendgrid/sendgrid-php", "keywords": [ - "Xdebug", - "performance" + "email", + "grid", + "send", + "sendgrid", + "twilio sendgrid" ], "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/sendgrid/sendgrid-php/tree/8.0.1" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2022-08-10T18:37:45+00:00" }, { - "name": "doctrine/annotations", - "version": "1.13.3", + "name": "starkbank/ecdsa", + "version": "0.0.5", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0" + "url": "https://github.com/starkbank/ecdsa-php.git", + "reference": "484bedac47bac4012dc73df91da221f0a66845cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0", + "url": "https://api.github.com/repos/starkbank/ecdsa-php/zipball/484bedac47bac4012dc73df91da221f0a66845cb", + "reference": "484bedac47bac4012dc73df91da221f0a66845cb", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2", - "vimeo/psalm": "^4.10" + "php": ">=5.5" }, "type": "library", "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } + "files": [ + "src/ellipticcurve.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -265,66 +164,44 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "StarkBank", + "email": "developers@starkbank.com", + "homepage": "https://starkbank.com", + "role": "Developer" } ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], + "description": "fast openSSL-compatible implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA)", + "homepage": "https://github.com/starkbank/ecdsa-php", "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.3" + "issues": "https://github.com/starkbank/ecdsa-php/issues", + "source": "https://github.com/starkbank/ecdsa-php/tree/v0.0.5" }, - "time": "2022-07-02T10:48:51+00:00" - }, + "time": "2021-06-06T22:24:49+00:00" + } + ], + "packages-dev": [ { - "name": "doctrine/lexer", - "version": "1.2.3", + "name": "nextcloud/coding-standard", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "url": "https://github.com/nextcloud/coding-standard.git", + "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb", + "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "php": "^7.3|^8.0", + "php-cs-fixer/shim": "^3.17" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Nextcloud\\CodingStandard\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -333,109 +210,48 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at" } ], - "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", - "php" - ], + "description": "Nextcloud coding standards for the php cs fixer", "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "issues": "https://github.com/nextcloud/coding-standard/issues", + "source": "https://github.com/nextcloud/coding-standard/tree/v1.1.1" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2023-06-01T12:05:01+00:00" }, { - "name": "friendsofphp/php-cs-fixer", - "version": "v3.13.0", + "name": "php-cs-fixer/shim", + "version": "v3.26.1", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1" + "url": "https://github.com/PHP-CS-Fixer/shim.git", + "reference": "13145f5f270b06259608a41389e08c027ba70e75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a6232229a8309e8811dc751c28b91cb34b2943e1", - "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/13145f5f270b06259608a41389e08c027ba70e75", + "reference": "13145f5f270b06259608a41389e08c027ba70e75", "shasum": "" }, "require": { - "composer/semver": "^3.2", - "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^1.13", "ext-json": "*", "ext-tokenizer": "*", - "php": "^7.4 || ^8.0", - "sebastian/diff": "^4.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.25", - "symfony/polyfill-php81": "^1.25", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "php": "^7.4 || ^8.0" }, - "require-dev": { - "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", - "mikey179/vfsstream": "^1.6.10", - "php-coveralls/php-coveralls": "^2.5.2", - "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.0", - "symfony/yaml": "^5.4 || ^6.0" + "replace": { + "friendsofphp/php-cs-fixer": "self.version" }, "suggest": { "ext-dom": "For handling output formats in XML", "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ - "php-cs-fixer" + "php-cs-fixer", + "php-cs-fixer.phar" ], "type": "application", - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -452,1629 +268,10 @@ ], "description": "A tool to automatically fix PHP code style", "support": { - "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.0" - }, - "funding": [ - { - "url": "https://github.com/keradus", - "type": "github" - } - ], - "time": "2022-10-31T19:28:50+00:00" - }, - { - "name": "nextcloud/coding-standard", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/f3d1f9375e89c605deb1734f59a9f51ecbe80578", - "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578", - "shasum": "" - }, - "require": { - "friendsofphp/php-cs-fixer": "^3.2", - "php": "^7.3|^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Nextcloud\\CodingStandard\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christoph Wurst", - "email": "christoph@winzerhof-wurst.at" - } - ], - "description": "Nextcloud coding standards for the php cs fixer", - "support": { - "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.0.0" - }, - "time": "2021-11-10T08:44:10+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" + "issues": "https://github.com/PHP-CS-Fixer/shim/issues", + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.26.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "symfony/console", - "version": "v6.1.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a1282bd0c096e0bdb8800b104177e2ce404d8815", - "reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.4|^6.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v6.1.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-26T21:42:49+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.1.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.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": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-25T11:15:52+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v6.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a0449a7ad7daa0f7c0acd508259f80544ab5a347", - "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2|^3" - }, - "conflict": { - "symfony/dependency-injection": "<5.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^5.4|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.1.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-05T16:51:07+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.1.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "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 dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-25T11:15:52+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v6.1.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "4d216a2beef096edf040a070117c39ca2abce307" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d216a2beef096edf040a070117c39ca2abce307", - "reference": "4d216a2beef096edf040a070117c39ca2abce307", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.1.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-09-21T20:29:40+00:00" - }, - { - "name": "symfony/finder", - "version": "v6.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/39696bff2c2970b3779a5cac7bf9f0b88fc2b709", - "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/filesystem": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v6.1.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-29T07:42:06+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v6.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "a3016f5442e28386ded73c43a32a5b68586dd1c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a3016f5442e28386ded73c43a32a5b68586dd1c4", - "reference": "a3016f5442e28386ded73c43a32a5b68586dd1c4", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.1.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-25T11:15:52+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "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 for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "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 for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "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 for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-10T07:21:04+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "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 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/process", - "version": "v6.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/a6506e99cfad7059b1ab5cab395854a0a0c21292", - "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v6.1.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-27T17:24:16+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.1.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239", - "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^2.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "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 writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.1.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:18:58+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v6.1.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "266636bb8f3fbdccc302491df7b3a1b9a8c238a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/266636bb8f3fbdccc302491df7b3a1b9a8c238a7", - "reference": "266636bb8f3fbdccc302491df7b3a1b9a8c238a7", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/service-contracts": "^1|^2|^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a way to profile code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.1.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-09-28T16:00:52+00:00" - }, - { - "name": "symfony/string", - "version": "v6.1.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "823f143370880efcbdfa2dbca946b3358c4707e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/823f143370880efcbdfa2dbca946b3358c4707e5", - "reference": "823f143370880efcbdfa2dbca946b3358c4707e5", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/translation-contracts": "<2.0" - }, - "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v6.1.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-10T09:34:31+00:00" + "time": "2023-09-08T19:10:08+00:00" } ], "aliases": [], @@ -2084,5 +281,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 47cc7b6b743c69af62ee461abc476494fb2a99a0..6683fcf3f885d290931a8f7b5c6ac25041368531 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -26,20 +26,20 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\AppInfo; +use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; +use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; +use OCA\EcloudAccounts\Listeners\TwoFactorStateChangedListener; +use OCA\EcloudAccounts\Listeners\UserChangedListener; +use OCA\EcloudAccounts\Service\LDAPConnectionService; +use OCA\TwoFactorTOTP\Event\StateChanged; use OCP\AppFramework\App; +use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; -use OCP\AppFramework\Bootstrap\IBootContext; -use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; -use OCA\EcloudAccounts\Service\LDAPConnectionService; -use OCP\User\Events\BeforeUserDeletedEvent; -use OCP\User\Events\UserChangedEvent; -use OCA\EcloudAccounts\Listeners\UserChangedListener; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; -use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; -use OCA\EcloudAccounts\Listeners\TwoFactorStateChangedListener; -use OCA\TwoFactorTOTP\Event\StateChanged; use OCP\IUserManager; +use OCP\User\Events\BeforeUserDeletedEvent; +use OCP\User\Events\UserChangedEvent; class Application extends App implements IBootstrap { public const APP_ID = 'ecloud-accounts'; diff --git a/lib/Command/Migrate2FASecrets.php b/lib/Command/Migrate2FASecrets.php index 1dd8cb389d616fda4e6f13177bafdd7b0bf85e88..79228be2ab96493144ab58e568c156f2665c04ef 100644 --- a/lib/Command/Migrate2FASecrets.php +++ b/lib/Command/Migrate2FASecrets.php @@ -4,12 +4,12 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Command; +use OCA\EcloudAccounts\Db\SSOMapper; +use OCA\EcloudAccounts\Db\TwoFactorMapper; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use OCA\EcloudAccounts\Db\SSOMapper; -use OCA\EcloudAccounts\Db\TwoFactorMapper; class Migrate2FASecrets extends Command { private SSOMapper $ssoMapper; diff --git a/lib/Command/MigrateWebmailAddressbooks.php b/lib/Command/MigrateWebmailAddressbooks.php index 0ce63dee66ec093b2b068e853e0676e3045dd9c8..b4e4ce6c299c715d72b0c505c05a2de785f67043 100644 --- a/lib/Command/MigrateWebmailAddressbooks.php +++ b/lib/Command/MigrateWebmailAddressbooks.php @@ -4,13 +4,13 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Command; +use OCA\EcloudAccounts\Db\WebmailMapper; +use OCP\IUser; +use OCP\IUserManager; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use OCA\EcloudAccounts\Db\WebmailMapper; -use OCP\IUserManager; -use OCP\IUser; class MigrateWebmailAddressbooks extends Command { private OutputInterface $commandOutput; diff --git a/lib/Controller/BetaUserController.php b/lib/Controller/BetaUserController.php index be1b970f83d308170ae8b7a807a9a800b0b05b39..651fe81f25033ca2141d6c0a045ae75d7ec93e8e 100644 --- a/lib/Controller/BetaUserController.php +++ b/lib/Controller/BetaUserController.php @@ -7,10 +7,10 @@ namespace OCA\EcloudAccounts\Controller; use OCP\AppFramework\Controller; -use OCP\IRequest; use OCP\IConfig; -use OCP\IUserManager; use OCP\IGroupManager; +use OCP\IRequest; +use OCP\IUserManager; use OCP\IUserSession; use OCP\Mail\IMailer; use OCP\Util; diff --git a/lib/Controller/ShopAccountController.php b/lib/Controller/ShopAccountController.php index 2b9325358e1b5604f8ad9ed71646d5a6ea9e2a27..bba48631614b02c3ea6703ac062224775d6c2725 100644 --- a/lib/Controller/ShopAccountController.php +++ b/lib/Controller/ShopAccountController.php @@ -6,11 +6,11 @@ namespace OCA\EcloudAccounts\Controller; use Exception; use OCA\EcloudAccounts\Service\ShopAccountService; -use OCP\IUserSession; -use OCP\IRequest; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; use OCP\ILogger; +use OCP\IRequest; +use OCP\IUserSession; class ShopAccountController extends Controller { private ShopAccountService $shopAccountService; diff --git a/lib/Controller/UserController.php b/lib/Controller/UserController.php index 975e7aa769cf80631fc1f3fa60f7e5f0d6988968..d5bf36516bcb1641b35131efa38b23a4c6ecabce 100644 --- a/lib/Controller/UserController.php +++ b/lib/Controller/UserController.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Controller; use Exception; -use OCP\IRequest; -use OCP\ILogger; -use OCP\IConfig; +use OCA\EcloudAccounts\Db\MailUsageMapper; +use OCA\EcloudAccounts\Service\UserService; use OCP\AppFramework\ApiController; use OCP\AppFramework\Http\DataResponse; -use OCA\EcloudAccounts\Service\UserService; -use OCA\EcloudAccounts\Db\MailUsageMapper; +use OCP\IConfig; +use OCP\ILogger; +use OCP\IRequest; class UserController extends ApiController { /** @var UserService */ @@ -87,6 +87,7 @@ class UserController extends ApiController { $user->setEMailAddress($email); $user->setQuota($quota); + $this->userService->sendWelcomeEmail($uid, $email); $this->config->setUserValue($uid, 'terms_of_service', 'tosAccepted', intval($tosAccepted)); $recoveryEmailUpdated = $this->userService->setRecoveryEmail($uid, $recoveryEmail); if (!$recoveryEmailUpdated) { diff --git a/lib/Db/MailUsageMapper.php b/lib/Db/MailUsageMapper.php index 649cda5ef5a52fefe71660a1583765555088f2ea..8b2da108881107b7cbbb15d03f5d82ca645df223 100644 --- a/lib/Db/MailUsageMapper.php +++ b/lib/Db/MailUsageMapper.php @@ -3,8 +3,8 @@ namespace OCA\EcloudAccounts\Db; use Exception; -use OCP\IDBConnection; use OCP\IConfig; +use OCP\IDBConnection; use OCP\ILogger; class MailUsageMapper { diff --git a/lib/Db/MailboxMapper.php b/lib/Db/MailboxMapper.php index 9d1104e18a3dec2b70bf46cf8a400d4c89195438..ff74ab5d5411f3f437eaff6d6c5b285c16e8e786 100644 --- a/lib/Db/MailboxMapper.php +++ b/lib/Db/MailboxMapper.php @@ -2,10 +2,10 @@ namespace OCA\EcloudAccounts\Db; +use Doctrine\DBAL\DriverManager; +use OCA\EcloudAccounts\Exception\DbConnectionParamsException; use OCP\IConfig; use OCP\ILogger; -use OCA\EcloudAccounts\Exception\DbConnectionParamsException; -use Doctrine\DBAL\DriverManager; use Throwable; class MailboxMapper { diff --git a/lib/Db/SSOMapper.php b/lib/Db/SSOMapper.php index a879660db0570c7d47d220ca0760ae039448a95f..3c04b982c936f762a661da7db15436e032c5ecfc 100644 --- a/lib/Db/SSOMapper.php +++ b/lib/Db/SSOMapper.php @@ -2,16 +2,16 @@ namespace OCA\EcloudAccounts\Db; -use OCP\IConfig; -use OCP\ILogger; -use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\DriverManager; use OCA\EcloudAccounts\AppInfo\Application; -use OCP\IUserManager; -use OCP\Security\ICrypto; -use OCP\IUser; use OCA\EcloudAccounts\Exception\DbConnectionParamsException; +use OCP\IConfig; +use OCP\ILogger; +use OCP\IUser; +use OCP\IUserManager; use OCP\L10N\IFactory; +use OCP\Security\ICrypto; class SSOMapper { private IConfig $config; diff --git a/lib/Db/WebmailMapper.php b/lib/Db/WebmailMapper.php index 92d43ac10eb477c115323d7e618c13fb830ea9f6..67e6b3c92bc16e9e8cea6fe1e226460336d4b679 100644 --- a/lib/Db/WebmailMapper.php +++ b/lib/Db/WebmailMapper.php @@ -2,18 +2,18 @@ namespace OCA\EcloudAccounts\Db; -use OCP\IConfig; -use OCP\ILogger; -use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Connection; -use OCA\EcloudAccounts\Exception\DbConnectionParamsException; -use Sabre\VObject\UUIDUtil; -use OCP\IUserManager; -use OCP\IUser; +use Doctrine\DBAL\DriverManager; use OCA\DAV\CardDAV\CardDavBackend; -use OCP\DB\QueryBuilder\IQueryBuilder; +use OCA\EcloudAccounts\Exception\DbConnectionParamsException; use OCA\SnappyMail\Util\SnappyMailHelper; +use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\IConfig; +use OCP\ILogger; +use OCP\IUser; +use OCP\IUserManager; use RainLoop\Providers\AddressBook\PdoAddressBook; +use Sabre\VObject\UUIDUtil; use Throwable; diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 9c6369c362a2514df3aeeb43b41917997e2354b0..86b5f99b5b704f684ecab0e7717dfd2b185b290c 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -4,14 +4,14 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Listeners; -use OCP\EventDispatcher\Event; -use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use \OCP\EventDispatcher\IEventListener; -use OCP\IUserSession; -use OCP\ISession; +use OCP\App\IAppManager; +use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; +use OCP\EventDispatcher\Event; use OCP\IConfig; use OCP\IRequest; -use OCP\App\IAppManager; +use OCP\ISession; +use OCP\IUserSession; class BeforeTemplateRenderedListener implements IEventListener { private $userSession; diff --git a/lib/Listeners/BeforeUserDeletedListener.php b/lib/Listeners/BeforeUserDeletedListener.php index 15e42d656294f9a99d2df466fe6f6c1760b26099..66d483d653860f5dac14534cd3df8da1b0596a32 100644 --- a/lib/Listeners/BeforeUserDeletedListener.php +++ b/lib/Listeners/BeforeUserDeletedListener.php @@ -5,15 +5,15 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Listeners; use Exception; +use OCA\EcloudAccounts\Exception\DeletingUserWithActiveSubscriptionException; +use OCA\EcloudAccounts\Service\LDAPConnectionService; +use OCA\EcloudAccounts\Service\ShopAccountService; +use OCA\EcloudAccounts\Service\UserService; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\ILogger; use OCP\IConfig; +use OCP\ILogger; use OCP\User\Events\BeforeUserDeletedEvent; -use OCA\EcloudAccounts\Service\LDAPConnectionService; -use OCA\EcloudAccounts\Service\ShopAccountService; -use OCA\EcloudAccounts\Service\UserService; -use OCA\EcloudAccounts\Exception\DeletingUserWithActiveSubscriptionException; class BeforeUserDeletedListener implements IEventListener { private $logger; diff --git a/lib/Listeners/TwoFactorStateChangedListener.php b/lib/Listeners/TwoFactorStateChangedListener.php index 9624abdb67cc7803c163576ec26b0118138df9bb..1c93df3378b4563b25b7ed0ad3041490dae9f795 100644 --- a/lib/Listeners/TwoFactorStateChangedListener.php +++ b/lib/Listeners/TwoFactorStateChangedListener.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Listeners; use Exception; +use OCA\EcloudAccounts\Db\SSOMapper; +use OCA\EcloudAccounts\Db\TwoFactorMapper; use OCA\TwoFactorTOTP\Event\StateChanged; +use OCP\App\IAppManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\App\IAppManager; -use OCA\EcloudAccounts\Db\SSOMapper; -use OCA\EcloudAccounts\Db\TwoFactorMapper; use OCP\ILogger; class TwoFactorStateChangedListener implements IEventListener { diff --git a/lib/Listeners/UserChangedListener.php b/lib/Listeners/UserChangedListener.php index a9eeb81cc3eeb8c55fd07a00f31e352d476003d1..48d2ddb95072e215490165a361dfaf01e1a2da2a 100644 --- a/lib/Listeners/UserChangedListener.php +++ b/lib/Listeners/UserChangedListener.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Listeners; use Exception; +use OCA\EcloudAccounts\Db\MailboxMapper; +use OCA\EcloudAccounts\Service\LDAPConnectionService; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\Util; use OCP\ILogger; use OCP\User\Events\UserChangedEvent; -use OCA\EcloudAccounts\Db\MailboxMapper; -use OCA\EcloudAccounts\Service\LDAPConnectionService; +use OCP\Util; class UserChangedListener implements IEventListener { private const QUOTA_FEATURE = 'quota'; diff --git a/lib/Service/BetaUserService.php b/lib/Service/BetaUserService.php index 3f6f84d293d31454a264ab2a84a2c8373f884761..1bac223c48bb5ea55bc6e28abf25299c9944417d 100644 --- a/lib/Service/BetaUserService.php +++ b/lib/Service/BetaUserService.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Service; +use OCP\App\IAppManager; use OCP\IConfig; use OCP\IGroupManager; use OCP\IUserSession; -use OCP\App\IAppManager; class BetaUserService { private $config; diff --git a/lib/Service/ShopAccountService.php b/lib/Service/ShopAccountService.php index 2fa12a0b2b076194d2cffdfb086db15d2b89b3da..6d5f9a349aa207e8cdae4cadb6a9ae5f710b6d07 100644 --- a/lib/Service/ShopAccountService.php +++ b/lib/Service/ShopAccountService.php @@ -4,9 +4,9 @@ namespace OCA\EcloudAccounts\Service; use Exception; +use OCA\EcloudAccounts\AppInfo\Application; use OCP\IConfig; use OCP\ILogger; -use OCA\EcloudAccounts\AppInfo\Application; class ShopAccountService { private IConfig $config; diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 11c649019e06b1e204fdb6fc7685cdcb148b4081..a95bd4085bdab1b28f6e1732195caf94cf968612 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -4,11 +4,15 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Service; -use OCP\IUserManager; -use OCP\IUser; +require __DIR__ . '/../../vendor/autoload.php'; + +use OCA\EcloudAccounts\AppInfo\Application; +use OCP\Defaults; use OCP\IConfig; use OCP\ILogger; -use OCA\EcloudAccounts\AppInfo\Application; +use OCP\IUser; +use OCP\IUserManager; +use OCP\Util; use UnexpectedValueException; @@ -23,14 +27,16 @@ class UserService { private $config; private $curl; + private Defaults $defaults; + private ILogger $logger; - - public function __construct($appName, IUserManager $userManager, IConfig $config, CurlService $curlService, ILogger $logger) { + public function __construct($appName, IUserManager $userManager, IConfig $config, CurlService $curlService, ILogger $logger, Defaults $defaults) { $this->userManager = $userManager; $this->config = $config; $this->appConfig = $this->config->getSystemValue($appName); $this->curl = $curlService; $this->logger = $logger; + $this->defaults = $defaults; } @@ -131,4 +137,80 @@ class UserService { return null; } + public function sendWelcomeEmail(string $uid, string $toEmail) : bool { + $sendgridAPIkey = $this->getSendGridAPIKey(); + if (empty($sendgridAPIkey)) { + $this->logger->warning("sendgrid_api_key is missing or empty.", ['app' => Application::APP_ID]); + return false; + } + + $templateIDs = $this->getSendGridTemplateIDs(); + if (empty($templateIDs)) { + $this->logger->warning("welcome_sendgrid_template_ids is missing or empty.", ['app' => Application::APP_ID]); + return false; + } + + $language = $this->getUserLanguage($uid); + $templateID = $templateIDs['en']; + if (isset($templateIDs[$language])) { + $templateID = $templateIDs[$language]; + } + + $fromEmail = Util::getDefaultEmailAddress('noreply'); + $fromName = $this->defaults->getName(); + + $user = $this->userManager->get($uid); + $toName = $user->getDisplayName(); + + $mainDomain = $this->getMainDomain(); + $email = $this->createSendGridEmail($fromEmail, $fromName, $toEmail, $toName, $templateID, $uid, $mainDomain); + + try { + return $this->sendEmailWithSendGrid($email, $sendgridAPIkey); + } catch (\Exception $e) { + $this->logger->error($e, ['app' => Application::APP_ID]); + return false; + } + } + private function getSendGridAPIKey() : string { + return $this->config->getSystemValue('sendgrid_api_key', ''); + } + private function getSendGridTemplateIDs() : array { + return $this->config->getSystemValue('welcome_sendgrid_template_ids', ''); + } + private function getMainDomain() : string { + return $this->config->getSystemValue('main_domain', ''); + } + private function getUserLanguage(string $username) : string { + return $this->config->getUserValue($username, 'core', 'lang', 'en'); + } + private function createSendGridEmail(string $fromEmail, string $fromName, string $toEmail, string $toName, string $templateID, string $username, string $mainDomain) : \SendGrid\Mail\Mail { + $email = new \SendGrid\Mail\Mail(); + $email->setFrom($fromEmail, $fromName); + $email->addTo($toEmail, $toName); + $email->setTemplateId($templateID); + $email->addDynamicTemplateDatas([ + "username" => $username, + "mail_domain" => $mainDomain, + "display_name" => $toName + ]); + return $email; + } + private function sendEmailWithSendGrid(\SendGrid\Mail\Mail $email, string $sendgridAPIkey): bool { + try { + $sendgrid = new \SendGrid($sendgridAPIkey); + $response = $sendgrid->send($email); + + if ($response->statusCode() !== 200) { + throw new \Exception("SendGrid API error - Status Code: " . $response->statusCode()); + } + return true; + } catch (\Exception $e) { + $this->logger->error( + "Error while sending sendEmailWithSendGrid: " . $e->getMessage(), + ['app' => Application::APP_ID] + ); + return false; + } + } } diff --git a/lib/Settings/BetaUserSetting.php b/lib/Settings/BetaUserSetting.php index 0b1301a2c94c2b6ad883e901c1d6637d87ce7a4b..2703f87f4b0bb13d55831210c7d55566deffe3d9 100644 --- a/lib/Settings/BetaUserSetting.php +++ b/lib/Settings/BetaUserSetting.php @@ -4,13 +4,13 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Settings; +use OCA\EcloudAccounts\Service\BetaUserService; use OCP\AppFramework\Http\TemplateResponse; -use OCP\IGroupManager; -use OCP\Settings\ISettings; +use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; +use OCP\IGroupManager; use OCP\ILogger; -use OCP\AppFramework\Services\IInitialState; -use OCA\EcloudAccounts\Service\BetaUserService; +use OCP\Settings\ISettings; class BetaUserSetting implements ISettings { protected $groupManager; diff --git a/lib/Settings/DeleteShopAccountSetting.php b/lib/Settings/DeleteShopAccountSetting.php index c79416a7668914bc754fd9eea4a4d4f624bcec67..9d4d1d65c85032f77540f871c50ff2db9e501d47 100644 --- a/lib/Settings/DeleteShopAccountSetting.php +++ b/lib/Settings/DeleteShopAccountSetting.php @@ -2,13 +2,13 @@ namespace OCA\EcloudAccounts\Settings; +use OCA\EcloudAccounts\Service\ShopAccountService; +use OCP\App\IAppManager; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IUserSession; use OCP\Settings\ISettings; use OCP\Util; -use OCA\EcloudAccounts\Service\ShopAccountService; -use OCP\App\IAppManager; class DeleteShopAccountSetting implements ISettings { private const DROP_ACCOUNT_APP_ID = 'drop_account';