From 8a0a7a2e8373d80e7bb7984cdb17a3db675e3d35 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Mon, 23 Dec 2019 13:34:48 +0000 Subject: [PATCH 1/5] Require dev-master of scout-apm-php for new config keys --- composer.json | 2 +- composer.lock | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index ac80902..b09d4d7 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "illuminate/view": "^5.5.0|^6.0", "ramsey/uuid": "^3.0", "psr/log": "^1.0", - "scoutapp/scout-apm-php": "^3.0" + "scoutapp/scout-apm-php": "dev-master" }, "require-dev": { "doctrine/coding-standard": "^6.0", diff --git a/composer.lock b/composer.lock index 24285d7..8b8ebc7 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": "1a4492e03ba66159dd47e3f4acfeead7", + "content-hash": "22e00ced600f35f37367cfae84bf5b36", "packages": [ { "name": "doctrine/inflector", @@ -1159,16 +1159,16 @@ }, { "name": "scoutapp/scout-apm-php", - "version": "v3.0.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/scoutapp/scout-apm-php.git", - "reference": "b16446e538dde680f171d6a8254dcc32c41651ac" + "reference": "b51addeb959f2718adb802c809578362b5c94a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scoutapp/scout-apm-php/zipball/b16446e538dde680f171d6a8254dcc32c41651ac", - "reference": "b16446e538dde680f171d6a8254dcc32c41651ac", + "url": "https://api.github.com/repos/scoutapp/scout-apm-php/zipball/b51addeb959f2718adb802c809578362b5c94a9e", + "reference": "b51addeb959f2718adb802c809578362b5c94a9e", "shasum": "" }, "require": { @@ -1214,7 +1214,7 @@ "monitoring", "performance" ], - "time": "2019-12-19T08:34:14+00:00" + "time": "2019-12-20T08:49:02+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -5935,6 +5935,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { + "scoutapp/scout-apm-php": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From f4542a947dee388b341fc1c5b472c66ffb58eb1b Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Mon, 23 Dec 2019 13:36:58 +0000 Subject: [PATCH 2/5] Ensure metadata is populated with framework name and version --- src/Providers/ScoutApmServiceProvider.php | 25 +++++---- .../Providers/ScoutApmServiceProviderTest.php | 54 +++++++++++++++++++ 2 files changed, 70 insertions(+), 9 deletions(-) diff --git a/src/Providers/ScoutApmServiceProvider.php b/src/Providers/ScoutApmServiceProvider.php index 1daef70..67bd26b 100644 --- a/src/Providers/ScoutApmServiceProvider.php +++ b/src/Providers/ScoutApmServiceProvider.php @@ -36,6 +36,7 @@ use function array_combine; use function array_filter; use function array_map; +use function array_merge; use function config_path; final class ScoutApmServiceProvider extends ServiceProvider @@ -51,16 +52,22 @@ public function register() : void $this->app->singleton(self::CONFIG_SERVICE_KEY, function () { $configRepo = $this->app->make(ConfigRepository::class); - return Config::fromArray(array_filter(array_combine( - ConfigKey::allConfigurationKeys(), - array_map( + return Config::fromArray(array_merge( + array_filter(array_combine( + ConfigKey::allConfigurationKeys(), + array_map( /** @return mixed */ - static function (string $configurationKey) use ($configRepo) { - return $configRepo->get('scout_apm.' . $configurationKey); - }, - ConfigKey::allConfigurationKeys() - ) - ))); + static function (string $configurationKey) use ($configRepo) { + return $configRepo->get('scout_apm.' . $configurationKey); + }, + ConfigKey::allConfigurationKeys() + ) + )), + [ + ConfigKey::FRAMEWORK => 'Laravel', + ConfigKey::FRAMEWORK_VERSION => $this->app->version(), + ] + )); }); $this->app->singleton(self::CACHE_SERVICE_KEY, static function (Application $app) { diff --git a/tests/Unit/Providers/ScoutApmServiceProviderTest.php b/tests/Unit/Providers/ScoutApmServiceProviderTest.php index 9375eee..239f724 100644 --- a/tests/Unit/Providers/ScoutApmServiceProviderTest.php +++ b/tests/Unit/Providers/ScoutApmServiceProviderTest.php @@ -34,6 +34,8 @@ use Scoutapm\Agent; use Scoutapm\Cache\DevNullCache; use Scoutapm\Config; +use Scoutapm\Connector\Connector; +use Scoutapm\Events\Metadata; use Scoutapm\Laravel\Middleware\ActionInstrument; use Scoutapm\Laravel\Middleware\IgnoredEndpoints; use Scoutapm\Laravel\Middleware\MiddlewareInstrument; @@ -43,6 +45,8 @@ use Scoutapm\Logger\FilteredLogLevelDecorator; use Scoutapm\ScoutApmAgent; use Throwable; +use function json_decode; +use function json_encode; use function putenv; use function sprintf; use function sys_get_temp_dir; @@ -53,6 +57,9 @@ final class ScoutApmServiceProviderTest extends TestCase { use MockeryPHPUnitIntegration; + private const CONFIG_SERVICE_KEY = ScoutApmAgent::class . '_config'; + private const CACHE_SERVICE_KEY = ScoutApmAgent::class . '_cache'; + private const VIEW_ENGINES_TO_WRAP = ['file', 'php', 'blade']; /** @var Application&MockObject */ @@ -351,6 +358,53 @@ function () : ScoutApmAgent { $events->dispatch(new JobProcessed('foo', $this->createMock(Job::class))); } + /** @throws BindingResolutionException */ + public function testMetadataContainsFrameworkNameAndVersion() : void + { + $connectorMock = $this->createMock(Connector::class); + + $this->application->singleton('config', static function () { + return new ConfigRepository([ + 'scout_apm' => [ + Config\ConfigKey::APPLICATION_NAME => 'Laravel Provider Test', + Config\ConfigKey::APPLICATION_KEY => 'test application key', + Config\ConfigKey::MONITORING_ENABLED => true, + ], + ]); + }); + + $this->serviceProvider->register(); + + $this->application->singleton(ScoutApmAgent::class, function () use ($connectorMock) { + return Agent::fromConfig( + $this->application->make(self::CONFIG_SERVICE_KEY), + $this->application->make(FilteredLogLevelDecorator::class), + $this->application->make(self::CACHE_SERVICE_KEY), + $connectorMock + ); + }); + + $this->bootServiceProvider(); + + $connectorMock->expects(self::at(3)) + ->method('sendCommand') + ->with(self::callback(static function (Metadata $metadata) { + $flattenedMetadata = json_decode(json_encode($metadata), true)['ApplicationEvent']['event_value']; + + self::assertArrayHasKey('framework', $flattenedMetadata); + self::assertSame('Laravel', $flattenedMetadata['framework']); + + self::assertArrayHasKey('framework_version', $flattenedMetadata); + self::assertNotSame('', $flattenedMetadata['framework_version']); + + return true; + })); + + /** @var ScoutApmAgent $agent */ + $agent = $this->application->make(ScoutApmAgent::class); + $agent->send(); + } + /** @throws BindingResolutionException */ private function bootServiceProvider() : void { From ab11e65529db23fa02135056bb3374319c8be6da Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Tue, 31 Dec 2019 10:38:28 +0000 Subject: [PATCH 3/5] Require ^3.1 of scout-apm-php --- composer.json | 2 +- composer.lock | 264 +++++++++++++++++++++++++------------------------- 2 files changed, 134 insertions(+), 132 deletions(-) diff --git a/composer.json b/composer.json index b09d4d7..8a56c11 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "illuminate/view": "^5.5.0|^6.0", "ramsey/uuid": "^3.0", "psr/log": "^1.0", - "scoutapp/scout-apm-php": "dev-master" + "scoutapp/scout-apm-php": "^3.1" }, "require-dev": { "doctrine/coding-standard": "^6.0", diff --git a/composer.lock b/composer.lock index 8b8ebc7..36f063e 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": "22e00ced600f35f37367cfae84bf5b36", + "content-hash": "31be0053cb5e4391315aa84556e14e5a", "packages": [ { "name": "doctrine/inflector", @@ -191,27 +191,26 @@ }, { "name": "egulias/email-validator", - "version": "2.1.11", + "version": "2.1.13", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23" + "reference": "834593d5900615639208417760ba6a17299e2497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/92dd169c32f6f55ba570c309d83f5209cefb5e23", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/834593d5900615639208417760ba6a17299e2497", + "reference": "834593d5900615639208417760ba6a17299e2497", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" + "php": ">=5.5" }, "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1", - "symfony/phpunit-bridge": "^4.4@dev" + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -245,20 +244,20 @@ "validation", "validator" ], - "time": "2019-08-13T17:33:27+00:00" + "time": "2019-12-30T08:14:25+00:00" }, { "name": "erusev/parsedown", - "version": "1.7.3", + "version": "1.7.4", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", - "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", "shasum": "" }, "require": { @@ -291,20 +290,20 @@ "markdown", "parser" ], - "time": "2019-03-17T18:48:37+00:00" + "time": "2019-12-30T22:54:17+00:00" }, { "name": "laravel/framework", - "version": "v6.8.0", + "version": "v6.9.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "3d1d74bf11a72f030983f39e0f6b7ec55de952f4" + "reference": "60610be97ca389fa4b959d4d13fb3690970d9fb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/3d1d74bf11a72f030983f39e0f6b7ec55de952f4", - "reference": "3d1d74bf11a72f030983f39e0f6b7ec55de952f4", + "url": "https://api.github.com/repos/laravel/framework/zipball/60610be97ca389fa4b959d4d13fb3690970d9fb7", + "reference": "60610be97ca389fa4b959d4d13fb3690970d9fb7", "shasum": "" }, "require": { @@ -437,20 +436,20 @@ "framework", "laravel" ], - "time": "2019-12-17T15:13:23+00:00" + "time": "2019-12-19T18:16:22+00:00" }, { "name": "league/flysystem", - "version": "1.0.61", + "version": "1.0.62", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4fb13c01784a6c9f165a351e996871488ca2d8c9" + "reference": "14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4fb13c01784a6c9f165a351e996871488ca2d8c9", - "reference": "4fb13c01784a6c9f165a351e996871488ca2d8c9", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0", + "reference": "14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0", "shasum": "" }, "require": { @@ -521,20 +520,20 @@ "sftp", "storage" ], - "time": "2019-12-08T21:46:50+00:00" + "time": "2019-12-29T14:46:55+00:00" }, { "name": "monolog/monolog", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f9d56fd2f5533322caccdfcddbb56aedd622ef1c" + "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9d56fd2f5533322caccdfcddbb56aedd622ef1c", - "reference": "f9d56fd2f5533322caccdfcddbb56aedd622ef1c", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8", + "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8", "shasum": "" }, "require": { @@ -602,20 +601,20 @@ "logging", "psr-3" ], - "time": "2019-11-13T10:27:43+00:00" + "time": "2019-12-20T14:22:59+00:00" }, { "name": "nesbot/carbon", - "version": "2.27.0", + "version": "2.28.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "13b8485a8690f103bf19cba64879c218b102b726" + "reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/13b8485a8690f103bf19cba64879c218b102b726", - "reference": "13b8485a8690f103bf19cba64879c218b102b726", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e2bcbcd43e67ee6101d321d5de916251d2870ca8", + "reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8", "shasum": "" }, "require": { @@ -672,7 +671,7 @@ "datetime", "time" ], - "time": "2019-11-20T06:59:06+00:00" + "time": "2019-12-16T16:30:25+00:00" }, { "name": "ocramius/package-versions", @@ -1159,16 +1158,16 @@ }, { "name": "scoutapp/scout-apm-php", - "version": "dev-master", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/scoutapp/scout-apm-php.git", - "reference": "b51addeb959f2718adb802c809578362b5c94a9e" + "reference": "0b9e816f2c333a22587732b55ce18cea61296bdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scoutapp/scout-apm-php/zipball/b51addeb959f2718adb802c809578362b5c94a9e", - "reference": "b51addeb959f2718adb802c809578362b5c94a9e", + "url": "https://api.github.com/repos/scoutapp/scout-apm-php/zipball/0b9e816f2c333a22587732b55ce18cea61296bdc", + "reference": "0b9e816f2c333a22587732b55ce18cea61296bdc", "shasum": "" }, "require": { @@ -1214,7 +1213,7 @@ "monitoring", "performance" ], - "time": "2019-12-20T08:49:02+00:00" + "time": "2019-12-31T10:18:27+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -1280,16 +1279,16 @@ }, { "name": "symfony/console", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201" + "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f0aea3df20d15635b3cb9730ca5eea1c65b7f201", - "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201", + "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", + "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", "shasum": "" }, "require": { @@ -1352,11 +1351,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-01T10:06:17+00:00" + "time": "2019-12-17T10:32:23+00:00" }, { "name": "symfony/css-selector", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -1409,16 +1408,16 @@ }, { "name": "symfony/debug", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "b8600a1d7d20b0e80906398bb1f50612fa074a8e" + "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/b8600a1d7d20b0e80906398bb1f50612fa074a8e", - "reference": "b8600a1d7d20b0e80906398bb1f50612fa074a8e", + "url": "https://api.github.com/repos/symfony/debug/zipball/5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", + "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", "shasum": "" }, "require": { @@ -1461,20 +1460,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2019-12-16T14:46:54+00:00" }, { "name": "symfony/error-handler", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "a1ad02d62789efed1d2b2796f1c15e0c6a00fc3b" + "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/a1ad02d62789efed1d2b2796f1c15e0c6a00fc3b", - "reference": "a1ad02d62789efed1d2b2796f1c15e0c6a00fc3b", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/6d7d7712a6ff5215ec26215672293b154f1db8c1", + "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1", "shasum": "" }, "require": { @@ -1517,11 +1516,11 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", - "time": "2019-12-01T08:46:01+00:00" + "time": "2019-12-16T14:46:54+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1649,7 +1648,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -1698,16 +1697,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5" + "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8bccc59e61b41963d14c3dbdb23181e5c932a1d5", - "reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62", + "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62", "shasum": "" }, "require": { @@ -1749,20 +1748,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2019-12-19T15:57:49+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "e4187780ed26129ee86d5234afbebf085e144f88" + "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e4187780ed26129ee86d5234afbebf085e144f88", - "reference": "e4187780ed26129ee86d5234afbebf085e144f88", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fe310d2e95cd4c356836c8ecb0895a46d97fede2", + "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2", "shasum": "" }, "require": { @@ -1839,11 +1838,11 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-12-01T14:06:38+00:00" + "time": "2019-12-19T16:23:40+00:00" }, { "name": "symfony/mime", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -2256,16 +2255,16 @@ }, { "name": "symfony/process", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726" + "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/51c0135ef3f44c5803b33dc60e96bf4f77752726", - "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726", + "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", "shasum": "" }, "require": { @@ -2301,20 +2300,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2019-12-06T10:06:46+00:00" }, { "name": "symfony/routing", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "51f3f20ad29329a0bdf5c0e2f722d3764b065273" + "reference": "628bcafae1b2043969378dcfbf9c196539a38722" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/51f3f20ad29329a0bdf5c0e2f722d3764b065273", - "reference": "51f3f20ad29329a0bdf5c0e2f722d3764b065273", + "url": "https://api.github.com/repos/symfony/routing/zipball/628bcafae1b2043969378dcfbf9c196539a38722", + "reference": "628bcafae1b2043969378dcfbf9c196539a38722", "shasum": "" }, "require": { @@ -2377,7 +2376,7 @@ "uri", "url" ], - "time": "2019-12-01T08:39:58+00:00" + "time": "2019-12-12T12:53:52+00:00" }, { "name": "symfony/service-contracts", @@ -2439,16 +2438,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "897fb68ee7933372517b551d6f08c6d4bb0b8c40" + "reference": "f7669f48a9633bf8139bc026c755e894b7206677" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/897fb68ee7933372517b551d6f08c6d4bb0b8c40", - "reference": "897fb68ee7933372517b551d6f08c6d4bb0b8c40", + "url": "https://api.github.com/repos/symfony/translation/zipball/f7669f48a9633bf8139bc026c755e894b7206677", + "reference": "f7669f48a9633bf8139bc026c755e894b7206677", "shasum": "" }, "require": { @@ -2511,7 +2510,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-11-12T17:18:47+00:00" + "time": "2019-12-12T12:53:52+00:00" }, { "name": "symfony/translation-contracts", @@ -2572,16 +2571,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "0a89a1dbbedd9fb2cfb2336556dec8305273c19a" + "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0a89a1dbbedd9fb2cfb2336556dec8305273c19a", - "reference": "0a89a1dbbedd9fb2cfb2336556dec8305273c19a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/be330f919bdb395d1e0c3f2bfb8948512d6bdd99", + "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99", "shasum": "" }, "require": { @@ -2644,7 +2643,7 @@ "debug", "dump" ], - "time": "2019-11-28T13:33:56+00:00" + "time": "2019-12-18T13:41:29+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3572,23 +3571,22 @@ }, { "name": "mockery/mockery", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "5571962a4f733fbb57bede39778f71647fae8e66" + "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/5571962a4f733fbb57bede39778f71647fae8e66", - "reference": "5571962a4f733fbb57bede39778f71647fae8e66", + "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", + "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.6.0", - "sebastian/comparator": "^1.2.4|^3.0" + "php": ">=5.6.0" }, "require-dev": { "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" @@ -3596,7 +3594,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -3634,7 +3632,7 @@ "test double", "testing" ], - "time": "2019-11-24T07:54:50+00:00" + "time": "2019-12-26T09:49:15+00:00" }, { "name": "myclabs/deep-copy", @@ -3987,16 +3985,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "4.3.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", "shasum": "" }, "require": { @@ -4008,6 +4006,7 @@ "require-dev": { "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", "phpunit/phpunit": "^6.4" }, "type": "library", @@ -4034,7 +4033,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2019-12-28T18:55:12+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -4085,16 +4084,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.10.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d638ebbb58daba25a6a0dc7969e1358a0e3c6682" + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d638ebbb58daba25a6a0dc7969e1358a0e3c6682", - "reference": "d638ebbb58daba25a6a0dc7969e1358a0e3c6682", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", "shasum": "" }, "require": { @@ -4144,7 +4143,7 @@ "spy", "stub" ], - "time": "2019-12-17T16:54:23+00:00" + "time": "2019-12-22T21:05:45+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -4447,16 +4446,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.0", + "version": "8.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab" + "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7870c78da3c5e4883eaef36ae47853ebb3cb86f2", + "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2", "shasum": "" }, "require": { @@ -4526,7 +4525,7 @@ "testing", "xunit" ], - "time": "2019-12-06T05:41:38+00:00" + "time": "2019-12-25T14:49:39+00:00" }, { "name": "react/event-loop", @@ -4622,12 +4621,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "1b2183eef1fdf7438d26b37dd87beb07dd4808bc" + "reference": "44a677c8e06241a66409ae6e4820dc166fc09ab2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/1b2183eef1fdf7438d26b37dd87beb07dd4808bc", - "reference": "1b2183eef1fdf7438d26b37dd87beb07dd4808bc", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/44a677c8e06241a66409ae6e4820dc166fc09ab2", + "reference": "44a677c8e06241a66409ae6e4820dc166fc09ab2", "shasum": "" }, "conflict": { @@ -4662,8 +4661,8 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.67|>=8,<8.6.16|>=8.7,<8.7.1|>8.7.3,<8.7.5", - "drupal/drupal": ">=7,<7.67|>=8,<8.6.16|>=8.7,<8.7.1|>8.7.3,<8.7.5", + "drupal/core": ">=7,<8.7.11|>=8.8,<8.8.1", + "drupal/drupal": ">=7,<8.7.11|>=8.8,<8.8.1", "erusev/parsedown": "<1.7.2", "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.4", "ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.13.1|>=6,<6.7.9.1|>=6.8,<6.13.5.1|>=7,<7.2.4.1|>=7.3,<7.3.2.1", @@ -4718,6 +4717,7 @@ "pusher/pusher-php-server": "<2.2.1", "robrichards/xmlseclibs": ">=1,<3.0.4", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", "shopware/shopware": "<5.3.7", @@ -4832,7 +4832,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2019-12-17T15:12:43+00:00" + "time": "2019-12-26T14:16:40+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5600,16 +5600,16 @@ }, { "name": "symfony/yaml", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "51b684480184fa767b97e28eaca67664e48dd3e9" + "reference": "847661e77afa48d99ecfa508e8b60f0b029a19c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/51b684480184fa767b97e28eaca67664e48dd3e9", - "reference": "51b684480184fa767b97e28eaca67664e48dd3e9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/847661e77afa48d99ecfa508e8b60f0b029a19c0", + "reference": "847661e77afa48d99ecfa508e8b60f0b029a19c0", "shasum": "" }, "require": { @@ -5655,7 +5655,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" + "time": "2019-12-10T11:06:55+00:00" }, { "name": "theseer/tokenizer", @@ -5699,22 +5699,23 @@ }, { "name": "vimeo/psalm", - "version": "3.7.2", + "version": "3.8.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d9cae720c1af31db9ba27c2bc1fcf9b0dd092fb0" + "reference": "8e54e3aa060fc490d86d0e2abbf62750516d40fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d9cae720c1af31db9ba27c2bc1fcf9b0dd092fb0", - "reference": "d9cae720c1af31db9ba27c2bc1fcf9b0dd092fb0", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/8e54e3aa060fc490d86d0e2abbf62750516d40fd", + "reference": "8e54e3aa060fc490d86d0e2abbf62750516d40fd", "shasum": "" }, "require": { "amphp/amp": "^2.1", "amphp/byte-stream": "^1.5", "composer/xdebug-handler": "^1.1", + "ext-dom": "*", "felixfbecker/advanced-json-rpc": "^3.0.3", "felixfbecker/language-server-protocol": "^1.4", "netresearch/jsonmapper": "^1.0", @@ -5735,6 +5736,7 @@ "ext-curl": "*", "friendsofphp/php-cs-fixer": "^2.15", "phpmyadmin/sql-parser": "^5.0", + "phpspec/prophecy": ">=1.9.0", "phpunit/phpunit": "^7.5 || ^8.0", "psalm/plugin-phpunit": "^0.6", "slevomat/coding-standard": "^5.0", @@ -5765,7 +5767,8 @@ "Psalm\\": "src/Psalm" }, "files": [ - "src/functions.php" + "src/functions.php", + "src/spl_object_id.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5783,7 +5786,7 @@ "inspection", "php" ], - "time": "2019-12-03T13:33:31+00:00" + "time": "2019-12-29T16:11:07+00:00" }, { "name": "webmozart/glob", @@ -5935,7 +5938,6 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "scoutapp/scout-apm-php": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From 9ebd57313d4925b1bb0bd4b662180608e0639ec5 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Tue, 31 Dec 2019 10:39:00 +0000 Subject: [PATCH 4/5] Added makefile to shortcut commands --- .gitignore | 1 + Makefile | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index d0a0d79..661048f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ composer.phar .idea .phpcs-cache .phpunit.result.cache +build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..87c6e76 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +.PHONY: * + +default: unit cs static-analysis ## all the things + +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +unit: ## run unit tests + vendor/bin/phpunit + +cs: ## verify code style rules + vendor/bin/phpcs + +static-analysis: ## verify that no new static analysis issues were introduced + vendor/bin/psalm + +coverage: ## generate code coverage reports + vendor/bin/phpunit --testsuite unit --coverage-html build/coverage-html --coverage-text From 0c66454dfe4ba7c58556784d4c8b970c7fed2ab2 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Tue, 31 Dec 2019 10:51:16 +0000 Subject: [PATCH 5/5] Added #42 to changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b95df37..76d16a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Pending [1.2.1] +### Changed + + - Configure Laravel framework name and version automatically (#42) + ## [1.2.0] 2019-12-19 ### Added