diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 1b820255dd..e6236dd0de 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,15 +2,10 @@ namespace App\Providers; +use Illuminate\Support\ServiceProvider; use Ushahidi\Core\Tool\SiteManager; -use Ushahidi\Addons\Mteja\MtejaSource; use Ushahidi\Core\Tool\FeatureManager; -use Illuminate\Support\ServiceProvider; use Ushahidi\Core\Tool\OhanzeeResolver; -use Ushahidi\Core\Usecase\Export\Job\PostCount; -use Ushahidi\Addons\AfricasTalking\AfricasTalkingSource; -use Ushahidi\Contracts\Repository\Entity\PostRepository; -use Ushahidi\Contracts\Repository\Entity\UserRepository; use Ushahidi\Contracts\Repository\Entity\ConfigRepository; use Ushahidi\Modules\V5\Models\Post\Post as PostModel; use Ushahidi\Modules\V5\Repository\Category\CategoryRepository; @@ -52,13 +47,6 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - /** - * For now this configuration is temporary, - * should be moved to an isolated place within the addon directory - */ - $this->app['datasources']->extend('africastalking', AfricasTalkingSource::class); - - $this->app['datasources']->extend('mteja', MtejaSource::class); } /** @@ -88,83 +76,9 @@ public function register() return new OhanzeeResolver(); }); - $this->registerServicesFromAura(); - $this->registerFeatures(); } - public function registerServicesFromAura() - { - $this->app->singleton(UsecaseFactory::class, function ($app) { - // Just return it from AuraDI - return service('factory.usecase'); - }); - - $this->app->singleton(UserRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.user'); - }); - - $this->app->singleton(MessageRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.message'); - }); - - $this->app->singleton(ConfigRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.config'); - }); - - $this->app->singleton(ContactRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.contact'); - }); - - $this->app->singleton(PostRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.post'); - }); - - $this->app->singleton(ExportJobRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.export_job'); - }); - - $this->app->singleton(ExportBatchRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.export_batch'); - }); - - $this->app->singleton(TargetedSurveyStateRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.targeted_survey_state'); - }); - - $this->app->singleton(FormAttributeRepository::class, function ($app) { - // Just return it from AuraDI - return service('repository.form_attribute'); - }); - - $this->app->singleton(Verifier::class, function ($app) { - // Just return it from AuraDI - return service('tool.verifier'); - }); - - $this->app->singleton(PostCount::class, function ($app) { - return service('factory.usecase') - // Override action - ->get('export_jobs', 'post-count') - // Override authorizer - ->setAuthorizer(service('authorizer.external_auth')); // @todo remove the need for this? - }); - - $this->app->singleton(Export::class, function ($app) { - return service('factory.usecase') - ->get('posts_export', 'export') - ->setAuthorizer(service('authorizer.export_job')); - }); - } - public function registerFeatures() { $this->app->bind(CountryCodeRepository::class, EloquentCountryCodeRepository::class); diff --git a/bootstrap/app.php b/bootstrap/app.php index f2801adf6f..a8cc5dbff2 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -41,6 +41,27 @@ App\Exceptions\Handler::class ); +/* +|-------------------------------------------------------------------------- +| Extend Package Manifest +|-------------------------------------------------------------------------- +| +| This script extends the package manifest to include packages that are +| not discovered by Laravel by default. This is useful for packages +| that are not installed via composer, but are still in the app. +| This is the case for the Ushahidi Platform Addons loaded via +| the Wikimedia Composer Merge Plugin. +| +*/ + +$app->extend(\Illuminate\Foundation\PackageManifest::class, function ($manifest) { + return new \Ushahidi\Core\LaravelPackageManifest( + $manifest->files, + $manifest->basePath, + $manifest->manifestPath + ); +}); + /* |-------------------------------------------------------------------------- | Return The Application diff --git a/composer.json b/composer.json index a5683f2d9c..eb08fefb57 100644 --- a/composer.json +++ b/composer.json @@ -15,9 +15,7 @@ } ], "require": { - "php": ">=7.3 <7.4", - "abraham/twitteroauth": "^0.5.3", - "africastalking/africastalking": "^3.0", + "php": ">=7.3 <=7.4", "asm89/stack-cors": "^2.1", "doctrine/cache": "^1.6.2", "doctrine/dbal": "^2.0", @@ -36,18 +34,14 @@ "nyholm/psr7": "^1.5", "ohanzee/database": "dev-namespaces", "php-http/curl-client": "^2.2", - "php-opencloud/openstack": "^3.2", "predis/predis": "~1.1", "robmorgan/phinx": "~0.11.2", "sentry/sentry-laravel": "^1.9|^2.11", "symfony/event-dispatcher": "^5.4", "symfony/psr-http-message-bridge": "^2.0", "symm/gisconverter": "~1.0.5", - "twilio/sdk": "^5.15", - "ushahidi/gmail-support": "dev-mzima", "ushahidi/kohana-validation": "dev-master", "ushahidi/laravel-ckan-api": "dev-master", - "vonage/client": "^2.3", "wikimedia/composer-merge-plugin": "^2.0", "willdurand/negotiation": "^2.3" }, @@ -80,6 +74,7 @@ "http", "git" ], + "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, @@ -203,6 +198,12 @@ ], "snowboard-v5-serve": [ "snowboard http docs/api/v5/index.apib" + ], + "safe-update-dev": [ + "composer update --ignore-platform-req=php" + ], + "safe-install-dev": [ + "composer install --ignore-platform-req=php" ] }, "minimum-stability": "dev", diff --git a/composer.lock b/composer.lock index b61baca673..85e7d8e7d5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5f3aa179c8f61db12eb0c5955139f5cd", + "content-hash": "a6c299024d6c7bc97fb3edd11e3cd376", "packages": [ { "name": "abraham/twitteroauth", @@ -235,16 +235,16 @@ }, { "name": "aws/aws-crt-php", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/awslabs/aws-crt-php.git", - "reference": "1926277fc71d253dfa820271ac5987bdb193ccf5" + "reference": "2f1dc7b7eda080498be96a4a6d683a41583030e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/1926277fc71d253dfa820271ac5987bdb193ccf5", - "reference": "1926277fc71d253dfa820271ac5987bdb193ccf5", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/2f1dc7b7eda080498be96a4a6d683a41583030e9", + "reference": "2f1dc7b7eda080498be96a4a6d683a41583030e9", "shasum": "" }, "require": { @@ -283,22 +283,22 @@ ], "support": { "issues": "https://github.com/awslabs/aws-crt-php/issues", - "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.1" + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.2" }, - "time": "2023-03-24T20:22:19+00:00" + "time": "2023-07-20T16:49:55+00:00" }, { "name": "aws/aws-sdk-php", - "version": "3.273.0", + "version": "3.279.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "86078abfba43fce3f71a2714bb10a6b1baec1b78" + "reference": "ebd5e47c5be0425bb5cf4f80737850ed74767107" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/86078abfba43fce3f71a2714bb10a6b1baec1b78", - "reference": "86078abfba43fce3f71a2714bb10a6b1baec1b78", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/ebd5e47c5be0425bb5cf4f80737850ed74767107", + "reference": "ebd5e47c5be0425bb5cf4f80737850ed74767107", "shasum": "" }, "require": { @@ -307,11 +307,11 @@ "ext-pcre": "*", "ext-simplexml": "*", "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", - "guzzlehttp/promises": "^1.4.0", + "guzzlehttp/promises": "^1.4.0 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "mtdowling/jmespath.php": "^2.6", - "php": ">=5.5", - "psr/http-message": "^1.0" + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { "andrewsville/php-token-reflection": "^1.4", @@ -326,7 +326,7 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", + "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", "sebastian/comparator": "^1.2.3 || ^4.0", @@ -378,9 +378,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.273.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.279.2" }, - "time": "2023-06-13T18:22:02+00:00" + "time": "2023-08-18T18:13:09+00:00" }, { "name": "beheh/flaps", @@ -1055,16 +1055,16 @@ }, { "name": "defuse/php-encryption", - "version": "v2.3.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/defuse/php-encryption.git", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/f53396c2d34225064647a05ca76c1da9d99e5828", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828", "shasum": "" }, "require": { @@ -1073,7 +1073,8 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" + "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", + "yoast/phpunit-polyfills": "^2.0.0" }, "bin": [ "bin/generate-defuse-key" @@ -1115,9 +1116,9 @@ ], "support": { "issues": "https://github.com/defuse/php-encryption/issues", - "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" + "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" }, - "time": "2021-04-09T23:57:26+00:00" + "time": "2023-06-19T06:10:36+00:00" }, { "name": "doctrine/cache", @@ -1468,28 +1469,28 @@ }, { "name": "doctrine/inflector", - "version": "2.0.6", + "version": "2.0.8", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024" + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", - "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^10", + "doctrine/coding-standard": "^11.0", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.3", "phpunit/phpunit": "^8.5 || ^9.5", - "vimeo/psalm": "^4.25" + "vimeo/psalm": "^4.25 || ^5.4" }, "type": "library", "autoload": { @@ -1539,7 +1540,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.6" + "source": "https://github.com/doctrine/inflector/tree/2.0.8" }, "funding": [ { @@ -1555,7 +1556,7 @@ "type": "tidelift" } ], - "time": "2022-10-20T09:10:12+00:00" + "time": "2023-06-16T13:40:37+00:00" }, { "name": "doctrine/lexer", @@ -1635,16 +1636,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.2", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", "shasum": "" }, "require": { @@ -1684,7 +1685,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -1692,7 +1693,7 @@ "type": "github" } ], - "time": "2022-09-10T18:51:20+00:00" + "time": "2023-08-10T19:36:49+00:00" }, { "name": "egulias/email-validator", @@ -1963,178 +1964,6 @@ "abandoned": true, "time": "2022-02-23T14:25:13+00:00" }, - { - "name": "google/apiclient", - "version": "v2.14.0", - "source": { - "type": "git", - "url": "https://github.com/googleapis/google-api-php-client.git", - "reference": "789c8b07cad97f420ac0467c782036f955a2ad89" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/789c8b07cad97f420ac0467c782036f955a2ad89", - "reference": "789c8b07cad97f420ac0467c782036f955a2ad89", - "shasum": "" - }, - "require": { - "firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0||~6.0", - "google/apiclient-services": "~0.200", - "google/auth": "^1.10", - "guzzlehttp/guzzle": "~5.3.3||~6.0||~7.0", - "guzzlehttp/psr7": "^1.8.4||^2.2.1", - "monolog/monolog": "^1.17||^2.0||^3.0", - "php": "^5.6|^7.0|^8.0", - "phpseclib/phpseclib": "~2.0||^3.0.2" - }, - "require-dev": { - "cache/filesystem-adapter": "^0.3.2|^1.1", - "composer/composer": "^1.10.22", - "phpcompatibility/php-compatibility": "^9.2", - "phpspec/prophecy-phpunit": "^1.1||^2.0", - "phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/css-selector": "~2.1", - "symfony/dom-crawler": "~2.1", - "yoast/phpunit-polyfills": "^1.0" - }, - "suggest": { - "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "files": [ - "src/aliases.php" - ], - "psr-4": { - "Google\\": "src/" - }, - "classmap": [ - "src/aliases.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "Client library for Google APIs", - "homepage": "http://developers.google.com/api-client-library/php", - "keywords": [ - "google" - ], - "support": { - "issues": "https://github.com/googleapis/google-api-php-client/issues", - "source": "https://github.com/googleapis/google-api-php-client/tree/v2.14.0" - }, - "time": "2023-05-11T21:54:55+00:00" - }, - { - "name": "google/apiclient-services", - "version": "v0.302.0", - "source": { - "type": "git", - "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "ac872f59a7b4631b12628fe990c167d18a71c783" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ac872f59a7b4631b12628fe990c167d18a71c783", - "reference": "ac872f59a7b4631b12628fe990c167d18a71c783", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "^5.7||^8.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "autoload.php" - ], - "psr-4": { - "Google\\Service\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "Client library for Google APIs", - "homepage": "http://developers.google.com/api-client-library/php", - "keywords": [ - "google" - ], - "support": { - "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.302.0" - }, - "time": "2023-05-16T01:08:12+00:00" - }, - { - "name": "google/auth", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/googleapis/google-auth-library-php.git", - "reference": "f1f0d0319e2e7750ebfaa523c78819792a9ed9f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/f1f0d0319e2e7750ebfaa523c78819792a9ed9f7", - "reference": "f1f0d0319e2e7750ebfaa523c78819792a9ed9f7", - "shasum": "" - }, - "require": { - "firebase/php-jwt": "^5.5||^6.0", - "guzzlehttp/guzzle": "^6.2.1|^7.0", - "guzzlehttp/psr7": "^1.7|^2.0", - "php": "^7.1||^8.0", - "psr/cache": "^1.0|^2.0|^3.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "guzzlehttp/promises": "0.1.1|^1.3", - "kelvinmo/simplejwt": "0.7.0", - "phpseclib/phpseclib": "^2.0.31||^3.0", - "phpspec/prophecy-phpunit": "^1.1||^2.0", - "phpunit/phpunit": "^7.5||^9.0.0", - "sebastian/comparator": ">=1.2.3", - "squizlabs/php_codesniffer": "^3.5" - }, - "suggest": { - "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2." - }, - "type": "library", - "autoload": { - "psr-4": { - "Google\\Auth\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "Google Auth Library for PHP", - "homepage": "http://github.com/google/google-auth-library-php", - "keywords": [ - "Authentication", - "google", - "oauth2" - ], - "support": { - "docs": "https://googleapis.github.io/google-auth-library-php/main/", - "issues": "https://github.com/googleapis/google-auth-library-php/issues", - "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.26.0" - }, - "time": "2023-04-05T15:11:57+00:00" - }, { "name": "graham-campbell/result-type", "version": "v1.1.1", @@ -2325,29 +2154,33 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -2384,7 +2217,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.3" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -2400,20 +2233,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T12:31:43+00:00" + "time": "2023-08-03T15:11:55+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/8bd7c33a0734ae1c5d074360512beb716bef3f77", + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77", "shasum": "" }, "require": { @@ -2500,7 +2333,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.0" }, "funding": [ { @@ -2516,7 +2349,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-08-03T15:06:02+00:00" }, { "name": "guzzlehttp/uri-template", @@ -2660,6 +2493,80 @@ }, "time": "2021-07-21T13:50:14+00:00" }, + { + "name": "infobip-community/infobip-api-php-sdk", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/infobip-community/infobip-api-php-sdk.git", + "reference": "ed1a39a958a1e52ffa7676e683111344bbf9b008" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infobip-community/infobip-api-php-sdk/zipball/ed1a39a958a1e52ffa7676e683111344bbf9b008", + "reference": "ed1a39a958a1e52ffa7676e683111344bbf9b008", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^7.4", + "myclabs/php-enum": "^1.7", + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "ergebnis/phpstan-rules": "^1.0", + "fakerphp/faker": "^1.19", + "friendsofphp/php-cs-fixer": "3.4.*", + "illuminate/support": "7.*", + "mockery/mockery": "^1.3", + "overtrue/phplint": "^3.0", + "phpoption/phpoption": "^1.8", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-mockery": "^1.0", + "phpunit/phpunit": "^8.5", + "vlucas/phpdotenv": "^4.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Infobip\\Support\\Laravel\\InfobipServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Helpers/functions.php" + ], + "psr-4": { + "Infobip\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frano Sasvari", + "email": "sasvari.frano@gmail.com" + } + ], + "description": "PHP SDK package for Infobip API", + "homepage": "https://github.com/infobip-community/infobip-api-php-sdk", + "keywords": [ + "Infobip", + "api", + "client", + "package", + "php", + "sdk" + ], + "support": { + "issues": "https://github.com/infobip-community/infobip-api-php-sdk/issues", + "source": "https://github.com/infobip-community/infobip-api-php-sdk/tree/v1.1.0" + }, + "time": "2022-04-06T14:24:17+00:00" + }, { "name": "intercom/intercom-php", "version": "4.4.3", @@ -3247,16 +3154,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" + "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902", + "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902", "shasum": "" }, "require": { @@ -3303,7 +3210,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-01-30T18:31:20+00:00" + "time": "2023-07-14T13:56:28+00:00" }, { "name": "laravel/tinker", @@ -3818,104 +3725,18 @@ ], "time": "2022-07-02T13:51:38+00:00" }, - { - "name": "league/html-to-markdown", - "version": "4.10.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/html-to-markdown.git", - "reference": "0868ae7a552e809e5cd8f93ba022071640408e88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/0868ae7a552e809e5cd8f93ba022071640408e88", - "reference": "0868ae7a552e809e5cd8f93ba022071640408e88", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xml": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "mikehaertl/php-shellcommand": "~1.1.0", - "phpunit/phpunit": "^4.8|^5.7", - "scrutinizer/ocular": "~1.1" - }, - "bin": [ - "bin/html-to-markdown" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.10-dev" - } - }, - "autoload": { - "psr-4": { - "League\\HTMLToMarkdown\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Lead Developer" - }, - { - "name": "Nick Cernis", - "email": "nick@cern.is", - "homepage": "http://modernnerd.net", - "role": "Original Author" - } - ], - "description": "An HTML-to-markdown conversion helper for PHP", - "homepage": "https://github.com/thephpleague/html-to-markdown", - "keywords": [ - "html", - "markdown" - ], - "support": { - "issues": "https://github.com/thephpleague/html-to-markdown/issues", - "source": "https://github.com/thephpleague/html-to-markdown/tree/4.10.0" - }, - "funding": [ - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - } - ], - "time": "2020-07-01T00:34:03+00:00" - }, { "name": "league/mime-type-detection", - "version": "1.11.0", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "c7f2872fb273bf493811473dafc88d60ae829f48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/c7f2872fb273bf493811473dafc88d60ae829f48", + "reference": "c7f2872fb273bf493811473dafc88d60ae829f48", "shasum": "" }, "require": { @@ -3946,7 +3767,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.12.0" }, "funding": [ { @@ -3958,20 +3779,20 @@ "type": "tidelift" } ], - "time": "2022-04-17T13:12:02+00:00" + "time": "2023-08-03T07:14:11+00:00" }, { "name": "league/oauth2-server", - "version": "8.4.1", + "version": "8.4.2", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "eed31d86d8cc8e6e9c9f58fbb2113494f8b41e24" + "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/eed31d86d8cc8e6e9c9f58fbb2113494f8b41e24", - "reference": "eed31d86d8cc8e6e9c9f58fbb2113494f8b41e24", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/007dc5f6c0151a73b133fec36c9686cc956209d3", + "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3", "shasum": "" }, "require": { @@ -4038,7 +3859,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.1" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.2" }, "funding": [ { @@ -4046,7 +3867,7 @@ "type": "github" } ], - "time": "2023-03-22T11:47:53+00:00" + "time": "2023-08-02T22:54:39+00:00" }, { "name": "league/uri", @@ -4378,27 +4199,94 @@ }, "time": "2021-06-14T00:11:39+00:00" }, + { + "name": "myclabs/php-enum", + "version": "1.8.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^4.6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "support": { + "issues": "https://github.com/myclabs/php-enum/issues", + "source": "https://github.com/myclabs/php-enum/tree/1.8.4" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", + "type": "tidelift" + } + ], + "time": "2022-08-04T09:53:51+00:00" + }, { "name": "nesbot/carbon", - "version": "2.67.0", + "version": "2.69.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8" + "reference": "4308217830e4ca445583a37d1bf4aff4153fa81c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8", - "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4308217830e4ca445583a37d1bf4aff4153fa81c", + "reference": "4308217830e4ca445583a37d1bf4aff4153fa81c", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, + "provide": { + "psr/clock-implementation": "1.0" + }, "require-dev": { "doctrine/dbal": "^2.0 || ^3.1.4", "doctrine/orm": "^2.7", @@ -4478,7 +4366,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T22:09:47+00:00" + "time": "2023-08-03T09:00:52+00:00" }, { "name": "netresearch/jsonmapper", @@ -4533,16 +4421,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -4583,9 +4471,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "nyholm/psr7", @@ -5060,16 +4948,16 @@ }, { "name": "php-http/discovery", - "version": "1.18.1", + "version": "1.19.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "f258b3a1d16acb7b21f3b42d7a2494a733365237" + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/f258b3a1d16acb7b21f3b42d7a2494a733365237", - "reference": "f258b3a1d16acb7b21f3b42d7a2494a733365237", + "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", "shasum": "" }, "require": { @@ -5132,9 +5020,9 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.18.1" + "source": "https://github.com/php-http/discovery/tree/1.19.1" }, - "time": "2023-05-17T08:53:10+00:00" + "time": "2023-07-11T07:02:26+00:00" }, { "name": "php-http/httplug", @@ -5376,16 +5264,16 @@ }, { "name": "php-opencloud/openstack", - "version": "v3.2.2", + "version": "v3.2.3", "source": { "type": "git", "url": "https://github.com/php-opencloud/openstack.git", - "reference": "2a534cafa47a67a6a0aed8e9ba067e05561c649c" + "reference": "aef36abf773bd1992cc416a4c8da951743c1d8e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/2a534cafa47a67a6a0aed8e9ba067e05561c649c", - "reference": "2a534cafa47a67a6a0aed8e9ba067e05561c649c", + "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/aef36abf773bd1992cc416a4c8da951743c1d8e4", + "reference": "aef36abf773bd1992cc416a4c8da951743c1d8e4", "shasum": "" }, "require": { @@ -5398,6 +5286,7 @@ "friendsofphp/php-cs-fixer": "^2.18", "php-coveralls/php-coveralls": "^2.0", "php-parallel-lint/php-parallel-lint": "^1.2", + "phpspec/prophecy": "^1.17", "phpunit/phpunit": "^8.0", "psr/log": "^1.0" }, @@ -5438,9 +5327,9 @@ ], "support": { "issues": "https://github.com/php-opencloud/openstack/issues", - "source": "https://github.com/php-opencloud/openstack/tree/v3.2.2" + "source": "https://github.com/php-opencloud/openstack/tree/v3.2.3" }, - "time": "2023-04-08T09:13:19+00:00" + "time": "2023-06-24T18:13:37+00:00" }, { "name": "phpoption/phpoption", @@ -5519,16 +5408,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.20", + "version": "3.0.21", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67" + "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", - "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1", + "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1", "shasum": "" }, "require": { @@ -5609,7 +5498,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.20" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.21" }, "funding": [ { @@ -5625,7 +5514,7 @@ "type": "tidelift" } ], - "time": "2023-06-13T06:30:34+00:00" + "time": "2023-07-09T15:24:48+00:00" }, { "name": "predis/predis", @@ -5694,31 +5583,26 @@ "time": "2022-01-05T17:46:08+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "psr/clock", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.0 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\Clock\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5728,19 +5612,23 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", "keywords": [ - "cache", + "clock", + "now", "psr", - "psr-6" + "psr-20", + "time" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2022-11-25T14:36:26+00:00" }, { "name": "psr/container", @@ -6103,16 +5991,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.18", + "version": "v0.11.20", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec" + "reference": "0fa27040553d1d280a67a4393194df5228afea5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0fa27040553d1d280a67a4393194df5228afea5b", + "reference": "0fa27040553d1d280a67a4393194df5228afea5b", "shasum": "" }, "require": { @@ -6173,9 +6061,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.18" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.20" }, - "time": "2023-05-23T02:31:11+00:00" + "time": "2023-07-31T14:32:22+00:00" }, { "name": "ralouphie/getallheaders", @@ -6484,21 +6372,21 @@ }, { "name": "sentry/sdk", - "version": "3.4.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php-sdk.git", - "reference": "7f1e04a5380a91e41a1a68c363ec19f88619a870" + "reference": "cd91b752f07c4bab9fb3b173f81af68a78a78d6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/7f1e04a5380a91e41a1a68c363ec19f88619a870", - "reference": "7f1e04a5380a91e41a1a68c363ec19f88619a870", + "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/cd91b752f07c4bab9fb3b173f81af68a78a78d6d", + "reference": "cd91b752f07c4bab9fb3b173f81af68a78a78d6d", "shasum": "" }, "require": { "http-interop/http-factory-guzzle": "^1.0", - "sentry/sentry": "^3.18", + "sentry/sentry": "^3.19", "symfony/http-client": "^4.3|^5.0|^6.0" }, "type": "metapackage", @@ -6525,7 +6413,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php-sdk/issues", - "source": "https://github.com/getsentry/sentry-php-sdk/tree/3.4.0" + "source": "https://github.com/getsentry/sentry-php-sdk/tree/3.5.0" }, "funding": [ { @@ -6537,20 +6425,20 @@ "type": "custom" } ], - "time": "2023-05-22T16:02:39+00:00" + "time": "2023-06-12T17:50:36+00:00" }, { "name": "sentry/sentry", - "version": "3.19.1", + "version": "3.21.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "dd1057fb37d4484ebb2d1bc9b05fa5969c078436" + "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/dd1057fb37d4484ebb2d1bc9b05fa5969c078436", - "reference": "dd1057fb37d4484ebb2d1bc9b05fa5969c078436", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/624aafc22b84b089ffa43b71fb01e0096505ec4f", + "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f", "shasum": "" }, "require": { @@ -6594,11 +6482,6 @@ "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler." }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.13.x-dev" - } - }, "autoload": { "files": [ "src/functions.php" @@ -6630,7 +6513,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.19.1" + "source": "https://github.com/getsentry/sentry-php/tree/3.21.0" }, "funding": [ { @@ -6642,7 +6525,7 @@ "type": "custom" } ], - "time": "2023-05-25T06:19:09+00:00" + "time": "2023-07-31T15:31:24+00:00" }, { "name": "sentry/sentry-laravel", @@ -6810,16 +6693,16 @@ }, { "name": "symfony/config", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "2a6b1111d038adfa15d52c0871e540f3b352d1e4" + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/2a6b1111d038adfa15d52c0871e540f3b352d1e4", - "reference": "2a6b1111d038adfa15d52c0871e540f3b352d1e4", + "url": "https://api.github.com/repos/symfony/config/zipball/8109892f27beed9252bd1f1c1880aeb4ad842650", + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650", "shasum": "" }, "require": { @@ -6869,7 +6752,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.4.21" + "source": "https://github.com/symfony/config/tree/v5.4.26" }, "funding": [ { @@ -6885,20 +6768,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-19T20:21:11+00:00" }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273", + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273", "shasum": "" }, "require": { @@ -6968,7 +6851,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.26" }, "funding": [ { @@ -6984,20 +6867,20 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-07-19T20:11:33+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d" + "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/95f3c7468db1da8cc360b24fa2a26e7cefcb355d", - "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", + "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", "shasum": "" }, "require": { @@ -7034,7 +6917,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.21" + "source": "https://github.com/symfony/css-selector/tree/v5.4.26" }, "funding": [ { @@ -7050,7 +6933,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-07T06:10:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -7121,16 +7004,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946" + "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946", - "reference": "c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/b26719213a39c9ba57520cbc5e52bfcc5e8d92f9", + "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9", "shasum": "" }, "require": { @@ -7172,7 +7055,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.24" + "source": "https://github.com/symfony/error-handler/tree/v5.4.26" }, "funding": [ { @@ -7188,20 +7071,20 @@ "type": "tidelift" } ], - "time": "2023-05-02T16:13:31+00:00" + "time": "2023-07-16T16:48:57+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { @@ -7257,7 +7140,7 @@ "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/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -7273,7 +7156,7 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -7356,16 +7239,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.23", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { @@ -7400,7 +7283,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.23" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -7416,20 +7299,20 @@ "type": "tidelift" } ], - "time": "2023-03-02T11:38:35+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", "shasum": "" }, "require": { @@ -7463,7 +7346,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v5.4.27" }, "funding": [ { @@ -7479,20 +7362,20 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-07-31T08:02:31+00:00" }, { "name": "symfony/http-client", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "9e89ac4c9dfe29f4ed2b10a36e62720286632ad6" + "reference": "19d48ef7f38e5057ed1789a503cd3eccef039bce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/9e89ac4c9dfe29f4ed2b10a36e62720286632ad6", - "reference": "9e89ac4c9dfe29f4ed2b10a36e62720286632ad6", + "url": "https://api.github.com/repos/symfony/http-client/zipball/19d48ef7f38e5057ed1789a503cd3eccef039bce", + "reference": "19d48ef7f38e5057ed1789a503cd3eccef039bce", "shasum": "" }, "require": { @@ -7554,7 +7437,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.24" + "source": "https://github.com/symfony/http-client/tree/v5.4.26" }, "funding": [ { @@ -7570,7 +7453,7 @@ "type": "tidelift" } ], - "time": "2023-05-07T13:11:28+00:00" + "time": "2023-07-03T12:14:50+00:00" }, { "name": "symfony/http-client-contracts", @@ -7652,16 +7535,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5" + "reference": "e7793151e99dc2ac1352ff3735d100fb3b3bfc08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5", - "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793151e99dc2ac1352ff3735d100fb3b3bfc08", + "reference": "e7793151e99dc2ac1352ff3735d100fb3b3bfc08", "shasum": "" }, "require": { @@ -7708,7 +7591,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.24" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.26" }, "funding": [ { @@ -7724,20 +7607,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T07:21:23+00:00" + "time": "2023-07-21T11:30:15+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.24", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1" + "reference": "9f5624816c0b8d92f85666ac7ed2825a18fcd899" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1", - "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f5624816c0b8d92f85666ac7ed2825a18fcd899", + "reference": "9f5624816c0b8d92f85666ac7ed2825a18fcd899", "shasum": "" }, "require": { @@ -7820,7 +7703,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.24" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.27" }, "funding": [ { @@ -7836,20 +7719,20 @@ "type": "tidelift" } ], - "time": "2023-05-27T08:06:30+00:00" + "time": "2023-07-31T10:18:38+00:00" }, { "name": "symfony/mime", - "version": "v5.4.23", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3" + "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ae0a1032a450a3abf305ee44fc55ed423fbf16e3", - "reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3", + "url": "https://api.github.com/repos/symfony/mime/zipball/2ea06dfeee20000a319d8407cea1d47533d5a9d2", + "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2", "shasum": "" }, "require": { @@ -7864,7 +7747,7 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<4.4", - "symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6" + "symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", @@ -7872,7 +7755,7 @@ "symfony/dependency-injection": "^4.4|^5.0|^6.0", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" + "symfony/serializer": "^5.4.26|~6.2.13|^6.3.2" }, "type": "library", "autoload": { @@ -7904,7 +7787,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.23" + "source": "https://github.com/symfony/mime/tree/v5.4.26" }, "funding": [ { @@ -7920,7 +7803,7 @@ "type": "tidelift" } ], - "time": "2023-04-19T09:49:13+00:00" + "time": "2023-07-27T06:29:31+00:00" }, { "name": "symfony/options-resolver", @@ -8810,16 +8693,16 @@ }, { "name": "symfony/process", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64" + "reference": "1a44dc377ec86a50fab40d066cd061e28a6b482f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64", + "url": "https://api.github.com/repos/symfony/process/zipball/1a44dc377ec86a50fab40d066cd061e28a6b482f", + "reference": "1a44dc377ec86a50fab40d066cd061e28a6b482f", "shasum": "" }, "require": { @@ -8852,7 +8735,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.24" + "source": "https://github.com/symfony/process/tree/v5.4.26" }, "funding": [ { @@ -8868,25 +8751,26 @@ "type": "tidelift" } ], - "time": "2023-05-17T11:26:05+00:00" + "time": "2023-07-12T15:44:31+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.2.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993" + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", "symfony/http-foundation": "^5.4 || ^6.0" }, "require-dev": { @@ -8905,7 +8789,7 @@ "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-main": "2.3-dev" } }, "autoload": { @@ -8940,7 +8824,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" }, "funding": [ { @@ -8956,20 +8840,20 @@ "type": "tidelift" } ], - "time": "2023-04-21T08:40:19+00:00" + "time": "2023-07-26T11:53:26+00:00" }, { "name": "symfony/routing", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d" + "reference": "853fc7df96befc468692de0a48831b38f04d2cb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/c2ac11eb34947999b7c38fb4c835a57306907e6d", - "reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d", + "url": "https://api.github.com/repos/symfony/routing/zipball/853fc7df96befc468692de0a48831b38f04d2cb2", + "reference": "853fc7df96befc468692de0a48831b38f04d2cb2", "shasum": "" }, "require": { @@ -9030,7 +8914,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.22" + "source": "https://github.com/symfony/routing/tree/v5.4.26" }, "funding": [ { @@ -9046,7 +8930,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T14:59:20+00:00" + "time": "2023-07-24T13:28:37+00:00" }, { "name": "symfony/service-contracts", @@ -9133,16 +9017,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -9199,7 +9083,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -9215,7 +9099,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" }, { "name": "symfony/translation", @@ -9394,16 +9278,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3" + "reference": "e706c99b4a6f4d9383b52b80dd8c74880501e314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3", - "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e706c99b4a6f4d9383b52b80dd8c74880501e314", + "reference": "e706c99b4a6f4d9383b52b80dd8c74880501e314", "shasum": "" }, "require": { @@ -9417,6 +9301,7 @@ "require-dev": { "ext-iconv": "*", "symfony/console": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/process": "^4.4|^5.0|^6.0", "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" @@ -9462,7 +9347,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.24" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.26" }, "funding": [ { @@ -9478,7 +9363,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:05:00+00:00" + "time": "2023-07-13T07:32:46+00:00" }, { "name": "symfony/yaml", @@ -9704,67 +9589,6 @@ }, "time": "2020-02-05T19:55:13+00:00" }, - { - "name": "ushahidi/gmail-support", - "version": "dev-mzima", - "source": { - "type": "git", - "url": "https://github.com/ushahidi/gmail-support.git", - "reference": "6c0407fd4af349de88872b3ea030499964561914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ushahidi/gmail-support/zipball/6c0407fd4af349de88872b3ea030499964561914", - "reference": "6c0407fd4af349de88872b3ea030499964561914", - "shasum": "" - }, - "require": { - "ext-json": "*", - "google/apiclient": "^2.0", - "illuminate/mail": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "league/html-to-markdown": "^4.10", - "nesbot/carbon": "^1.3 || ^2.3", - "zbateson/mail-mime-parser": "^1.2" - }, - "require-dev": { - "orchestra/testbench": "^3.5 || ^4.0 || ^5.0", - "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Ushahidi\\Gmail\\GmailServiceProvider" - ], - "aliases": { - "Gmail": "Ushahidi\\Gmail\\Facades\\Gmail" - } - } - }, - "autoload": { - "psr-4": { - "Ushahidi\\Gmail\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wisdom Ebong", - "email": "wisdomaebong@gmail.com" - } - ], - "description": "Support Gmail as Data Provider", - "support": { - "chat": "https://gitter.im/ushahidi/Community", - "issues": "https://github.com/ushahidi/gmail-support", - "source": "https://github.com/ushahidi/gmail-support" - }, - "time": "2022-12-12T23:58:33+00:00" - }, { "name": "ushahidi/kohana-validation", "version": "dev-master", @@ -10365,210 +10189,6 @@ "source": "https://github.com/willdurand/Negotiation/tree/2.x" }, "time": "2017-05-14T17:21:12+00:00" - }, - { - "name": "zbateson/mail-mime-parser", - "version": "1.3.3", - "source": { - "type": "git", - "url": "https://github.com/zbateson/mail-mime-parser.git", - "reference": "244b70963945293b5225da2553239a06987d1a11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/244b70963945293b5225da2553239a06987d1a11", - "reference": "244b70963945293b5225da2553239a06987d1a11", - "shasum": "" - }, - "require": { - "guzzlehttp/psr7": "^1.7.0|^2.0", - "php": ">=5.4", - "zbateson/mb-wrapper": "^1.0.1", - "zbateson/stream-decorators": "^1.0.6" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6.0", - "sanmai/phpunit-legacy-adapter": "^6.3 || ^8" - }, - "suggest": { - "ext-iconv": "For best support/performance", - "ext-mbstring": "For best support/performance" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZBateson\\MailMimeParser\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Zaahid Bateson" - }, - { - "name": "Contributors", - "homepage": "https://github.com/zbateson/mail-mime-parser/graphs/contributors" - } - ], - "description": "MIME email message parser", - "homepage": "https://mail-mime-parser.org", - "keywords": [ - "MimeMailParser", - "email", - "mail", - "mailparse", - "mime", - "mimeparse", - "parser", - "php-imap" - ], - "support": { - "docs": "https://mail-mime-parser.org/#usage-guide", - "issues": "https://github.com/zbateson/mail-mime-parser/issues", - "source": "https://github.com/zbateson/mail-mime-parser" - }, - "funding": [ - { - "url": "https://github.com/zbateson", - "type": "github" - } - ], - "time": "2021-11-06T00:47:49+00:00" - }, - { - "name": "zbateson/mb-wrapper", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/zbateson/mb-wrapper.git", - "reference": "faf35dddfacfc5d4d5f9210143eafd7a7fe74334" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/faf35dddfacfc5d4d5f9210143eafd7a7fe74334", - "reference": "faf35dddfacfc5d4d5f9210143eafd7a7fe74334", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-iconv": "^1.9", - "symfony/polyfill-mbstring": "^1.9" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "*", - "phpstan/phpstan": "*", - "phpunit/phpunit": "<=9.0" - }, - "suggest": { - "ext-iconv": "For best support/performance", - "ext-mbstring": "For best support/performance" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZBateson\\MbWrapper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Zaahid Bateson" - } - ], - "description": "Wrapper for mbstring with fallback to iconv for encoding conversion and string manipulation", - "keywords": [ - "charset", - "encoding", - "http", - "iconv", - "mail", - "mb", - "mb_convert_encoding", - "mbstring", - "mime", - "multibyte", - "string" - ], - "support": { - "issues": "https://github.com/zbateson/mb-wrapper/issues", - "source": "https://github.com/zbateson/mb-wrapper/tree/1.2.0" - }, - "funding": [ - { - "url": "https://github.com/zbateson", - "type": "github" - } - ], - "time": "2023-01-11T23:05:44+00:00" - }, - { - "name": "zbateson/stream-decorators", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/zbateson/stream-decorators.git", - "reference": "783b034024fda8eafa19675fb2552f8654d3a3e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/783b034024fda8eafa19675fb2552f8654d3a3e9", - "reference": "783b034024fda8eafa19675fb2552f8654d3a3e9", - "shasum": "" - }, - "require": { - "guzzlehttp/psr7": "^1.9 | ^2.0", - "php": ">=7.2", - "zbateson/mb-wrapper": "^1.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "*", - "phpstan/phpstan": "*", - "phpunit/phpunit": "<10.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZBateson\\StreamDecorators\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Zaahid Bateson" - } - ], - "description": "PHP psr7 stream decorators for mime message part streams", - "keywords": [ - "base64", - "charset", - "decorators", - "mail", - "mime", - "psr7", - "quoted-printable", - "stream", - "uuencode" - ], - "support": { - "issues": "https://github.com/zbateson/stream-decorators/issues", - "source": "https://github.com/zbateson/stream-decorators/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/zbateson", - "type": "github" - } - ], - "time": "2023-05-30T22:51:52+00:00" } ], "packages-dev": [ @@ -11234,16 +10854,16 @@ }, { "name": "filp/whoops", - "version": "2.15.2", + "version": "2.15.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", "shasum": "" }, "require": { @@ -11293,7 +10913,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.2" + "source": "https://github.com/filp/whoops/tree/2.15.3" }, "funding": [ { @@ -11301,7 +10921,7 @@ "type": "github" } ], - "time": "2023-04-12T12:00:00+00:00" + "time": "2023-07-13T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -11454,38 +11074,40 @@ }, { "name": "mockery/mockery", - "version": "1.5.1", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" + "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", - "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "url": "https://api.github.com/repos/mockery/mockery/zipball/b8e0bb7d8c604046539c1115994632c74dcb361e", + "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.10", + "psalm/plugin-phpunit": "^0.18.4", + "symplify/easy-coding-standard": "^11.5.0", + "vimeo/psalm": "^4.30" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Mockery": "library/" + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", @@ -11496,12 +11118,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -11519,10 +11149,13 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.1" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2022-09-07T15:32:08+00:00" + "time": "2023-08-09T00:03:52+00:00" }, { "name": "myclabs/deep-copy", @@ -11783,16 +11416,16 @@ }, { "name": "php-coveralls/php-coveralls", - "version": "v2.5.3", + "version": "v2.6.0", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "9d8243bbf0e053333692857c98fab7cfba0d60a9" + "reference": "9e88d7d38e9eab7c675da674481784321ea7a9bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/9d8243bbf0e053333692857c98fab7cfba0d60a9", - "reference": "9d8243bbf0e053333692857c98fab7cfba0d60a9", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/9e88d7d38e9eab7c675da674481784321ea7a9bc", + "reference": "9e88d7d38e9eab7c675da674481784321ea7a9bc", "shasum": "" }, "require": { @@ -11860,9 +11493,9 @@ ], "support": { "issues": "https://github.com/php-coveralls/php-coveralls/issues", - "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.5.3" + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.6.0" }, - "time": "2022-09-12T20:47:09+00:00" + "time": "2023-07-16T08:39:10+00:00" }, { "name": "php-mock/php-mock", @@ -12428,16 +12061,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -12493,7 +12126,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -12501,7 +12135,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -12746,16 +12380,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.9", + "version": "9.6.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a9aceaf20a682aeacf28d582654a1670d8826778" + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778", - "reference": "a9aceaf20a682aeacf28d582654a1670d8826778", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", "shasum": "" }, "require": { @@ -12829,7 +12463,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" }, "funding": [ { @@ -12845,7 +12479,7 @@ "type": "tidelift" } ], - "time": "2023-06-11T06:13:56+00:00" + "time": "2023-08-19T07:10:56+00:00" }, { "name": "sebastian/cli-parser", @@ -13353,16 +12987,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -13405,7 +13039,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -13413,7 +13047,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -14045,16 +13679,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "4645e032d0963fb614969398ca28e47605b1a7da" + "reference": "6736a10dcf724725a3b1c3b53e63a9ee03b27db9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4645e032d0963fb614969398ca28e47605b1a7da", - "reference": "4645e032d0963fb614969398ca28e47605b1a7da", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6736a10dcf724725a3b1c3b53e63a9ee03b27db9", + "reference": "6736a10dcf724725a3b1c3b53e63a9ee03b27db9", "shasum": "" }, "require": { @@ -14114,7 +13748,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.24" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.26" }, "funding": [ { @@ -14130,7 +13764,7 @@ "type": "tidelift" } ], - "time": "2023-05-05T14:42:55+00:00" + "time": "2023-07-19T20:11:33+00:00" }, { "name": "symfony/stopwatch", @@ -14311,7 +13945,6 @@ "stability-flags": { "league/csv": 20, "ohanzee/database": 20, - "ushahidi/gmail-support": 20, "ushahidi/kohana-validation": 20, "ushahidi/laravel-ckan-api": 20, "heroku/heroku-buildpack-php": 20, @@ -14322,8 +13955,8 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.3 <7.4" + "php": ">=7.3 <=7.4" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/config/app.php b/config/app.php index 6a424e360d..29d047cb94 100644 --- a/config/app.php +++ b/config/app.php @@ -154,11 +154,6 @@ Ushahidi\Authzn\ServiceProvider::class, Ushahidi\Multisite\MultisiteServiceProvider::class, Ushahidi\DataSource\DataSourceServiceProvider::class, - Ushahidi\Addons\Rackspace\RackspaceServiceProvider::class, - - Ushahidi\Modules\V2\ServiceProvider::class, - Ushahidi\Modules\V3\ServiceProvider::class, - Ushahidi\Modules\V5\ServiceProvider::class, /* * Application Service Providers... @@ -170,6 +165,11 @@ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\PassportServiceProvider::class, + + Ushahidi\Modules\V2\ServiceProvider::class, + Ushahidi\Modules\V3\ServiceProvider::class, + Ushahidi\Modules\V5\ServiceProvider::class, + ], /* diff --git a/config/data-provider.php b/config/data-provider.php new file mode 100644 index 0000000000..0fbfcf073b --- /dev/null +++ b/config/data-provider.php @@ -0,0 +1,43 @@ + [ + // List of data providers key=provider value=enabled + 'smssync' => true, + 'email' => true, + 'outgoingemail' => false, + 'twilio' => false, + 'nexmo' => false, + 'twitter' => false, + 'frontlinesms' => false, + 'gmail' => false, + 'mteja' => false, + 'africastalking' => false, + ], + + 'authenticable-providers' => [ + 'gmail' => true + ], + + 'email' => [ + 'incoming_type' => '', + 'incoming_server' => '', + 'incoming_port' => '', + 'incoming_security' => '', + 'incoming_username' => '', + 'incoming_password' => '', + ], + 'twilio' => [], + 'smssync' => [], + 'twitter' => [], + 'nexmo' => [], + 'frontlinesms' => [], + 'gmail' => [ + 'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob', + 'authenticated' => false + ], +]; diff --git a/src/Ushahidi/Modules/V3/Repository/Config/features.php b/config/features.php similarity index 89% rename from src/Ushahidi/Modules/V3/Repository/Config/features.php rename to config/features.php index e33636dd5b..eda54a9556 100644 --- a/src/Ushahidi/Modules/V3/Repository/Config/features.php +++ b/config/features.php @@ -3,10 +3,6 @@ /** * Feature Config * - * @author Ushahidi Team - * @package Ushahidi\Application\Config - * @copyright 2014 Ushahidi - * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) */ return [ @@ -23,19 +19,20 @@ 'plan' => false, ], - // Data sources + // Data Providers 'data-providers' => [ + 'email' => true, 'smssync' => true, 'twitter' => true, 'frontlinesms' => true, - 'email' => true, 'outgoingemail' => true, 'twilio' => true, 'nexmo' => true, - 'testservice' => false, 'gmail' => false, 'mteja' => false, 'africastalking' => false, + 'httpsms' => false, + 'infobip' => false, ], // Client limits diff --git a/config/settings.php b/config/settings.php new file mode 100644 index 0000000000..780c99c56e --- /dev/null +++ b/config/settings.php @@ -0,0 +1,67 @@ + [ + 'features', + 'site', + 'deployment_id', + 'test', + 'data-provider', + 'map', + 'twitter', + 'gmail' + ], + + 'site' => [ + 'name' => '', + 'description' => '', + 'email' => '', + 'timezone' => 'UTC', + 'language' => 'en-US', + 'date_format' => 'n/j/Y', + 'client_url' => false, + 'first_login' => true, + 'tier' => 'free', + 'private' => false, + 'api_version' => 'v5', + 'donation' => [ + 'enabled' => false, + 'title' => '', + 'description' => '', + 'wallet' => '', + 'images' => [] + ], + ], + + 'map' => [ + // Enable marker clustering with leaflet.markercluster + 'clustering' => true, + 'cluster_radius' => 50, + 'location_precision' => 2, + // Map start location + 'default_view' => [ + 'lat' => -1.3048035, + 'lon' => 36.8473969, + 'zoom' => 2, + 'baselayer' => 'MapQuest', + 'fit_map_boundaries' => true, + // Fit map boundaries to current data rendered + 'icon' => 'map-marker', + // Fontawesome Markers + 'color' => 'blue' + ] + ], + + 'data-provider' => config('data-provider'), + + 'features' => config('features'), +]; diff --git a/src/Ushahidi/Addons/AfricasTalking/ServiceProvider.php b/src/Ushahidi/Addons/AfricasTalking/ServiceProvider.php new file mode 100644 index 0000000000..8beba178a6 --- /dev/null +++ b/src/Ushahidi/Addons/AfricasTalking/ServiceProvider.php @@ -0,0 +1,18 @@ +app['datasources']->extend('africastalking', AfricasTalkingSource::class); + } +} diff --git a/src/Ushahidi/Addons/AfricasTalking/composer.json b/src/Ushahidi/Addons/AfricasTalking/composer.json new file mode 100644 index 0000000000..69dfa6134d --- /dev/null +++ b/src/Ushahidi/Addons/AfricasTalking/composer.json @@ -0,0 +1,29 @@ +{ + "name": "ushahidi/africastalking-addon", + "description": "Addon for Ushahidi DataSource", + "homepage": "http://ushahidi.com/", + "type": "library", + "license": "AGPL-3.0", + "repositories": [], + "require": { + "africastalking/africastalking": "^3.0" + }, + "autoload": { + "psr-4": { + "Ushahidi\\Addons\\AfricasTalking\\": "" + }, + "files": [] + }, + "extra": { + "laravel": { + "providers": [ + "Ushahidi\\Addons\\AfricasTalking\\ServiceProvider" + ] + } + }, + "suggest": {}, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/src/Ushahidi/Addons/HttpSMS/.gitignore b/src/Ushahidi/Addons/HttpSMS/.gitignore new file mode 100644 index 0000000000..d8044519c5 --- /dev/null +++ b/src/Ushahidi/Addons/HttpSMS/.gitignore @@ -0,0 +1,3 @@ +/vendor +composer.lock + diff --git a/src/Ushahidi/Addons/HttpSMS/HttpSMS.php b/src/Ushahidi/Addons/HttpSMS/HttpSMS.php new file mode 100644 index 0000000000..790449da6f --- /dev/null +++ b/src/Ushahidi/Addons/HttpSMS/HttpSMS.php @@ -0,0 +1,138 @@ + + * @package Addons\HttpSMS + * @copyright 2023 Ushahidi + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3) + */ + +use Firebase\JWT\JWT; +use Firebase\JWT\Key; +use Illuminate\Routing\Router; +use Illuminate\Support\Facades\Log; +use Ushahidi\DataSource\Contracts\MessageType; +use Ushahidi\DataSource\Contracts\MessageStatus; +use Ushahidi\DataSource\Concerns\MapsInboundFields; +use Ushahidi\DataSource\Contracts\CallbackDataSource; +use Ushahidi\DataSource\Contracts\OutgoingDataSource; + +class HttpSMS implements CallbackDataSource, OutgoingDataSource +{ + use MapsInboundFields; + + protected $config; + + protected $client; + + public function __construct(array $config = []) + { + $this->config = $config; + + $this->client = new \GuzzleHttp\Client(); + } + + public function getName() + { + return 'HttpSMS'; + } + + public function getId() + { + return strtolower($this->getName()); + } + + public function getServices() + { + return [MessageType::SMS]; + } + + public function getOptions() + { + return [ + 'server_url' => [ + 'label' => 'HttpSMS Server URL', + 'input' => 'text', + 'description' => 'The URL where the httpSMS server is installed, i.e. https://api.httpsms.com', + 'rules' => ['required'] + ], + 'api_key' => [ + 'label' => 'API Key', + 'input' => 'text', + 'description' => 'The API key to be used when sending requests to the httpSMS server', + 'rules' => ['required'] + ], + 'phone_number' => [ + 'label' => 'SMS Phone number', + 'input' => 'text', + 'description' => 'The phone number which is registered for sending and receiving SMS messages', + 'rules' => ['required'] + ], + 'signing_key' => [ + 'label' => 'Signing Key', + 'input' => 'text', + 'description' => 'Set a secret so that it is used to verify the webhook sent from httpSMS server. + You need to configure the same secret when setting up a webhook in your httpSMS settings dashboard.', + 'rules' => ['required'] + ] + ]; + } + + public function getInboundFields() + { + return [ + 'Message' => 'text' + ]; + } + + public function isUserConfigurable() + { + return true; + } + + public function send($to, $message, $title = "", $contact_type = null, $message_type = null, $metadata = []) + { + $uri = $this->config['server_url'] . '/v1/messages/send'; + $apiKey = $this->config['api_key']; + $from = $this->config['phone_number']; + + $res = $this->client->request('POST', $uri, [ + 'headers' => [ + 'x-api-key' => $apiKey, + ], + 'json' => [ + 'content' => $message, + 'from' => $from, + 'to' => $to + ] + ]); + + $content = json_decode($res->getBody()->getContents(), true); + + if ($content['status'] == 'success') { + return [MessageStatus::SENT, $content['data']['id']]; + } else { + Log::error('HttpSMS: Failed to send message: ' . $content['message']); + return [MessageStatus::FAILED, false]; + } + } + + public function verifyToken($token) + { + $decodedToken = JWT::decode($token, new Key($this->config['signing_key'], 'HS256')); + + return false; + } + + public static function registerRoutes(Router $router) + { + $router->middleware([SubstituteBearerTokenMiddleware::class])->group(function () use ($router) { + $router->post('/httpsms', HttpSMSController::class . '@handleRequest'); + $router->post('/sms/httpsms', HttpSMSController::class . '@handleRequest'); + }); + } +} diff --git a/src/Ushahidi/Addons/HttpSMS/HttpSMSController.php b/src/Ushahidi/Addons/HttpSMS/HttpSMSController.php new file mode 100644 index 0000000000..6670f14cea --- /dev/null +++ b/src/Ushahidi/Addons/HttpSMS/HttpSMSController.php @@ -0,0 +1,80 @@ + + * @package Addons\HttpSMS + * @copyright 2022 Ushahidi + * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) + */ + +use Illuminate\Http\Request; +use Ushahidi\Contracts\Contact; +use Ushahidi\DataSource\Contracts\MessageType; +use Ushahidi\DataSource\DataSourceController; + +class HttpSMSController extends DataSourceController +{ + /** @var string|HttpSMS */ + protected $source = 'httpsms'; + + public function handleRequest(Request $request) + { + $authorization = $request->header('X-Authorization'); + $eventType = $request->header('X-Event-Type'); + + try { + /** */ + $this->source->verifyToken($authorization); + // Token is valid, continue processing + } catch (\Exception $e) { + report($e); + return response()->json(['error' => 'Invalid token'], 401); + } + + $eventPayload = $request->all(); + $eventData = $eventPayload['data']; + + // Remove Non-Numeric characters because that's what the DB has + $from = preg_replace("/[^0-9,+.]/", "", $eventData['contact']); + + // Handle the webhook event based on $eventType + switch ($eventType) { + case "message.phone.received": + $data = [ + 'type' => MessageType::SMS, + 'from' => $from, + 'contact_type' => Contact::PHONE, + 'message' => $eventData['content'], + 'to' => $eventData['owner'], + 'title' => null, + 'datetime' => $eventData['timestamp'] ?? null, + 'data_source_message_id' => $eventData['message_id'], + 'data_source' => 'HttpSMS', + 'additional_data' => [ + 'id' => $eventPayload['id'], + 'time' => $eventPayload['time'], + 'owner' => $eventData['owner'], + 'request_id' => $eventData['request_id'] ?? null, + 'user_id' => $eventData['user_id'] ?? null, + 'sim' => $eventData['sim'] ?? null + ] + ]; + break; + + case "message.phone.delivered": + $data = []; + break; + } + // Add more event types as needed + + $this->save($data); + + // Then return success + + return response()->json(['message' => 'Webhook event processed successfully']); + } +} diff --git a/src/Ushahidi/Addons/HttpSMS/ServiceProvider.php b/src/Ushahidi/Addons/HttpSMS/ServiceProvider.php new file mode 100644 index 0000000000..1f14729f52 --- /dev/null +++ b/src/Ushahidi/Addons/HttpSMS/ServiceProvider.php @@ -0,0 +1,18 @@ +app['datasources']->extend('httpsms', HttpSMS::class); + } +} diff --git a/src/Ushahidi/Addons/HttpSMS/SubstituteBearerTokenMiddleware.php b/src/Ushahidi/Addons/HttpSMS/SubstituteBearerTokenMiddleware.php new file mode 100644 index 0000000000..024a797089 --- /dev/null +++ b/src/Ushahidi/Addons/HttpSMS/SubstituteBearerTokenMiddleware.php @@ -0,0 +1,19 @@ +headers->set('X-Authorization', $request->bearerToken()); + $request->headers->remove('Authorization'); + + return $next($request); + } +} diff --git a/src/Ushahidi/Addons/HttpSMS/composer.json b/src/Ushahidi/Addons/HttpSMS/composer.json new file mode 100644 index 0000000000..953348f5ff --- /dev/null +++ b/src/Ushahidi/Addons/HttpSMS/composer.json @@ -0,0 +1,29 @@ +{ + "name": "ushahidi/httpsms-addon", + "description": "HttpSMS addon to Ushahidi data source component", + "homepage": "http://ushahidi.com/", + "type": "library", + "license": "AGPL-3.0", + "repositories": [], + "require": { + "firebase/php-jwt": "^6.0" + }, + "autoload": { + "psr-4": { + "Ushahidi\\Addons\\HttpSMS\\": "" + }, + "files": [] + }, + "extra": { + "laravel": { + "providers": [ + "Ushahidi\\Addons\\HttpSMS\\ServiceProvider" + ] + } + }, + "suggest": {}, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/src/Ushahidi/Addons/Infobip/InfobipSMSController.php b/src/Ushahidi/Addons/Infobip/InfobipSMSController.php new file mode 100644 index 0000000000..75ea35579b --- /dev/null +++ b/src/Ushahidi/Addons/Infobip/InfobipSMSController.php @@ -0,0 +1,47 @@ + + * @package Addons\Infobip + * @copyright 2023 Ushahidi + * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) + */ + +use Illuminate\Http\Request; +use Ushahidi\Contracts\Contact; +use Ushahidi\DataSource\Contracts\MessageType; +use Ushahidi\DataSource\DataSourceController; + +class InfobipSMSController extends DataSourceController +{ + protected $source = 'infobip'; + + public function handleRequest(Request $request) + { + $results = collect($request->input('results')); + + $results->each(function ($result) { + $data = [ + 'type' => MessageType::SMS, + 'from' => $result['from'], + 'contact_type' => Contact::PHONE, + 'message' => $result['text'], + 'to' => $result['to'], + 'title' => null, + 'datetime' => $result['receivedAt'] ?? null, + 'data_source_message_id' => $result['messageId'], + 'data_source' => 'InfobipSMS', + 'additional_data' => [ + ] + ]; + + $this->save($data); + }); + + return response()->json(['status' => 'ok']); + } +} diff --git a/src/Ushahidi/Addons/Infobip/InfobipServiceProvider.php b/src/Ushahidi/Addons/Infobip/InfobipServiceProvider.php new file mode 100644 index 0000000000..1f658a3f80 --- /dev/null +++ b/src/Ushahidi/Addons/Infobip/InfobipServiceProvider.php @@ -0,0 +1,133 @@ + + * @package Addons\Infobip + * @copyright 2023 Ushahidi + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3) + */ + +use Illuminate\Routing\Router; +use Firebase\JWT\JWT; +use Firebase\JWT\Key; +use Ushahidi\DataSource\Contracts\MessageType; +use Ushahidi\DataSource\Contracts\MessageStatus; +use Ushahidi\DataSource\Concerns\MapsInboundFields; +use Ushahidi\DataSource\Contracts\CallbackDataSource; +use Ushahidi\DataSource\Contracts\OutgoingDataSource; +use Illuminate\Support\Facades\Log; + +class InfobipServiceProvider implements CallbackDataSource, OutgoingDataSource +{ + use MapsInboundFields; + + protected $config; + + protected $client; + + public function __construct(array $config = []) + { + $this->config = $config; + + $this->client = new \GuzzleHttp\Client(); + } + + public function getName() + { + return 'Infobip'; + } + + public function getId() + { + return strtolower($this->getName()); + } + + public function getServices() + { + return [MessageType::SMS]; + } + + public function getOptions() + { + return [ + 'api_base_url' => [ + 'label' => 'API Base URL', + 'input' => 'text', + 'description' => 'To see your base URL, login to your Infobip dashboard and you should see it in this format + i.e xxxxx.api.infobip.com.', + 'rules' => ['required'] + ], + 'api_key' => [ + 'label' => 'API Key', + 'input' => 'text', + 'description' => 'The API key to be used when sending requests to the infobip server', + 'rules' => ['required'] + ], + 'sender_name' => [ + 'label' => 'Sender Name (Alphanumeric/Numeric/Short code)', + 'input' => 'text', + 'description' => 'The Sender names which is registered for sending and receiving SMS messages', + 'rules' => [] + ], + ]; + } + + public function getInboundFields() + { + return [ + 'Message' => 'text' + ]; + } + + public function isUserConfigurable() + { + return true; + } + + public function send($to, $message, $title = "", $contact_type = null, $message_type = null, $metadata = []) + { + $uri = $this->config['server_url'] . '/v1/messages/send'; + $apiKey = $this->config['api_key']; + $from = $this->config['phone_number']; + + $res = $this->client->request('POST', $uri, [ + 'headers' => [ + 'x-api-key' => $apiKey, + ], + 'json' => [ + 'content' => $message, + 'from' => $from, + 'to' => $to + ] + ]); + + $content = json_decode($res->getBody()->getContents(), true); + + if ($content['status'] == 'success') { + return [MessageStatus::SENT, $content['data']['id']]; + } else { + Log::error('HttpSMS: Failed to send message: ' . $content['message']); + return [MessageStatus::FAILED, false]; + } + } + + public function verifyToken($token) + { + try { + $decodedToken = JWT::decode($token, new Key($this->config['signing_key'], 'HS256')); + return isset($decodedToken) ? true : false; + } catch (\Throwable $th) { + //throw $th; + return false; + } + } + + public static function registerRoutes(Router $router) + { + $router->post('/sms/infobip', InfobipSMSController::class . '@handleRequest'); + } +} diff --git a/src/Ushahidi/Addons/Infobip/LaravelServiceProvider.php b/src/Ushahidi/Addons/Infobip/LaravelServiceProvider.php new file mode 100644 index 0000000000..a81994afea --- /dev/null +++ b/src/Ushahidi/Addons/Infobip/LaravelServiceProvider.php @@ -0,0 +1,18 @@ +app['datasources']->extend('infobip', InfobipServiceProvider::class); + } +} diff --git a/src/Ushahidi/Addons/Infobip/composer.json b/src/Ushahidi/Addons/Infobip/composer.json new file mode 100644 index 0000000000..f2f53a9a20 --- /dev/null +++ b/src/Ushahidi/Addons/Infobip/composer.json @@ -0,0 +1,29 @@ +{ + "name": "ushahidi/infobip-support", + "description": "Infobip addon for the Ushahidi data source component", + "homepage": "http://ushahidi.com/", + "type": "library", + "license": "AGPL-3.0", + "repositories": [], + "require": { + "infobip-community/infobip-api-php-sdk": "1.*" + }, + "autoload": { + "psr-4": { + "Ushahidi\\Addons\\Infobip\\": "" + }, + "files": [] + }, + "extra": { + "laravel": { + "providers": [ + "Ushahidi\\Addons\\Infobip\\LaravelServiceProvider" + ] + } + }, + "suggest": {}, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/src/Ushahidi/Addons/Mteja/ServiceProvider.php b/src/Ushahidi/Addons/Mteja/ServiceProvider.php new file mode 100644 index 0000000000..2f4766f9cc --- /dev/null +++ b/src/Ushahidi/Addons/Mteja/ServiceProvider.php @@ -0,0 +1,18 @@ +app['datasources']->extend('mteja', MtejaSource::class); + } +} diff --git a/src/Ushahidi/Addons/Mteja/composer.json b/src/Ushahidi/Addons/Mteja/composer.json new file mode 100644 index 0000000000..35f73f71c8 --- /dev/null +++ b/src/Ushahidi/Addons/Mteja/composer.json @@ -0,0 +1,28 @@ +{ + "name": "ushahidi/mteja-addon", + "description": "Mteja Addon for Ushahidi DataSource", + "homepage": "http://ushahidi.com/", + "type": "library", + "license": "AGPL-3.0", + "repositories": [], + "require": { + }, + "autoload": { + "psr-4": { + "Ushahidi\\Addons\\Mteja\\": "" + }, + "files": [] + }, + "extra": { + "laravel": { + "providers": [ + "Ushahidi\\Addons\\Mteja\\ServiceProvider" + ] + } + }, + "suggest": {}, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/src/Ushahidi/Addons/Rackspace/composer.json b/src/Ushahidi/Addons/Rackspace/composer.json new file mode 100644 index 0000000000..55e15c2549 --- /dev/null +++ b/src/Ushahidi/Addons/Rackspace/composer.json @@ -0,0 +1,27 @@ +{ + "name": "ushahidi/flysystem-rackspace", + "description": "Rackspace adapter for Flysystem package", + "type": "library", + "license": "AGPL-3.0", + "require": { + "php-opencloud/openstack": "^3.2" + }, + "autoload": { + "psr-4": { + "Ushahidi\\Addons\\Rackspace\\": "" + }, + "files": [] + }, + "extra": { + "laravel": { + "providers": [ + "Ushahidi\\Addons\\Rackspace\\RackspaceServiceProvider" + ] + } + }, + "suggest": {}, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/src/Ushahidi/Contracts/Repository/Usecase/CreateMessageRepository.php b/src/Ushahidi/Contracts/Repository/Usecase/CreateMessageRepository.php index b7d08ca4dd..49cfb05dbb 100644 --- a/src/Ushahidi/Contracts/Repository/Usecase/CreateMessageRepository.php +++ b/src/Ushahidi/Contracts/Repository/Usecase/CreateMessageRepository.php @@ -15,7 +15,7 @@ interface CreateMessageRepository { /** * @param int $parent_id - * @return Boolean + * @return boolean */ public function parentExists($parent_id); } diff --git a/src/Ushahidi/Core/Concerns/StatefulData.php b/src/Ushahidi/Core/Concerns/StatefulData.php index a551c2a374..c9a9e890cb 100644 --- a/src/Ushahidi/Core/Concerns/StatefulData.php +++ b/src/Ushahidi/Core/Concerns/StatefulData.php @@ -229,7 +229,7 @@ public function getChanged() /** * Get the current entity state as an associative array. * - * @return Array + * @return array */ abstract public function asArray(); diff --git a/src/Ushahidi/Core/LaravelPackageManifest.php b/src/Ushahidi/Core/LaravelPackageManifest.php new file mode 100644 index 0000000000..cb09f94ecf --- /dev/null +++ b/src/Ushahidi/Core/LaravelPackageManifest.php @@ -0,0 +1,67 @@ +files->exists($path = $this->vendorPath . '/composer/installed.json')) { + $installed = json_decode($this->files->get($path), true); + + $packages = $installed['packages'] ?? $installed; + } + + $customPackages = []; + + if ($this->files->exists($composerJson = $this->basePath . '/composer.json')) { + $json = json_decode($this->files->get($composerJson), true); + + $include = $json['extra']['merge-plugin']['include'] ?? []; + $require = $json['extra']['merge-plugin']['require'] ?? []; + + $customPackages = collect($include)->merge($require)->map(function ($package) { + return glob($package); + })->flatten()->filter(function ($package) { + return $this->files->exists($package); + })->map(function ($path) { + return json_decode($this->files->get($path), true); + })->mapWithKeys(function ($package) { + return [$package['name'] => $package['extra']['laravel'] ?? []]; + })->filter()->all(); + } + + $ignoreAll = in_array('*', $ignore = $this->packagesToIgnore()); + + $write = collect($packages)->mapWithKeys(function ($package) { + return [$this->format($package['name']) => $package['extra']['laravel'] ?? []]; + }) + ->merge($customPackages) + ->each(function ($configuration) use (&$ignore) { + $ignore = array_merge($ignore, $configuration['dont-discover'] ?? []); + })->reject(function ($configuration, $package) use ($ignore, $ignoreAll) { + return $ignoreAll || in_array($package, $ignore); + })->filter()->all(); + + $this->write($write); + } +} diff --git a/src/Ushahidi/DataSource/DataSourceController.php b/src/Ushahidi/DataSource/DataSourceController.php index 2ed30ceb48..34c900b02d 100644 --- a/src/Ushahidi/DataSource/DataSourceController.php +++ b/src/Ushahidi/DataSource/DataSourceController.php @@ -13,7 +13,6 @@ use Illuminate\Http\Request; use Illuminate\Routing\Controller; -use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; use Ushahidi\DataSource\Contracts\MessageStatus; use Ramsey\Uuid\Uuid; @@ -36,6 +35,7 @@ public function __construct(DataSourceManager $manager, DataSourceStorage $stora try { $this->source = $manager->getEnabledSource($this->source); } catch (\InvalidArgumentException $e) { + report($e); } } @@ -57,7 +57,7 @@ protected function getPendingMessages($limit) $message->setState([ 'data_source_message_id' => $uuid->toString() ]); - } catch (UnsatisfiedDependencyException $e) { + } catch (\Exception $e) { // continue } } diff --git a/src/Ushahidi/DataSource/DataSourceManager.php b/src/Ushahidi/DataSource/DataSourceManager.php index aea3016d25..e0cd39616d 100644 --- a/src/Ushahidi/DataSource/DataSourceManager.php +++ b/src/Ushahidi/DataSource/DataSourceManager.php @@ -74,11 +74,18 @@ class DataSourceManager * @param \Ushahidi\Contracts\Repository\Entity\ConfigRepository $configRepo * @return void */ - public function __construct(ConfigRepository $configRepo) + public function __construct(ConfigRepository $configRepo = null) { $this->configRepo = $configRepo; } + public function setConfig(ConfigRepository $configRepo) + { + $this->configRepo = $configRepo; + + return $this; + } + public function getSources(): array { return array_keys(array_merge($this->defaultSources, $this->customSources)); @@ -92,22 +99,22 @@ public function getSources(): array public function getEnabledSources(): array { return Cache::remember('datasources.enabled', self::CACHE_LIFETIME, function () { - // Load enabled sources - $enabledSources = array_filter( - $this->configRepo->get('data-provider')->asArray()['providers'] - ); + $allSources = array_merge($this->defaultSources, $this->customSources); // Load available sources $availableSources = array_filter( $this->configRepo->get('features')->asArray()['data-providers'] ); - $allSources = array_merge($this->defaultSources, $this->customSources); + // Load configured sources + $configuredSources = array_filter( + $this->configRepo->get('data-provider')->asArray()['providers'] + ); $sources = array_intersect_key( $allSources, - $enabledSources, - $availableSources + $availableSources, + $configuredSources, ); return array_keys($sources); @@ -173,6 +180,8 @@ public function getSourceForType(string $type) */ public function registerRoutes(Router $router) { + // TODO: Switch to something like this here https://laravel-news.com/route-registrars + /** @var \Ushahidi\DataSource\Contracts\CallbackDataSource $class */ foreach (array_values(array_merge($this->defaultSources, $this->customSources)) as $class) { if (!in_array(CallbackDataSource::class, class_implements($class))) { diff --git a/src/Ushahidi/DataSource/DataSourceServiceProvider.php b/src/Ushahidi/DataSource/DataSourceServiceProvider.php index f5382c67ff..eb908a7ee6 100644 --- a/src/Ushahidi/DataSource/DataSourceServiceProvider.php +++ b/src/Ushahidi/DataSource/DataSourceServiceProvider.php @@ -13,6 +13,19 @@ class DataSourceServiceProvider extends ServiceProvider { protected $defer = true; + /** + * Bootstrap any application services. + * + * @return void + */ + public function boot() + { + Event::listen('site.changed', function () { + // Reset datasources + $this->app->make('datasources')->clearResolvedSources(); + }); + } + /** * Register any application services. * @@ -23,18 +36,10 @@ public function register() $this->registerStorage(); $this->registerManager(); $this->registerCommands(); - } - public function boot() - { $this->app->booted(function () { $this->app->make('datasources')->registerRoutes($this->app['router']); }); - - Event::listen('site.changed', function () { - // Reset datasources - $this->app->make('datasources')->clearResolvedSources(); - }); } /** diff --git a/src/Ushahidi/DataSource/DataSourceStorage.php b/src/Ushahidi/DataSource/DataSourceStorage.php index f336441c44..e9866ea1e5 100644 --- a/src/Ushahidi/DataSource/DataSourceStorage.php +++ b/src/Ushahidi/DataSource/DataSourceStorage.php @@ -83,28 +83,33 @@ public function receive( return $this->receiveUsecase->setPayload($payload) ->interact(); } catch (\Ushahidi\Core\Exception\NotFoundException $e) { - Log::error($e->getMessage(), $payload); + report($e); + Log::debug($e->getMessage(), $payload); if (!app()->runningInConsole()) { abort(404, $e->getMessage()); } } catch (\Ushahidi\Core\Exception\AuthorizerException $e) { + report($e); Log::error($e->getMessage(), $payload); if (!app()->runningInConsole()) { abort(403, $e->getMessage()); } } catch (\Ushahidi\Core\Exception\ValidatorException $e) { + report($e); $payload['errors'] = $e->getErrors(); - Log::error($e->getMessage(), $payload); + Log::debug($e->getMessage(), $payload); if (!app()->runningInConsole()) { abort(422, 'Validation Error: ' . $e->getMessage() . '; ' . implode(', ', $e->getErrors())); } } catch (\InvalidArgumentException $e) { - Log::error($e->getMessage(), $payload); + report($e); + Log::debug($e->getMessage(), $payload); if (!app()->runningInConsole()) { abort(400, 'Bad request: ' . $e->getMessage()); } } catch (\Exception $e) { - Log::error($e->getMessage(), $payload); + report($e); + Log::debug($e->getMessage(), $payload); if (!app()->runningInConsole()) { abort(500, 'Internal Server Error: ' . $e->getMessage()); } diff --git a/src/Ushahidi/DataSource/Email/Email.php b/src/Ushahidi/DataSource/Email/Email.php index a3e7a6fd6f..671afa228d 100644 --- a/src/Ushahidi/DataSource/Email/Email.php +++ b/src/Ushahidi/DataSource/Email/Email.php @@ -76,7 +76,6 @@ public function getOptions() 'incoming_server' => [ 'label' => 'Incoming Server', 'input' => 'text', - 'description' => '', 'description' => 'Examples: mail.yourwebsite.com, imap.gmail.com, pop.gmail.com', 'rules' => ['required'] ], diff --git a/src/Ushahidi/DataSource/composer.json b/src/Ushahidi/DataSource/composer.json new file mode 100644 index 0000000000..e26d2d100a --- /dev/null +++ b/src/Ushahidi/DataSource/composer.json @@ -0,0 +1,24 @@ +{ + "name": "ushahidi/datasource", + "description": "Ushahidi Data Source Component", + "homepage": "http://ushahidi.com/", + "type": "project", + "repositories": [], + "require": { + "abraham/twitteroauth": "^0.5.3", + "vonage/client": "^2.3", + "twilio/sdk": "^5.15" + }, + "autoload": { + "psr-4": { + "Ushahidi\\DataSource\\": "" + }, + "files": [] + }, + "extra": {}, + "suggest": {}, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/src/Ushahidi/Modules/V3/Listener/CreatePostFromMessage.php b/src/Ushahidi/Modules/V3/Listener/CreatePostFromMessage.php index 3497cb5ec8..3ba0f3a9b5 100644 --- a/src/Ushahidi/Modules/V3/Listener/CreatePostFromMessage.php +++ b/src/Ushahidi/Modules/V3/Listener/CreatePostFromMessage.php @@ -8,6 +8,7 @@ class CreatePostFromMessage { + protected $targetedSurveyStateRepo; protected $messageRepo; protected $contactRepo; protected $postRepo; diff --git a/src/Ushahidi/Modules/V3/Repository/Config/data-provider.php b/src/Ushahidi/Modules/V3/Repository/Config/data-provider.php deleted file mode 100644 index 309dc6dd34..0000000000 --- a/src/Ushahidi/Modules/V3/Repository/Config/data-provider.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @package Ushahidi\Application\Config - * @copyright 2013 Ushahidi - * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) - */ - -return [ - 'providers' => [ - // List of data providers key=provider value=enabled - 'smssync' => false, - 'email' => true, - 'outgoingemail' => false, - 'twilio' => false, - 'nexmo' => false, - 'twitter' => false, - 'frontlinesms' => false, - 'gmail' => false, - 'mteja' => false, - 'africastalking' => false, - ], - - 'authenticable-providers' => [ - 'gmail' => true - ], - - // Config params for individual providers - // 'nexmo' => array( - // 'from' => '', - // 'api_key' => '', - // 'api_secret' => '' - // ), - - // // 'twilio' => array( - // 'from' => '', - // 'account_sid' => '', - // 'auth_token' => '', - // 'sms_auto_response' => '' - // ), - - // 'smssync' => array( - // 'from' => '12345', - // 'secret' => '1234' - // ), - - 'email' => [ - // 'from' => '', - // 'from_name' => '', - - 'incoming_type' => '', - 'incoming_server' => '', - 'incoming_port' => '', - 'incoming_security' => '', - 'incoming_username' => '', - 'incoming_password' => '', - ], - - 'twilio' => [], - 'smssync' => [], - 'twitter' => [], - 'nexmo' => [], - 'frontlinesms' => [], - 'gmail' => [ - 'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob', - 'authenticated' => false - ], -]; diff --git a/src/Ushahidi/Modules/V3/Repository/Config/map.php b/src/Ushahidi/Modules/V3/Repository/Config/map.php deleted file mode 100644 index 7f469d1b6d..0000000000 --- a/src/Ushahidi/Modules/V3/Repository/Config/map.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @package Ushahidi\Application\Config - * @copyright 2014 Ushahidi - * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) - */ - -return [ - // Enable marker clustering with leaflet.markercluster - 'clustering' => true, - 'cluster_radius' => 50, - 'location_precision' => 2, - // Map start location - 'default_view' => [ - 'lat' => -1.3048035, - 'lon' => 36.8473969, - 'zoom' => 2, - 'baselayer' => 'MapQuest', - 'fit_map_boundaries' => true, // Fit map boundaries to current data rendered - 'icon' => 'map-marker', // Fontawesome Markers - 'color' => 'blue' - ] -]; diff --git a/src/Ushahidi/Modules/V3/Repository/Config/site.php b/src/Ushahidi/Modules/V3/Repository/Config/site.php deleted file mode 100644 index 36ca7956fc..0000000000 --- a/src/Ushahidi/Modules/V3/Repository/Config/site.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @package Ushahidi\Application\Config - * @copyright 2013 Ushahidi - * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) - */ - -/** - * Site settings - * - * The following options are available: - * - * - string name Display name of the site. - * - string description A brief description of the site. - * - string email Site contact email. - * - string timezone Default timezone for the site. See http://php.net/manual/en/timezones.php - * - string language Native language for the site in ISO 639-1 format. - * See http://en.wikipedia.org/wiki/ISO_639-1 - * - string date_format Set format in which to return dates. - * See http://php.net/manual/en/datetime.createfromformat.php - */ - - return [ - 'name' => '', - 'description' => '', - 'email' => '', - 'timezone' => 'UTC', - 'language' => 'en-US', - 'date_format' => 'n/j/Y', - 'client_url' => false, - 'first_login' => true, - 'tier' => 'free', - 'private' => false, - 'api_version' => 'v5', - 'donation' => [ - 'enabled' => false, - 'title' => '', - 'description' => '', - 'wallet' => '', - 'images' => [] - ], - ]; diff --git a/src/Ushahidi/Modules/V3/Repository/ConfigRepository.php b/src/Ushahidi/Modules/V3/Repository/ConfigRepository.php index 345beb480a..5f4e8df960 100644 --- a/src/Ushahidi/Modules/V3/Repository/ConfigRepository.php +++ b/src/Ushahidi/Modules/V3/Repository/ConfigRepository.php @@ -43,7 +43,7 @@ public function __construct(OhanzeeResolver $resolver) /** * Get current connection * - * @return Ohanzee\Database; + * @return \Ohanzee\Database; */ protected function db() { @@ -63,10 +63,9 @@ protected function getDefaults($group) // since we're now using it as a file name $this->verifyGroup($group); - // @todo replace with separate entities - $file = __DIR__ . '/Config/' . $group . '.php'; - if (file_exists($file)) { - return require $file; + $setting = config('settings.' . $group); + if (is_array($setting)) { + return $setting; } return []; @@ -157,10 +156,11 @@ public function update(Entity $entity) return; /* noop */ } - // Intercom count datasources - if ($group === 'data-provider') { + // Intercom count data providers + if ($group === 'features') { $intercom_data['num_data_sources'] = 0; - foreach ($entity->providers as $key => $value) { + $dataproviders = $entity->asArray()['data-providers']; + foreach ($dataproviders as $key => $value) { $value ? $intercom_data['num_data_sources']++ : null; } } @@ -219,21 +219,12 @@ private function insertOrUpdate($group, $key, $value) // ConfigRepository public function groups() { - return [ - 'features', - 'site', - 'deployment_id', - 'test', - 'data-provider', - 'map', - 'twitter', - 'gmail' - ]; + return config('settings.groups'); } /** * @param string $group - * @throws InvalidArgumentException when group is invalid + * @throws \InvalidArgumentException when group is invalid * @return void */ protected function verifyGroup($group) @@ -245,7 +236,7 @@ protected function verifyGroup($group) /** * @param array $groups - * @throws InvalidArgumentException when any group is invalid + * @throws \InvalidArgumentException when any group is invalid * @return void */ protected function verifyGroups(array $groups) diff --git a/src/Ushahidi/Modules/V3/Repository/PostRepository.php b/src/Ushahidi/Modules/V3/Repository/PostRepository.php index 35f7fa97e5..a2ba9d01dd 100644 --- a/src/Ushahidi/Modules/V3/Repository/PostRepository.php +++ b/src/Ushahidi/Modules/V3/Repository/PostRepository.php @@ -57,6 +57,8 @@ class PostRepository extends OhanzeeRepository implements protected $form_stage_repo; protected $form_repo; protected $contact_repo; + protected $post_lock_repo; + protected $post_value_factory; protected $bounding_box_factory; // By default remove all private responses diff --git a/src/Ushahidi/Modules/V3/Validator/LegacyValidator.php b/src/Ushahidi/Modules/V3/Validator/LegacyValidator.php index d252abf554..66fb3eb5c6 100644 --- a/src/Ushahidi/Modules/V3/Validator/LegacyValidator.php +++ b/src/Ushahidi/Modules/V3/Validator/LegacyValidator.php @@ -26,15 +26,15 @@ abstract class LegacyValidator implements Validator /** * Must return an array of rules that the validator should apply * - * @return Array $rules array of $key => $rule + * @return array $rules array of $key => $rule */ abstract protected function getRules(); /** * Check the data against the rules returned by getRules() * - * @param Array $data an array of changed values to check in $key => $value format - * @param Array $fullData an array of full entity data for reference during validation + * @param array $data an array of changed values to check in $key => $value format + * @param array $fullData an array of full entity data for reference during validation * @return bool */ public function check(array $data, array $fullData = []) : bool @@ -53,8 +53,8 @@ public function check(array $data, array $fullData = []) : bool /** * Return an array of any errors that occurred during validation * - * @param String $source - * @return Array + * @param string $source + * @return array */ public function errors($source = null) : array { diff --git a/src/Ushahidi/Modules/V3/Validator/Message/Create.php b/src/Ushahidi/Modules/V3/Validator/Message/Create.php index b53e7a6376..fc98e9db1c 100644 --- a/src/Ushahidi/Modules/V3/Validator/Message/Create.php +++ b/src/Ushahidi/Modules/V3/Validator/Message/Create.php @@ -31,6 +31,7 @@ public function __construct(CreateMessageRepository $repo, UserRepository $user_ protected function getRules() { // @todo inject + /** @var \Ushahidi\DataSource\DatasourceManager */ $sources = app('datasources'); return [ diff --git a/src/ruleset.xml b/src/ruleset.xml index 5d089819df..465f0b3086 100644 --- a/src/ruleset.xml +++ b/src/ruleset.xml @@ -2,7 +2,9 @@ Ushahidi uses PSR2 with tabs instead of spaces - + + + diff --git a/tests/Integration/data-provider/data-providers.feature b/tests/Integration/data-provider/data-providers.feature index 2e30a214a9..56ba50249f 100644 --- a/tests/Integration/data-provider/data-providers.feature +++ b/tests/Integration/data-provider/data-providers.feature @@ -7,7 +7,6 @@ Feature: Testing the DataProviders API Then the response is JSON And the response has a "count" property And the type of the "count" property is "numeric" - And the "count" property is greater than or equal to "6" Then the guzzle status code should be 200 Scenario: Get A Particular Data Provider @@ -22,12 +21,12 @@ Feature: Testing the DataProviders API And the "options.secret.input" property equals "text" Then the guzzle status code should be 200 - Scenario: Search for Data Providers By Type + Scenario: Search for Data Providers By Service Type Given that I want to get all "Dataproviders" And that the request "query string" is "type=sms" When I request "/dataproviders" Then the response is JSON - And the "count" property equals "6" + And the type of the "count" property is "numeric" Then the guzzle status code should be 200 Scenario: Geting A Non-Existent Data Provider Should Fail diff --git a/tests/Unit/Core/Usecase/ReceiveMessageTest.php b/tests/Unit/Core/Usecase/ReceiveMessageTest.php index 7ec046332a..e4f3c74c38 100644 --- a/tests/Unit/Core/Usecase/ReceiveMessageTest.php +++ b/tests/Unit/Core/Usecase/ReceiveMessageTest.php @@ -38,16 +38,22 @@ public function setUp(): void $this->postRepo = M::mock(PostRepository::class); $this->formAttributeRepo = M::mock(FormAttributeRepository::class); - $this->app->instance(CreatePostFromMessage::class, new CreatePostFromMessage( - $this->messageRepo, - $this->targetedSurveyStateRepo, - $this->postRepo - )); - $this->app->instance(HandleTargetedSurveyResponse::class, new HandleTargetedSurveyResponse( - $this->messageRepo, - $this->targetedSurveyStateRepo, - $this->formAttributeRepo - )); + $this->app->instance( + CreatePostFromMessage::class, + new CreatePostFromMessage( + $this->messageRepo, + $this->targetedSurveyStateRepo, + $this->postRepo + ) + ); + $this->app->instance( + HandleTargetedSurveyResponse::class, + new HandleTargetedSurveyResponse( + $this->messageRepo, + $this->targetedSurveyStateRepo, + $this->formAttributeRepo + ) + ); $events = app('events'); $events->subscribe(Subscriber::class); @@ -63,17 +69,29 @@ public function setUp(): void // Mock the config repo $configRepo = M::mock(ConfigRepository::class); // Return email in config - $configRepo->shouldReceive('get')->with('data-provider')->andReturn(new Config([ - 'providers' => [ - 'smssync' => true, - ], - ])); - $configRepo->shouldReceive('get')->with('features')->andReturn(new Config([ - 'data-providers' => [ - 'smssync' => true, - ], - ])); - $this->app->instance(ConfigRepository::class, $configRepo); + $configRepo->shouldReceive('get') + ->with('data-provider') + ->andReturn(new Config([ + 'providers' => [ + 'smssync' => true, + ], + ])); + $configRepo->shouldReceive('get') + ->with('features') + ->andReturn(new Config([ + 'data-providers' => [ + 'smssync' => true, + ], + ])); + + // app()->resolving(ConfigRepository::class, function () use ($configRepo) { + // return $configRepo; + // }); + + app()->extend('datasources', function ($manager) use ($configRepo) { + $manager->setConfig($configRepo); + return $manager; + }); } /**