From b77e12878a0ef561ecbeb5e32d9dc15a45412f27 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 4 Jul 2016 22:33:13 +0100 Subject: [PATCH 01/10] compores update, plus bring in changes from laravel/laravel --- composer.lock | 160 +++++++++++++++---------------- config/queue.php | 6 +- config/session.php | 2 +- resources/lang/en/validation.php | 1 + 4 files changed, 85 insertions(+), 84 deletions(-) diff --git a/composer.lock b/composer.lock index 5499202f..d0d220e5 100644 --- a/composer.lock +++ b/composer.lock @@ -59,22 +59,22 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.18.21", + "version": "3.18.24", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "db88adc1569789e7d680809f51a62d2bd3410216" + "reference": "c74f6f316282b0ac6a3cd8a681171343c0e07ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/db88adc1569789e7d680809f51a62d2bd3410216", - "reference": "db88adc1569789e7d680809f51a62d2bd3410216", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c74f6f316282b0ac6a3cd8a681171343c0e07ec3", + "reference": "c74f6f316282b0ac6a3cd8a681171343c0e07ec3", "shasum": "" }, "require": { "guzzlehttp/guzzle": "~5.3|~6.0.1|~6.1", "guzzlehttp/promises": "~1.0", - "guzzlehttp/psr7": "~1.0", + "guzzlehttp/psr7": "~1.3.1", "mtdowling/jmespath.php": "~2.2", "php": ">=5.5" }, @@ -135,7 +135,7 @@ "s3", "sdk" ], - "time": "2016-06-27 22:52:29" + "time": "2016-07-01 21:27:27" }, { "name": "barnabywalters/mf-cleaner", @@ -1673,16 +1673,16 @@ }, { "name": "monolog/monolog", - "version": "1.19.0", + "version": "1.20.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", - "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", "shasum": "" }, "require": { @@ -1701,8 +1701,8 @@ "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", "swiftmailer/swiftmailer": "~5.3" }, "suggest": { @@ -1714,9 +1714,9 @@ "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", - "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" }, "type": "library", "extra": { @@ -1747,7 +1747,7 @@ "logging", "psr-3" ], - "time": "2016-04-12 18:29:35" + "time": "2016-07-02 14:02:10" }, { "name": "mtdowling/cron-expression", @@ -2653,16 +2653,16 @@ }, { "name": "symfony/console", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "382fc9ed852edabd6133e34f8549d7a7d99db115" + "reference": "a7abb7153f6d1da47f87ec50274844e246b09d9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/382fc9ed852edabd6133e34f8549d7a7d99db115", - "reference": "382fc9ed852edabd6133e34f8549d7a7d99db115", + "url": "https://api.github.com/repos/symfony/console/zipball/a7abb7153f6d1da47f87ec50274844e246b09d9f", + "reference": "a7abb7153f6d1da47f87ec50274844e246b09d9f", "shasum": "" }, "require": { @@ -2709,20 +2709,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-06-06 15:08:35" + "time": "2016-06-29 07:02:21" }, { "name": "symfony/debug", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "e67e1552dd7313df1cf6535cb606751899e0e727" + "reference": "c54bc3539c3b87e86799533801e8ae0e971d78c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/e67e1552dd7313df1cf6535cb606751899e0e727", - "reference": "e67e1552dd7313df1cf6535cb606751899e0e727", + "url": "https://api.github.com/repos/symfony/debug/zipball/c54bc3539c3b87e86799533801e8ae0e971d78c2", + "reference": "c54bc3539c3b87e86799533801e8ae0e971d78c2", "shasum": "" }, "require": { @@ -2766,20 +2766,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-06-06 15:08:35" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.1.1", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f5b7563f67779c6d3d5370e23448e707c858df3e" + "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f5b7563f67779c6d3d5370e23448e707c858df3e", - "reference": "f5b7563f67779c6d3d5370e23448e707c858df3e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7f9839ede2070f53e7e2f0849b9bd14748c434c5", + "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5", "shasum": "" }, "require": { @@ -2826,20 +2826,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:42:41" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/finder", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "39e5f3d533d07b5416b9d7aad53a27f939d4f811" + "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/39e5f3d533d07b5416b9d7aad53a27f939d4f811", - "reference": "39e5f3d533d07b5416b9d7aad53a27f939d4f811", + "url": "https://api.github.com/repos/symfony/finder/zipball/3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", + "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", "shasum": "" }, "require": { @@ -2875,20 +2875,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-05-13 18:03:36" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/http-foundation", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5" + "reference": "1341139f906d295baa4f4abd55293d07e25a065a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d268a643884f85e91d6ba11ca68de96833f3f6e5", - "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1341139f906d295baa4f4abd55293d07e25a065a", + "reference": "1341139f906d295baa4f4abd55293d07e25a065a", "shasum": "" }, "require": { @@ -2928,20 +2928,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:33:26" + "time": "2016-06-29 07:02:21" }, { "name": "symfony/http-kernel", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4" + "reference": "177b63b2d50b63fa6d82ea41359ed9928cc7a1fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", - "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/177b63b2d50b63fa6d82ea41359ed9928cc7a1fb", + "reference": "177b63b2d50b63fa6d82ea41359ed9928cc7a1fb", "shasum": "" }, "require": { @@ -2949,7 +2949,7 @@ "psr/log": "~1.0", "symfony/debug": "~2.8|~3.0", "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/http-foundation": "~2.8|~3.0" + "symfony/http-foundation": "~2.8.8|~3.0.8|~3.1.2|~3.2" }, "conflict": { "symfony/config": "<2.8" @@ -3010,7 +3010,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-06-06 16:52:35" + "time": "2016-06-30 16:30:17" }, { "name": "symfony/polyfill-mbstring", @@ -3181,16 +3181,16 @@ }, { "name": "symfony/process", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd" + "reference": "d7cde1f9d94d87060204f863779389b61c382eeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd", - "reference": "bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd", + "url": "https://api.github.com/repos/symfony/process/zipball/d7cde1f9d94d87060204f863779389b61c382eeb", + "reference": "d7cde1f9d94d87060204f863779389b61c382eeb", "shasum": "" }, "require": { @@ -3226,20 +3226,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:33:26" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/routing", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64" + "reference": "9038984bd9c05ab07280121e9e10f61a7231457b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/c780454838a1131adc756d737a4b4cc1d18f8c64", - "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64", + "url": "https://api.github.com/repos/symfony/routing/zipball/9038984bd9c05ab07280121e9e10f61a7231457b", + "reference": "9038984bd9c05ab07280121e9e10f61a7231457b", "shasum": "" }, "require": { @@ -3301,20 +3301,20 @@ "uri", "url" ], - "time": "2016-05-30 06:58:27" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/translation", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7" + "reference": "6bf844e1ee3c820c012386c10427a5c67bbefec8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", - "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", + "url": "https://api.github.com/repos/symfony/translation/zipball/6bf844e1ee3c820c012386c10427a5c67bbefec8", + "reference": "6bf844e1ee3c820c012386c10427a5c67bbefec8", "shasum": "" }, "require": { @@ -3365,20 +3365,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:33:26" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/var-dumper", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d8bb851da153d97abe7c2b71a65dee19f324bcf7" + "reference": "2f046e9a9d571f22cc8b26783564876713b06579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d8bb851da153d97abe7c2b71a65dee19f324bcf7", - "reference": "d8bb851da153d97abe7c2b71a65dee19f324bcf7", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2f046e9a9d571f22cc8b26783564876713b06579", + "reference": "2f046e9a9d571f22cc8b26783564876713b06579", "shasum": "" }, "require": { @@ -3428,7 +3428,7 @@ "debug", "dump" ], - "time": "2016-05-24 10:03:10" + "time": "2016-06-29 05:40:00" }, { "name": "themattharris/tmhoauth", @@ -5101,16 +5101,16 @@ }, { "name": "symfony/css-selector", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "e8a66c51bf65f188c02f8120c0748b2291d3a2d0" + "reference": "b8999c1f33c224b2b66b38253f5e3a838d0d0115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/e8a66c51bf65f188c02f8120c0748b2291d3a2d0", - "reference": "e8a66c51bf65f188c02f8120c0748b2291d3a2d0", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b8999c1f33c224b2b66b38253f5e3a838d0d0115", + "reference": "b8999c1f33c224b2b66b38253f5e3a838d0d0115", "shasum": "" }, "require": { @@ -5150,20 +5150,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:33:26" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/dom-crawler", - "version": "v3.0.7", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "49b588841225b205700e5122fa01911cabada857" + "reference": "62769e3409006b937bb333b29da8df9a8b262975" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/49b588841225b205700e5122fa01911cabada857", - "reference": "49b588841225b205700e5122fa01911cabada857", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/62769e3409006b937bb333b29da8df9a8b262975", + "reference": "62769e3409006b937bb333b29da8df9a8b262975", "shasum": "" }, "require": { @@ -5206,20 +5206,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-04-12 18:09:53" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/yaml", - "version": "v3.1.1", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" + "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", + "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", "shasum": "" }, "require": { @@ -5255,7 +5255,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-14 11:18:07" + "time": "2016-06-29 05:41:56" }, { "name": "webmozart/assert", diff --git a/config/queue.php b/config/queue.php index d0f732a6..b4ae7965 100644 --- a/config/queue.php +++ b/config/queue.php @@ -38,14 +38,14 @@ return [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', - 'expire' => 60, + 'expire' => 90, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', - 'ttr' => 60, + 'ttr' => 90, ], 'sqs' => [ @@ -61,7 +61,7 @@ return [ 'driver' => 'redis', 'connection' => 'default', 'queue' => 'default', - 'expire' => 60, + 'expire' => 90, ], ], diff --git a/config/session.php b/config/session.php index 33f62e49..a664ac76 100644 --- a/config/session.php +++ b/config/session.php @@ -135,7 +135,7 @@ return [ | */ - 'domain' => null, + 'domain' => env('SESSION_DOMAIN', null), /* |-------------------------------------------------------------------------- diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index b720584b..de05cd2e 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -38,6 +38,7 @@ return [ 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.' 'filled' => 'The :attribute field is required.', 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', From 12cd8725e2fe792c5e76d0455b7997c35ceea930 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Fri, 8 Jul 2016 16:54:59 +0100 Subject: [PATCH 02/10] Updated composer.lock --- composer.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/composer.lock b/composer.lock index d0d220e5..c506a6aa 100644 --- a/composer.lock +++ b/composer.lock @@ -59,16 +59,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.18.24", + "version": "3.18.27", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c74f6f316282b0ac6a3cd8a681171343c0e07ec3" + "reference": "8cc3d3231d9fb9da528205f3b905097a37ac3df3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c74f6f316282b0ac6a3cd8a681171343c0e07ec3", - "reference": "c74f6f316282b0ac6a3cd8a681171343c0e07ec3", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8cc3d3231d9fb9da528205f3b905097a37ac3df3", + "reference": "8cc3d3231d9fb9da528205f3b905097a37ac3df3", "shasum": "" }, "require": { @@ -135,7 +135,7 @@ "s3", "sdk" ], - "time": "2016-07-01 21:27:27" + "time": "2016-07-07 23:09:15" }, { "name": "barnabywalters/mf-cleaner", @@ -2437,16 +2437,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "4.3.0", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "d5ec391023ea27c78131f2d1823908d45f9e38ae" + "reference": "4b47aaebfa3ee52435a4832e1c551b424a51fdeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/d5ec391023ea27c78131f2d1823908d45f9e38ae", - "reference": "d5ec391023ea27c78131f2d1823908d45f9e38ae", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/4b47aaebfa3ee52435a4832e1c551b424a51fdeb", + "reference": "4b47aaebfa3ee52435a4832e1c551b424a51fdeb", "shasum": "" }, "require": { @@ -2493,7 +2493,7 @@ "media", "spatie" ], - "time": "2016-06-23 08:22:21" + "time": "2016-07-06 12:49:31" }, { "name": "spatie/pdf-to-image", @@ -2600,23 +2600,23 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.2", + "version": "v5.4.3", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "d8db871a54619458a805229a057ea2af33c753e8" + "reference": "4cc92842069c2bbc1f28daaaf1d2576ec4dfe153" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d8db871a54619458a805229a057ea2af33c753e8", - "reference": "d8db871a54619458a805229a057ea2af33c753e8", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/4cc92842069c2bbc1f28daaaf1d2576ec4dfe153", + "reference": "4cc92842069c2bbc1f28daaaf1d2576ec4dfe153", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "mockery/mockery": "~0.9.1,<0.9.4" + "mockery/mockery": "~0.9.1" }, "type": "library", "extra": { @@ -2649,7 +2649,7 @@ "mail", "mailer" ], - "time": "2016-05-01 08:45:47" + "time": "2016-07-08 11:51:25" }, { "name": "symfony/console", From 50126828ffbc4c257a9e4823fd1af0eb73e5447f Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 11 Jul 2016 13:31:31 +0100 Subject: [PATCH 03/10] Updated composer.lock --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index c506a6aa..e0b2e2cc 100644 --- a/composer.lock +++ b/composer.lock @@ -2437,16 +2437,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "4.4.0", + "version": "4.5.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "4b47aaebfa3ee52435a4832e1c551b424a51fdeb" + "reference": "8ba0ded185ee7c3c36d3ebb531a881f17950677d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/4b47aaebfa3ee52435a4832e1c551b424a51fdeb", - "reference": "4b47aaebfa3ee52435a4832e1c551b424a51fdeb", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/8ba0ded185ee7c3c36d3ebb531a881f17950677d", + "reference": "8ba0ded185ee7c3c36d3ebb531a881f17950677d", "shasum": "" }, "require": { @@ -2493,7 +2493,7 @@ "media", "spatie" ], - "time": "2016-07-06 12:49:31" + "time": "2016-07-09 13:49:32" }, { "name": "spatie/pdf-to-image", From 72e61032d8d1a349f020ab15de7247c287749041 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 11 Jul 2016 17:09:14 +0100 Subject: [PATCH 04/10] Allow JSON requests to the micropub endpoint --- app/Http/Controllers/MicropubController.php | 5 ++--- app/Services/NoteService.php | 18 +++++++++++++++--- app/Services/PlaceService.php | 2 +- changelog.md | 3 +++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/MicropubController.php b/app/Http/Controllers/MicropubController.php index ad1b3314..0ff28497 100644 --- a/app/Http/Controllers/MicropubController.php +++ b/app/Http/Controllers/MicropubController.php @@ -56,8 +56,7 @@ class MicropubController extends Controller $scopes = explode(' ', $tokenData->getClaim('scope')); if (array_search('post', $scopes) !== false) { $clientId = $tokenData->getClaim('client_id'); - $type = $request->input('h'); - if ($type == 'entry') { + if (($request->input('h') == 'entry') || ($request->input('type')[0] == 'h-entry')) { $note = $this->noteService->createNote($request, $clientId); $content = <<header('Location', $note->longurl) ->header('Content-Type', 'application/json'); } - if ($type == 'card') { + if ($request->input('h') == 'card' || $request->input('type')[0] == 'h-card') { $place = $this->placeService->createPlace($request); $content = <<header('Content-Type') == 'application/json') { + $content = $request->input('properties.content')[0]; + $inReplyTo = $request->input('properties.in-reply-to')[0]; + $placeSlug = $request->input('proprties.location'); + if (is_array($placeSlug)) { + $placeSlug = $placeSlug[0]; + } + } else { + $content = $request->input('content'); + $inReplyTo = $request->input('in-reply-to'); + $placeSlug = $request->input('location'); + } + $note = Note::create( [ - 'note' => $request->input('content'), - 'in_reply_to' => $request->input('in-reply-to'), + 'note' => $content, + 'in_reply_to' => $inReplyTo, 'client_id' => $clientId, ] ); - $placeSlug = $request->input('location'); if ($placeSlug !== null && $placeSlug !== 'no-location') { $place = Place::where('slug', '=', $placeSlug)->first(); $note->place()->associate($place); diff --git a/app/Services/PlaceService.php b/app/Services/PlaceService.php index b4f737af..c5e49b18 100644 --- a/app/Services/PlaceService.php +++ b/app/Services/PlaceService.php @@ -14,7 +14,7 @@ class PlaceService * @param \Illuminate\Http\Request $request * @return \App\Place */ - public function createplace(Request $request) + public function createPlace(Request $request) { //we’ll either have latitude and longitude sent together in a //geo-url (micropub), or seperatley (/admin) diff --git a/changelog.md b/changelog.md index a7b4d042..9b1baa14 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changelog +## Version {next} + - Allow new notes to be made by a JSON request from a micropub client + ## Version 0.0.7.1 (2016-07-04) - Minor style fixes From 7d381eaf812d8fc924fd489af7c1fe0833f5f216 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 11 Jul 2016 17:32:58 +0100 Subject: [PATCH 05/10] Add a test for JSON request to endpoint --- app/Services/NoteService.php | 2 +- tests/MicropubTest.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/Services/NoteService.php b/app/Services/NoteService.php index 33c88fe9..38cbe531 100644 --- a/app/Services/NoteService.php +++ b/app/Services/NoteService.php @@ -25,7 +25,7 @@ class NoteService if ($request->header('Content-Type') == 'application/json') { $content = $request->input('properties.content')[0]; $inReplyTo = $request->input('properties.in-reply-to')[0]; - $placeSlug = $request->input('proprties.location'); + $placeSlug = $request->input('properties.location'); if (is_array($placeSlug)) { $placeSlug = $placeSlug[0]; } diff --git a/tests/MicropubTest.php b/tests/MicropubTest.php index 4da3853d..26addf48 100644 --- a/tests/MicropubTest.php +++ b/tests/MicropubTest.php @@ -100,6 +100,25 @@ class MicropubTest extends TestCase $this->seeInDatabase('places', ['slug' => 'the-barton-arms']); } + public function testMicropubJSONRequestCreateNewNote() + { + $faker = \Faker\Factory::create(); + $note = $faker->text; + $this->json( + 'POST', + $this->appurl . '/api/post', + [ + 'type' => ['h-entry'], + 'properties' => [ + 'content' => [$note], + ], + ], + ['HTTP_Authorization' => 'Bearer ' . $this->getToken()] + )->seeJson([ + 'response' => 'created' + ]); + } + private function getToken() { $signer = new Sha256(); From 52b3dcb4f9163ba90014f9d48c528fc8570a355b Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 12 Jul 2016 17:28:49 +0100 Subject: [PATCH 06/10] Add DependencyCI support --- changelog.md | 1 + dependencyci.yml | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 dependencyci.yml diff --git a/changelog.md b/changelog.md index 9b1baa14..944d3438 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Version {next} - Allow new notes to be made by a JSON request from a micropub client + - Add DependencyCI support ## Version 0.0.7.1 (2016-07-04) - Minor style fixes diff --git a/dependencyci.yml b/dependencyci.yml new file mode 100644 index 00000000..6b18dab3 --- /dev/null +++ b/dependencyci.yml @@ -0,0 +1,5 @@ +# don't run unlicensed test on any development dependencies +type: + development: + tests: + unlicensed: skip From 634e0eac979007133b181e6ad81601da559f2ee0 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 12 Jul 2016 21:55:03 +0100 Subject: [PATCH 07/10] Updated .lock --- composer.lock | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index e0b2e2cc..3196a591 100644 --- a/composer.lock +++ b/composer.lock @@ -1091,12 +1091,12 @@ "source": { "type": "git", "url": "https://github.com/jonnybarnes/webmentions-parser.git", - "reference": "00ccf313a8c19bf795fc16ec71f2408ea23dd8d6" + "reference": "9f29162e826b6ad3574443a317979b006f54a94f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jonnybarnes/webmentions-parser/zipball/00ccf313a8c19bf795fc16ec71f2408ea23dd8d6", - "reference": "00ccf313a8c19bf795fc16ec71f2408ea23dd8d6", + "url": "https://api.github.com/repos/jonnybarnes/webmentions-parser/zipball/9f29162e826b6ad3574443a317979b006f54a94f", + "reference": "9f29162e826b6ad3574443a317979b006f54a94f", "shasum": "" }, "require": { @@ -1114,6 +1114,9 @@ } }, "notification-url": "https://packagist.org/downloads/", + "license": [ + "CC0-1.0" + ], "authors": [ { "name": "Jonny Barnes", @@ -1127,7 +1130,7 @@ "microformats", "webmentions" ], - "time": "2016-04-03 19:57:20" + "time": "2016-07-12 16:40:58" }, { "name": "laravel/framework", From d656c2059a620a91527f609175e153ad90121278 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 13 Jul 2016 12:46:58 +0100 Subject: [PATCH 08/10] Update .lock --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 3196a591..de1eafc6 100644 --- a/composer.lock +++ b/composer.lock @@ -1091,12 +1091,12 @@ "source": { "type": "git", "url": "https://github.com/jonnybarnes/webmentions-parser.git", - "reference": "9f29162e826b6ad3574443a317979b006f54a94f" + "reference": "087be9b61d509f20ec5808fee32bb8d40bd553ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jonnybarnes/webmentions-parser/zipball/9f29162e826b6ad3574443a317979b006f54a94f", - "reference": "9f29162e826b6ad3574443a317979b006f54a94f", + "url": "https://api.github.com/repos/jonnybarnes/webmentions-parser/zipball/087be9b61d509f20ec5808fee32bb8d40bd553ad", + "reference": "087be9b61d509f20ec5808fee32bb8d40bd553ad", "shasum": "" }, "require": { @@ -1130,7 +1130,7 @@ "microformats", "webmentions" ], - "time": "2016-07-12 16:40:58" + "time": "2016-07-13 07:54:27" }, { "name": "laravel/framework", From a93180cac7cb52cf256cfbfcde56d61b4adc45b8 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 13 Jul 2016 15:51:59 +0100 Subject: [PATCH 09/10] Use latest commonmark --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 8f5770cd..b1a8b9c0 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "martinbean/laravel-sluggable-trait": "0.2.*", "indieauth/client": "~0.1", "ezyang/htmlpurifier": "~4.6", - "league/commonmark": "^0.13.0", + "league/commonmark": "^0.14.0", "spatie/laravel-medialibrary": "^4.0", "league/flysystem-aws-s3-v3": "^1.0", "phaza/laravel-postgis": "~3.1", diff --git a/composer.lock b/composer.lock index de1eafc6..f9286a5b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "e17d58f5ff05d8a71261984fb22e0757", - "content-hash": "875c8207087b92da0cffdf369815dd27", + "hash": "f353d67fde3ccad2d10d6ded9ef3778a", + "content-hash": "74cc6cb201324d06d26c1df3bcc92475", "packages": [ { "name": "anahkiasen/underscore-php", @@ -1321,16 +1321,16 @@ }, { "name": "league/commonmark", - "version": "0.13.4", + "version": "0.14.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459" + "reference": "b73c0b7288bd0e6f9f56bd0b20d0657214b91838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/83f8210427fb01f671e272bb8d44b4ed3a94d459", - "reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/b73c0b7288bd0e6f9f56bd0b20d0657214b91838", + "reference": "b73c0b7288bd0e6f9f56bd0b20d0657214b91838", "shasum": "" }, "require": { @@ -1359,7 +1359,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.14-dev" + "dev-master": "0.15-dev" } }, "autoload": { @@ -1386,7 +1386,7 @@ "markdown", "parser" ], - "time": "2016-06-14 14:49:29" + "time": "2016-07-02 18:48:39" }, { "name": "league/flysystem", From 270525733f0f280aa161514c7285bde09ead9d6c Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 13 Jul 2016 16:32:25 +0100 Subject: [PATCH 10/10] Bump version number --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 944d3438..1ea31648 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ # Changelog -## Version {next} +## Version 0.0.8 (2016-07-13) - Allow new notes to be made by a JSON request from a micropub client - Add DependencyCI support