diff --git a/app/Console/Commands/Inspire.php b/app/Console/Commands/Inspire.php deleted file mode 100644 index db9ab854..00000000 --- a/app/Console/Commands/Inspire.php +++ /dev/null @@ -1,33 +0,0 @@ -comment(PHP_EOL.Inspiring::quote().PHP_EOL); - } -} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 71c519d3..622e774b 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - // Commands\Inspire::class, + // ]; /** @@ -27,4 +27,14 @@ class Kernel extends ConsoleKernel // $schedule->command('inspire') // ->hourly(); } + + /** + * Register the Closure based commands for the application. + * + * @return void + */ + protected function commands() + { + require base_path('routes/console.php'); + } } diff --git a/app/Events/Event.php b/app/Events/Event.php deleted file mode 100644 index ba2f8883..00000000 --- a/app/Events/Event.php +++ /dev/null @@ -1,8 +0,0 @@ -renderExceptionWithWhoops($exc); + return parent::render($request, $exception); + } + + /** + * Convert an authentication exception into an unauthenticated response. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Auth\AuthenticationException $exception + * @return \Illuminate\Http\Response + */ + protected function unauthenticated($request, AuthenticationException $exception) + { + if ($request->expectsJson()) { + return response()->json(['error' => 'Unauthenticated.'], 401); } - if ($exc instanceof ModelNotFoundException) { - $exc = new NotFoundHttpException($exc->getMessage(), $exc); - } - - if ($exc instanceof TokenMismatchException) { - return redirect()->back() - ->withInput($request->except('password', '_token')) - ->withErrors('Validation Token has expired. Please try again', 'csrf'); - } - - return parent::render($request, $exc); + return redirect()->guest('login'); } /** @@ -70,7 +70,7 @@ class Handler extends ExceptionHandler * @param \Exception $exc * @return \Illuminate\Http\Response */ - protected function renderExceptionWithWhoops(Exception $exc) + protected function renderExceptionWithWhoops(Exception $exception) { $whoops = new \Whoops\Run; $handler = new \Whoops\Handler\PrettyPageHandler(); @@ -79,7 +79,7 @@ class Handler extends ExceptionHandler }); $whoops->pushHandler($handler); - $flattened = FlattenException::create($exc); + $flattened = FlattenException::create($exception); return new \Illuminate\Http\Response( $whoops->handleException($exc), diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php new file mode 100644 index 00000000..6a247fef --- /dev/null +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -0,0 +1,32 @@ +middleware('guest'); + } +} diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php new file mode 100644 index 00000000..2abd9e04 --- /dev/null +++ b/app/Http/Controllers/Auth/LoginController.php @@ -0,0 +1,39 @@ +middleware('guest', ['except' => 'logout']); + } +} diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/RegisterController.php similarity index 67% rename from app/Http/Controllers/Auth/AuthController.php rename to app/Http/Controllers/Auth/RegisterController.php index a100dd6e..34c376cf 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -5,39 +5,38 @@ namespace App\Http\Controllers\Auth; use App\User; use Validator; use App\Http\Controllers\Controller; -use Illuminate\Foundation\Auth\ThrottlesLogins; -use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; +use Illuminate\Foundation\Auth\RegistersUsers; -class AuthController extends Controller +class RegisterController extends Controller { /* |-------------------------------------------------------------------------- - | Registration & Login Controller + | Register Controller |-------------------------------------------------------------------------- | - | This controller handles the registration of new users, as well as the - | authentication of existing users. By default, this controller uses - | a simple trait to add these behaviors. Why don't you explore it? + | This controller handles the registration of new users as well as their + | validation and creation. By default this controller uses a trait to + | provide this functionality without requiring any additional code. | */ - use AuthenticatesAndRegistersUsers, ThrottlesLogins; + use RegistersUsers; /** * Where to redirect users after login / registration. * * @var string */ - protected $redirectTo = '/'; + protected $redirectTo = '/home'; /** - * Create a new authentication controller instance. + * Create a new controller instance. * * @return void */ public function __construct() { - $this->middleware($this->guestMiddleware(), ['except' => 'logout']); + $this->middleware('guest'); } /** diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php similarity index 82% rename from app/Http/Controllers/Auth/PasswordController.php rename to app/Http/Controllers/Auth/ResetPasswordController.php index 66f77366..c73bf99f 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\ResetsPasswords; -class PasswordController extends Controller +class ResetPasswordController extends Controller { /* |-------------------------------------------------------------------------- @@ -21,12 +21,12 @@ class PasswordController extends Controller use ResetsPasswords; /** - * Create a new password controller instance. + * Create a new controller instance. * * @return void */ public function __construct() { - $this->middleware($this->guestMiddleware()); + $this->middleware('guest'); } } diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index d492e0b3..03e02a23 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -6,9 +6,8 @@ use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Auth\Access\AuthorizesResources; class Controller extends BaseController { - use AuthorizesRequests, AuthorizesResources, DispatchesJobs, ValidatesRequests; + use AuthorizesRequests, DispatchesJobs, ValidatesRequests; } diff --git a/app/Http/Controllers/NotesController.php b/app/Http/Controllers/NotesController.php index 1d6125fe..590ff654 100644 --- a/app/Http/Controllers/NotesController.php +++ b/app/Http/Controllers/NotesController.php @@ -7,6 +7,8 @@ use Twitter; use App\Tag; use App\Note; use Jonnybarnes\IndieWeb\Numbers; +use Illuminate\Filesystem\Filesystem; +use Jonnybarnes\WebmentionsParser\Authorship; // Need to sort out Twitter and webmentions! @@ -23,8 +25,8 @@ class NotesController extends Controller foreach ($notes as $note) { $replies = 0; foreach ($note->webmentions as $webmention) { - if ($webmention->type == 'reply') { - $replies = $replies + 1; + if ($webmention->type == 'in-reply-to') { + $replies++; } } $note->replies = $replies; @@ -67,31 +69,51 @@ class NotesController extends Controller public function singleNote($urlId) { $numbers = new Numbers(); + $authorship = new Authorship(); $realId = $numbers->b60tonum($urlId); $note = Note::find($realId); $replies = []; $reposts = []; $likes = []; foreach ($note->webmentions as $webmention) { + /* + reply->url | + reply->photo | Author + reply->name | + reply->source + reply->date + reply->reply + + repost->url | + repost->photo | Author + repost->name | + repost->date + repost->source + + like->url | + like->photo | Author + like->name | + */ + $microformats = json_decode($webmention->mf2); + $authorHCard = $authorship->findAuthor($microformats); + $content['url'] = $authorHCard['properties']['url'][0]; + $content['photo'] = $this->createPhotoLink($authorHCard['properties']['photo'][0]); + $content['name'] = $authorHCard['properties']['name'][0]; switch ($webmention->type) { - case 'reply': - $content = unserialize($webmention->content); - $content['source'] = $this->bridgyReply($webmention->source); - $content['photo'] = $this->createPhotoLink($content['photo']); + case 'in-reply-to': + $content['source'] = $webmention->source; $content['date'] = $carbon->parse($content['date'])->toDayDateTimeString(); + $content['reply'] = $microformats['items'][0]['properties']['content'][0]['html_purified']; $replies[] = $content; break; - case 'repost': - $content = unserialize($webmention->content); - $content['photo'] = $this->createPhotoLink($content['photo']); + case 'repost-of': $content['date'] = $carbon->parse($content['date'])->toDayDateTimeString(); + $content['source'] = $webmention->source; $reposts[] = $content; break; - case 'like': - $content = unserialize($webmention->content); - $content['photo'] = $this->createPhotoLink($content['photo']); + case 'like-of': $likes[] = $content; break; } @@ -164,41 +186,43 @@ class NotesController extends Controller return view('taggednotes', ['notes' => $notes, 'tag' => $tag]); } - /** - * Swap a brid.gy URL shim-ing a twitter reply to a real twitter link. - * - * @param string - * @return string - */ - public function bridgyReply($source) - { - $url = $source; - if (mb_substr($source, 0, 28, 'UTF-8') == 'https://brid-gy.appspot.com/') { - $parts = explode('/', $source); - $tweetId = array_pop($parts); - if ($tweetId) { - $url = 'https://twitter.com/_/status/' . $tweetId; - } - } - - return $url; - } - /** * Create the photo link. * + * We shall leave twitter.com and twimg.com links as they are. Then we shall + * check for local copies, if that fails leave the link as is. + * * @param string * @return string */ public function createPhotoLink($url) { - $host = parse_url($url)['host']; - if ($host != 'twitter.com' && $host != 'pbs.twimg.com') { - return '/assets/profile-images/' . $host . '/image'; - } - if (mb_substr($url, 0, 20) == 'http://pbs.twimg.com') { + $host = parse_url($url, PHP_URL_HOST); + if ($host == 'pbs.twimg.com') { + //make sure we use HTTPS, we know twitter supports it return str_replace('http://', 'https://', $url); } + if ($host == 'twitter.com') { + if (Cache::has($url)) { + return Cache::get($url); + } + $username = parse_url($url, PHP_URL_PATH); + try { + $info = Twitter::getUsers(['screen_name' => $username]); + $profile_image = $info->profile_image_url_https; + Cache::put($url, $profile_image, 10080); //1 week + } catch (Exception $e) { + return $url; //not sure here + } + + return $profile_image; + } + $filesystem = new Filesystem(); + if ($filesystem->exists(public_path() . '/assets/profile-images/' . $host . '/image')) { + return '/assets/profile-images/' . $host . '/image'; + } + + return $url; } /** diff --git a/app/Http/Controllers/WebMentionsController.php b/app/Http/Controllers/WebMentionsController.php index fc254058..ad0a59fe 100644 --- a/app/Http/Controllers/WebMentionsController.php +++ b/app/Http/Controllers/WebMentionsController.php @@ -28,7 +28,7 @@ class WebMentionsController extends Controller } //next check the $target is valid - $path = parse_url($request->input('target'))['path']; + $path = parse_url($request->input('target'), PHP_URL_PATH); $pathParts = explode('/', $path); switch ($pathParts[1]) { @@ -36,9 +36,8 @@ class WebMentionsController extends Controller //we have a note $noteId = $pathParts[2]; $numbers = new Numbers(); - $realId = $numbers->b60tonum($noteId); try { - $note = Note::findOrFail($realId); + $note = Note::findOrFail($numbers->b60tonum($noteId)); $this->dispatch(new ProcessWebMention($note, $request->input('source'))); } catch (ModelNotFoundException $e) { return new Response('This note doesn’t exist.', 400); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ebad4d16..0a782b36 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -29,11 +29,13 @@ class Kernel extends HttpKernel \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, \App\Http\Middleware\LinkHeadersMiddleware::class, ], 'api' => [ 'throttle:60,1', + 'bindings', ], ]; @@ -47,7 +49,7 @@ class Kernel extends HttpKernel protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'myauth' => \App\Http\Middleware\MyAuthMiddleware::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 67abcaea..00000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,30 +0,0 @@ -guest()) { - if ($request->ajax() || $request->wantsJson()) { - return response('Unauthorized.', 401); - } else { - return redirect()->guest('login'); - } - } - - return $next($request); - } -} diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php deleted file mode 100644 index 76b2ffd4..00000000 --- a/app/Http/Requests/Request.php +++ /dev/null @@ -1,10 +0,0 @@ -note = $note; $this->source = $source; + $this->guzzle = $guzzle ?? new Client(); } /** @@ -44,113 +49,83 @@ class ProcessWebMention extends Job implements ShouldQueue $sourceURL = parse_url($this->source); $baseURL = $sourceURL['scheme'] . '://' . $sourceURL['host']; $remoteContent = $this->getRemoteContent($this->source); - $microformats = $this->parseHTML($remoteContent, $baseURL); - $count = WebMention::where('source', '=', $this->source)->count(); - if ($count > 0) { - //we already have a webmention from this source - $webmentions = WebMention::where('source', '=', $this->source)->get(); - foreach ($webmentions as $webmention) { - //now check it still 'mentions' this target - //we switch for each type of mention (reply/like/repost) - switch ($webmention->type) { - case 'reply': - if ($parser->checkInReplyTo($microformats, $note->longurl) == false) { - //it doesn't so delete - $webmention->delete(); + if ($remoteContent === null) { + throw new RemoteContentNotFoundException; + } + $microformats = Mf2\parse($remoteContent, $baseURL); + $webmentions = WebMention::where('source', $this->source)->get(); + foreach ($webmentions as $webmention) { + //check webmention still references target + //we try each type of mention (reply/like/repost) + if ($webmention->type == 'in-reply-to') { + if ($parser->checkInReplyTo($microformats, $this->note->longurl) == false) { + //it doesn't so delete + $webmention->delete(); - return true; - } - //webmenion is still a reply, so update content - $content = $parser->replyContent($microformats); - $this->saveImage($content); - $content['reply'] = $this->filterHTML($content['reply']); - $content = serialize($content); - $webmention->content = $content; - $webmention->save(); + return; + } + //webmenion is still a reply, so update content + $microformats = $this->filterHTML($microformats); + $this->dispatch(new SaveProfileImage($microformats)); + $webmention->mf2 = json_encode($microformats); + $webmention->save(); - return true; - break; - case 'like': - if ($parser->checkLikeOf($microformats, $note->longurl) == false) { - //it doesn't so delete - $webmention->delete(); + return; + } + if ($webmention->type == 'like-of') { + if ($parser->checkLikeOf($microformats, $note->longurl) == false) { + //it doesn't so delete + $webmention->delete(); - return true; - } //note we don't need to do anything if it still is a like - break; - case 'repost': - if ($parser->checkRepostOf($microformats, $note->longurl) == false) { - //it doesn't so delete - $webmention->delete(); + return; + } //note we don't need to do anything if it still is a like + } + if ($webmention->type == 'repost-of') { + if ($parser->checkRepostOf($microformats, $note->longurl) == false) { + //it doesn't so delete + $webmention->delete(); + + return; + } //again, we don't need to do anything if it still is a repost + } + }//foreach - return true; - } //again, we don't need to do anything if it still is a repost - break; - }//switch - }//foreach - }//if //no wemention in db so create new one $webmention = new WebMention(); - //check it is in fact a reply - if ($parser->checkInReplyTo($microformats, $note->longurl)) { - $content = $parser->replyContent($microformats); - $this->saveImage($content); - $content['reply'] = $this->filterHTML($content['reply']); - $content = serialize($content); - $webmention->source = $this->source; - $webmention->target = $note->longurl; - $webmention->commentable_id = $this->note->id; - $webmention->commentable_type = 'App\Note'; - $webmention->type = 'reply'; - $webmention->content = $content; - $webmention->save(); - - return true; - } elseif ($parser->checkLikeOf($microformats, $note->longurl)) { - //it is a like - $content = $parser->likeContent($microformats); - $this->saveImage($content); - $content = serialize($content); - $webmention->source = $this->source; - $webmention->target = $note->longurl; - $webmention->commentable_id = $this->note->id; - $webmention->commentable_type = 'App\Note'; - $webmention->type = 'like'; - $webmention->content = $content; - $webmention->save(); - - return true; - } elseif ($parser->checkRepostOf($microformats, $note->longurl)) { - //it is a repost - $content = $parser->repostContent($microformats); - $this->saveImage($content); - $content = serialize($content); - $webmention->source = $this->source; - $webmention->target = $note->longurl; - $webmention->commentable_id = $this->note->id; - $webmention->commentable_type = 'App\Note'; - $webmention->type = 'repost'; - $webmention->content = $content; - $webmention->save(); - - return true; - } + $type = $parser->getMentionType($microformats); //throw error here? + $this->dispatch(new SaveProfileImage($microformats)); + $microformats = $this->filterHTML($microformats); + $webmention->source = $this->source; + $webmention->target = $this->note->longurl; + $webmention->commentable_id = $this->note->id; + $webmention->commentable_type = 'App\Note'; + $webmention->type = $type; + $webmention->mf2 = json_encode($microformats); + $webmention->save(); } /** * Retreive the remote content from a URL, and caches the result. * - * @param string The URL to retreive content from - * @return string The HTML from the URL + * @param string The URL to retreive content from + * @return string|null The HTML from the URL (or null if error) */ private function getRemoteContent($url) { - $client = new Client(); - - $response = $client->get($url); + try { + $response = $this->guzzle->request('GET', $url); + } catch (RequestException $e) { + return; + } $html = (string) $response->getBody(); $path = storage_path() . '/HTML/' . $this->createFilenameFromURL($url); - $this->fileForceContents($path, $html); + $parts = explode('/', $path); + $name = array_pop($parts); + $dir = implode('/', $parts); + if (! is_dir($dir)) { + mkdir($dir, 0755, true); + } + file_put_contents("$dir/$name", $html); return $html; } @@ -173,79 +148,29 @@ class ProcessWebMention extends Job implements ShouldQueue } /** - * Save a file, and create any necessary folders. + * Filter the HTML in a reply webmention. * - * @param string The directory to save to - * @param binary The file to save + * @param array The unfiltered microformats + * @return array The filtered microformats */ - private function fileForceContents($dir, $contents) + private function filterHTML($microformats) { - $parts = explode('/', $dir); - $name = array_pop($parts); - $dir = implode('/', $parts); - if (! is_dir($dir)) { - mkdir($dir, 0755, true); + if (isset($microformats['items'][0]['properties']['content'][0]['html'])) { + $microformats['items'][0]['properties']['content'][0]['html_purified'] = $this->useHTMLPurifier( + $microformats['items'][0]['properties']['content'][0]['html'] + ); } - file_put_contents("$dir/$name", $contents); - } - - /** - * A wrapper function for php-mf2’s parse method. - * - * @param string The HTML to parse - * @param string The base URL to resolve relative URLs in the HTML against - * @return array The porcessed microformats - */ - private function parseHTML($html, $baseurl) - { - $microformats = \Mf2\parse((string) $html, $baseurl); return $microformats; } /** - * Save a profile image to the local cache. - * - * @param array source content - * @return bool wether image was saved or not (we don’t save twitter profiles) - */ - public function saveImage(array $content) - { - $photo = $content['photo']; - $home = $content['url']; - //dont save pbs.twimg.com links - if (parse_url($photo)['host'] != 'pbs.twimg.com' - && parse_url($photo)['host'] != 'twitter.com') { - $client = new Client(); - try { - $response = $client->get($photo); - $image = $response->getBody(true); - $path = public_path() . '/assets/profile-images/' . parse_url($home)['host'] . '/image'; - $this->fileForceContents($path, $image); - } catch (Exception $e) { - // we are openning and reading the default image so that - // fileForceContent work - $default = public_path() . '/assets/profile-images/default-image'; - $handle = fopen($default, 'rb'); - $image = fread($handle, filesize($default)); - fclose($handle); - $path = public_path() . '/assets/profile-images/' . parse_url($home)['host'] . '/image'; - $this->fileForceContents($path, $image); - } - - return true; - } - - return false; - } - - /** - * Purify HTML received from a webmention. + * Set up and use HTMLPurifer on some HTML. * * @param string The HTML to be processed * @return string The processed HTML */ - public function filterHTML($html) + private function useHTMLPurifier($html) { $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.SerializerPath', storage_path() . '/HTMLPurifier'); diff --git a/app/Jobs/SaveProfileImage.php b/app/Jobs/SaveProfileImage.php new file mode 100644 index 00000000..8509a0d4 --- /dev/null +++ b/app/Jobs/SaveProfileImage.php @@ -0,0 +1,66 @@ +microformats = $microformats; + } + + /** + * Execute the job. + * + * @return void + */ + public function handle(Authorship $authorship) + { + try { + $author = $authorship->findAuthor($microformats); + } catch (AuthorshipParserException $e) { + return; + } + $photo = $author['properties'][0]['photo'][0]; + $home = $author['properties'][0]['url'][0]; + //dont save pbs.twimg.com links + if (parse_url($photo, PHP_URL_HOST) != 'pbs.twimg.com' + && parse_url($photo, PHP_URL_HOST) != 'twitter.com') { + $client = new Client(); + try { + $response = $client->get($photo); + $image = $response->getBody(true); + } catch (RequestException $e) { + // we are openning and reading the default image so that + $default = public_path() . '/assets/profile-images/default-image'; + $handle = fopen($default, 'rb'); + $image = fread($handle, filesize($default)); + fclose($handle); + } + $path = public_path() . '/assets/profile-images/' . parse_url($home, PHP_URL_HOST) . '/image'; + $parts = explode('/', $path); + $name = array_pop($parts); + $dir = implode('/', $parts); + if (! is_dir($dir)) { + mkdir($dir, 0755, true); + } + file_put_contents("$dir/$name", $image); + } + } +} diff --git a/app/Jobs/SendWebMentions.php b/app/Jobs/SendWebMentions.php index 4cfbaafc..87f3dfa2 100644 --- a/app/Jobs/SendWebMentions.php +++ b/app/Jobs/SendWebMentions.php @@ -20,9 +20,10 @@ class SendWebMentions extends Job implements ShouldQueue * @param Note $note * @return void */ - public function __construct(Note $note) + public function __construct(Note $note, Client $guzzle = null) { $this->note = $note; + $this->guzzle = $guzzle ?? new Client(); } /** @@ -31,16 +32,16 @@ class SendWebMentions extends Job implements ShouldQueue * @param \GuzzleHttp\Client $guzzle * @return void */ - public function handle(Client $guzzle) + public function handle() { //grab the URLs $urlsInReplyTo = explode(' ', $this->note->in_reply_to); $urlsNote = $this->getLinks($this->note->note); $urls = array_filter(array_merge($urlsInReplyTo, $urlsNote)); //filter out none URLs foreach ($urls as $url) { - $endpoint = $this->discoverWebmentionEndpoint($url, $guzzle); + $endpoint = $this->discoverWebmentionEndpoint($url, $this->guzzle); if ($endpoint) { - $guzzle->post($endpoint, [ + $this->guzzle->post($endpoint, [ 'form_params' => [ 'source' => $this->note->longurl, 'target' => $url, @@ -73,8 +74,8 @@ class SendWebMentions extends Job implements ShouldQueue //check HTTP Headers for webmention endpoint $links = \GuzzleHttp\Psr7\parse_header($response->getHeader('Link')); foreach ($links as $link) { - if ($link['rel'] == 'webmention') { - return trim($link[0], '<>'); + if (mb_stristr($link['rel'], 'webmention')) { + return $this->resolveUri($link[0], $url); } } @@ -89,11 +90,7 @@ class SendWebMentions extends Job implements ShouldQueue $endpoint = $rels[0]['http://webmention.org/'][0]; } if ($endpoint) { - if (filter_var($endpoint, FILTER_VALIDATE_URL)) { - return $endpoint; - } - //it must be a relative url, so resolve with php-mf2 - return $mf2->resolveUrl($endpoint); + return $this->resolveUri($endpoint, $url); } return false; @@ -105,7 +102,7 @@ class SendWebMentions extends Job implements ShouldQueue * @param string $html * @return array $urls */ - private function getLinks($html) + public function getLinks($html) { $urls = []; $dom = new \DOMDocument(); @@ -117,4 +114,24 @@ class SendWebMentions extends Job implements ShouldQueue return $urls; } + + /** + * Resolve a URI if necessary. + * + * @param string $url + * @param string $base + * @return string + */ + public function resolveUri(string $url, string $base): string + { + $endpoint = \GuzzleHttp\Psr7\uri_for($url); + if ($endpoint->getScheme() !== null) { + return (string) $endpoint; + } + + return (string) \GuzzleHttp\Psr7\Uri::resolve( + \GuzzleHttp\Psr7\uri_for($base), + $endpoint + ); + } } diff --git a/app/Listeners/.gitkeep b/app/Listeners/.gitkeep deleted file mode 100644 index 8b137891..00000000 --- a/app/Listeners/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/Policies/.gitkeep b/app/Policies/.gitkeep deleted file mode 100644 index 8b137891..00000000 --- a/app/Policies/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 57d88ea3..f3e3c3fc 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,7 +2,6 @@ namespace App\Providers; -use Illuminate\Contracts\Auth\Access\Gate as GateContract; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; class AuthServiceProvider extends ServiceProvider @@ -19,12 +18,11 @@ class AuthServiceProvider extends ServiceProvider /** * Register any application authentication / authorization services. * - * @param \Illuminate\Contracts\Auth\Access\Gate $gate * @return void */ - public function boot(GateContract $gate) + public function boot() { - $this->registerPolicies($gate); + $this->registerPolicies(); // } diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php new file mode 100644 index 00000000..1dcf8d28 --- /dev/null +++ b/app/Providers/BroadcastServiceProvider.php @@ -0,0 +1,26 @@ +id === (int) $userId; + }); + } +} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 58ce9624..ed0e3e5b 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,7 +2,7 @@ namespace App\Providers; -use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; +use Illuminate\Support\Facades\Event; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class EventServiceProvider extends ServiceProvider @@ -21,12 +21,11 @@ class EventServiceProvider extends ServiceProvider /** * Register any other events for your application. * - * @param \Illuminate\Contracts\Events\Dispatcher $events * @return void */ - public function boot(DispatcherContract $events) + public function boot() { - parent::boot($events); + parent::boot(); // } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index bde08819..7008f451 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -2,7 +2,7 @@ namespace App\Providers; -use Illuminate\Routing\Router; +use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider @@ -22,22 +22,23 @@ class RouteServiceProvider extends ServiceProvider * @param \Illuminate\Routing\Router $router * @return void */ - public function boot(Router $router) + public function boot() { // - parent::boot($router); + parent::boot(); } /** * Define the routes for the application. * - * @param \Illuminate\Routing\Router $router * @return void */ - public function map(Router $router) + public function map() { - $this->mapWebRoutes($router); + $this->mapWebRoutes(); + + $this->mapApiRoutes(); // } @@ -47,15 +48,33 @@ class RouteServiceProvider extends ServiceProvider * * These routes all receive session state, CSRF protection, etc. * - * @param \Illuminate\Routing\Router $router * @return void */ - protected function mapWebRoutes(Router $router) + protected function mapWebRoutes() { - $router->group([ - 'namespace' => $this->namespace, 'middleware' => 'web', + Route::group([ + 'middleware' => 'web', + 'namespace' => $this->namespace, ], function ($router) { - require app_path('Http/routes.php'); + require base_path('routes/web.php'); + }); + } + + /** + * Define the "api" routes for the application. + * + * These routes are typically stateless. + * + * @return void + */ + protected function mapApiRoutes() + { + Route::group([ + 'middleware' => 'api', + 'namespace' => $this->namespace, + 'prefix' => 'api', + ], function ($router) { + require base_path('routes/api.php'); }); } } diff --git a/app/User.php b/app/User.php index 75741ae4..bfd96a6a 100644 --- a/app/User.php +++ b/app/User.php @@ -2,10 +2,13 @@ namespace App; +use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; class User extends Authenticatable { + use Notifiable; + /** * The attributes that are mass assignable. * diff --git a/changelog.md b/changelog.md index f6b62544..2e0f91db 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## Version 0.0.9 (2016-09-06) + - Adding jsonb column to store webmentions’ mf2. + * As of L5.2 this needs a custom command to drop NOT NULL from content, L5.3 should allow a fix for this + - Refactor receiving webmention code + - Refactor sending webmention code to pass webmention.rocks + - Update to use Laravel 5.3 + ## Version 0.0.8.5 (2016-07-18) - Set the size of the textarea in a form better - Update to latest Guzzle to fix CVE-2016-5385 diff --git a/composer.json b/composer.json index b1a8b9c0..f4656161 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,13 @@ { "name": "jonnybarnes/jonnybarnes.uk", - "description": "The code for jonnybanres.uk, based on Laravel 5.2", + "description": "The code for jonnybanres.uk, based on Laravel 5.3", "keywords": ["framework", "laravel", "indieweb"], "license": "CC0-1.0", "type": "project", "require": { "ext-intl": "*", "php": ">=7.0.0", - "laravel/framework": "5.2.*", + "laravel/framework": "5.3.*", "jonnybarnes/indieweb": "dev-master", "jonnybarnes/webmentions-parser": "dev-master", "guzzlehttp/guzzle": "~6.0", @@ -27,8 +27,8 @@ "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~5.0", - "symfony/css-selector": "2.8.*|3.0.*", - "symfony/dom-crawler": "2.8.*|3.0.*", + "symfony/css-selector": "3.1.*", + "symfony/dom-crawler": "3.1.*", "barryvdh/laravel-debugbar": "~2.0", "filp/whoops": "~2.0" }, diff --git a/composer.lock b/composer.lock index da7115b0..1da9d527 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": "f353d67fde3ccad2d10d6ded9ef3778a", - "content-hash": "74cc6cb201324d06d26c1df3bcc92475", + "hash": "7a7231eebef62c0fb518cf030d531d95", + "content-hash": "3815acce9215a64c27a68ada0123dc48", "packages": [ { "name": "anahkiasen/underscore-php", @@ -59,20 +59,20 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.18.28", + "version": "3.19.4", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c75d3ba185d5db6998124fa1a99a63e5d529b247" + "reference": "f67bc37fa4b76d85423052eae2a9577aab99adc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c75d3ba185d5db6998124fa1a99a63e5d529b247", - "reference": "c75d3ba185d5db6998124fa1a99a63e5d529b247", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f67bc37fa4b76d85423052eae2a9577aab99adc1", + "reference": "f67bc37fa4b76d85423052eae2a9577aab99adc1", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~5.3|~6.0.1|~6.1", + "guzzlehttp/guzzle": "^5.3.1|^6.2.1", "guzzlehttp/promises": "~1.0", "guzzlehttp/psr7": "~1.3.1", "mtdowling/jmespath.php": "~2.2", @@ -135,7 +135,7 @@ "s3", "sdk" ], - "time": "2016-07-13 20:34:06" + "time": "2016-09-01 21:37:32" }, { "name": "barnabywalters/mf-cleaner", @@ -179,55 +179,57 @@ }, { "name": "bosnadev/database", - "version": "0.16", + "version": "0.18", "source": { "type": "git", - "url": "https://github.com/Bosnadev/Database.git", - "reference": "c2748d118415d30ce69b792448689285d01ffdb9" + "url": "https://github.com/bosnadev/database.git", + "reference": "3ada618cb0c218dde0fbc7229df40bd511dd975e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bosnadev/Database/zipball/c2748d118415d30ce69b792448689285d01ffdb9", - "reference": "c2748d118415d30ce69b792448689285d01ffdb9", + "url": "https://api.github.com/repos/bosnadev/database/zipball/3ada618cb0c218dde0fbc7229df40bd511dd975e", + "reference": "3ada618cb0c218dde0fbc7229df40bd511dd975e", "shasum": "" }, "require": { - "illuminate/database": "~5.0", + "doctrine/dbal": "^2.5", + "illuminate/database": "^5.0", "php": ">=5.4", - "ramsey/uuid": "~3.0" + "ramsey/uuid": "^3.0" }, "require-dev": { - "doctrine/dbal": "~2.5", "mockery/mockery": "0.9.*", - "php": ">=5.4", "phpunit/phpunit": "~4.5" }, "type": "library", "autoload": { "psr-4": { - "Bosnadev\\Database\\": "src/" + "Bosnadev\\Database\\": "src/Bosnadev/Database/" } }, "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], "authors": [ - { - "name": "Mirza Pasic", - "email": "mirza.pasic@edu.fit.ba" - }, { "name": "Peter Haza", "email": "peter.haza@gmail.com" + }, + { + "name": "Mirza Pasic", + "email": "mirza@bosnadev.com" } ], - "description": "Eloquent Extended, added some PostgreSql features", + "description": "Eloquent Extended, added some PostgreSQL features", + "homepage": "https://bosnadev.com", "keywords": [ "database", "eloquent", "laravel", - "mysql", "postgresql" ], - "time": "2016-04-27 15:18:36" + "time": "2016-08-19 16:43:44" }, { "name": "classpreloader/classpreloader", @@ -316,6 +318,354 @@ "description": "implementation of xdg base directory specification for php", "time": "2014-10-24 07:27:01" }, + { + "name": "doctrine/annotations", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2015-08-31 12:32:49" + }, + { + "name": "doctrine/cache", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/f8af318d14bdb0eff0336795b428b547bd39ccb6", + "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2015-12-31 16:37:02" + }, + { + "name": "doctrine/collections", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2015-04-14 22:21:58" + }, + { + "name": "doctrine/common", + "version": "v2.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", + "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": "~5.5|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ], + "time": "2015-12-25 13:18:31" + }, + { + "name": "doctrine/dbal", + "version": "v2.5.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/abbdfd1cff43a7b99d027af3be709bc8fc7d4769", + "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769", + "shasum": "" + }, + "require": { + "doctrine/common": ">=2.4,<2.7-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2016-01-05 22:11:12" + }, { "name": "doctrine/inflector", "version": "v1.1.0", @@ -384,17 +734,71 @@ "time": "2015-11-06 14:35:42" }, { - "name": "ezyang/htmlpurifier", - "version": "v4.7.0", + "name": "doctrine/lexer", + "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "ae1828d955112356f7677c465f94f7deb7d27a40" + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40", - "reference": "ae1828d955112356f7677c465f94f7deb7d27a40", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09 13:34:57" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.8.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", "shasum": "" }, "require": { @@ -425,31 +829,26 @@ "keywords": [ "html" ], - "time": "2015-08-05 01:03:42" + "time": "2016-07-16 12:58:58" }, { "name": "geo-io/interface", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/geo-io/interface.git", - "reference": "cdbb55801e3f8d5485227c2031cc7a3c16ccd06a" + "reference": "cf46fe7b013de20ab8b601238c7d91b480810644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/geo-io/interface/zipball/cdbb55801e3f8d5485227c2031cc7a3c16ccd06a", - "reference": "cdbb55801e3f8d5485227c2031cc7a3c16ccd06a", + "url": "https://api.github.com/repos/geo-io/interface/zipball/cf46fe7b013de20ab8b601238c7d91b480810644", + "reference": "cf46fe7b013de20ab8b601238c7d91b480810644", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "GeoIO\\": "src/" @@ -471,7 +870,7 @@ "geometry", "io" ], - "time": "2015-04-17 18:52:52" + "time": "2016-07-28 07:17:02" }, { "name": "geo-io/wkb-parser", @@ -783,16 +1182,16 @@ }, { "name": "intervention/image", - "version": "2.3.7", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "22088b04728a039bd1fc32f7e79a89a118b78698" + "reference": "4064a980324f6c3bfa2bd981dfb247afa705ec3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/22088b04728a039bd1fc32f7e79a89a118b78698", - "reference": "22088b04728a039bd1fc32f7e79a89a118b78698", + "url": "https://api.github.com/repos/Intervention/image/zipball/4064a980324f6c3bfa2bd981dfb247afa705ec3c", + "reference": "4064a980324f6c3bfa2bd981dfb247afa705ec3c", "shasum": "" }, "require": { @@ -841,7 +1240,7 @@ "thumbnail", "watermark" ], - "time": "2016-04-26 14:08:40" + "time": "2016-09-01 17:04:03" }, { "name": "jakub-onderka/php-console-color", @@ -1134,16 +1533,16 @@ }, { "name": "laravel/framework", - "version": "v5.2.39", + "version": "v5.3.6", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a" + "reference": "c63a7fb7066fea2bce91ace5c830c01d503abe6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/c2a77050269b4e03bd9a735a9f24e573a7598b8a", - "reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a", + "url": "https://api.github.com/repos/laravel/framework/zipball/c63a7fb7066fea2bce91ace5c830c01d503abe6c", + "reference": "c63a7fb7066fea2bce91ace5c830c01d503abe6c", "shasum": "" }, "require": { @@ -1156,20 +1555,20 @@ "monolog/monolog": "~1.11", "mtdowling/cron-expression": "~1.0", "nesbot/carbon": "~1.20", - "paragonie/random_compat": "~1.4", - "php": ">=5.5.9", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4", "psy/psysh": "0.7.*", + "ramsey/uuid": "~3.0", "swiftmailer/swiftmailer": "~5.1", - "symfony/console": "2.8.*|3.0.*", - "symfony/debug": "2.8.*|3.0.*", - "symfony/finder": "2.8.*|3.0.*", - "symfony/http-foundation": "2.8.*|3.0.*", - "symfony/http-kernel": "2.8.*|3.0.*", - "symfony/polyfill-php56": "~1.0", - "symfony/process": "2.8.*|3.0.*", - "symfony/routing": "2.8.*|3.0.*", - "symfony/translation": "2.8.*|3.0.*", - "symfony/var-dumper": "2.8.*|3.0.*", + "symfony/console": "3.1.*", + "symfony/debug": "3.1.*", + "symfony/finder": "3.1.*", + "symfony/http-foundation": "3.1.*", + "symfony/http-kernel": "3.1.*", + "symfony/process": "3.1.*", + "symfony/routing": "3.1.*", + "symfony/translation": "3.1.*", + "symfony/var-dumper": "3.1.*", "vlucas/phpdotenv": "~2.2" }, "replace": { @@ -1200,16 +1599,17 @@ "illuminate/support": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version" + "illuminate/view": "self.version", + "tightenco/collect": "self.version" }, "require-dev": { "aws/aws-sdk-php": "~3.0", "mockery/mockery": "~0.9.4", "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~4.1", + "phpunit/phpunit": "~5.4", "predis/predis": "~1.0", - "symfony/css-selector": "2.8.*|3.0.*", - "symfony/dom-crawler": "2.8.*|3.0.*" + "symfony/css-selector": "3.1.*", + "symfony/dom-crawler": "3.1.*" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", @@ -1221,20 +1621,17 @@ "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (3.1.*).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (3.1.*).", "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2-dev" + "dev-master": "5.3-dev" } }, "autoload": { - "classmap": [ - "src/Illuminate/Queue/IlluminateQueueClosure.php" - ], "files": [ "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" @@ -1250,29 +1647,29 @@ "authors": [ { "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" + "email": "taylor@laravel.com" } ], "description": "The Laravel Framework.", - "homepage": "http://laravel.com", + "homepage": "https://laravel.com", "keywords": [ "framework", "laravel" ], - "time": "2016-06-17 19:25:12" + "time": "2016-09-01 14:06:47" }, { "name": "lcobucci/jwt", - "version": "3.1.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "afea8e682e911a21574fd8519321b32522fa25b5" + "reference": "7668cb045296f290588d04c391569c7b7fc1f899" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/afea8e682e911a21574fd8519321b32522fa25b5", - "reference": "afea8e682e911a21574fd8519321b32522fa25b5", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/7668cb045296f290588d04c391569c7b7fc1f899", + "reference": "7668cb045296f290588d04c391569c7b7fc1f899", "shasum": "" }, "require": { @@ -1280,7 +1677,7 @@ "php": ">=5.5" }, "require-dev": { - "mdanter/ecc": "~0.3", + "mdanter/ecc": "~0.3.1", "mikey179/vfsstream": "~1.5", "phpmd/phpmd": "~2.2", "phpunit/php-invoker": "~1.1", @@ -1317,7 +1714,7 @@ "JWS", "jwt" ], - "time": "2016-03-24 22:46:13" + "time": "2016-08-13 23:12:58" }, { "name": "league/commonmark", @@ -1390,16 +1787,16 @@ }, { "name": "league/flysystem", - "version": "1.0.25", + "version": "1.0.27", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a76afa4035931be0c78ca8efc6abf3902362f437" + "reference": "50e2045ed70a7e75a5e30bc3662904f3b67af8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a76afa4035931be0c78ca8efc6abf3902362f437", - "reference": "a76afa4035931be0c78ca8efc6abf3902362f437", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/50e2045ed70a7e75a5e30bc3662904f3b67af8a9", + "reference": "50e2045ed70a7e75a5e30bc3662904f3b67af8a9", "shasum": "" }, "require": { @@ -1469,7 +1866,7 @@ "sftp", "storage" ], - "time": "2016-07-18 12:22:57" + "time": "2016-08-10 08:55:11" }, { "name": "league/flysystem-aws-s3-v3", @@ -1520,16 +1917,16 @@ }, { "name": "league/glide", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/thephpleague/glide.git", - "reference": "4218b548401ff3a8f602e2c3f78849a381b2c1bf" + "reference": "5d71f2fb030907fdd9552b4952d1ecdc1804702e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/glide/zipball/4218b548401ff3a8f602e2c3f78849a381b2c1bf", - "reference": "4218b548401ff3a8f602e2c3f78849a381b2c1bf", + "url": "https://api.github.com/repos/thephpleague/glide/zipball/5d71f2fb030907fdd9552b4952d1ecdc1804702e", + "reference": "5d71f2fb030907fdd9552b4952d1ecdc1804702e", "shasum": "" }, "require": { @@ -1546,7 +1943,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -1577,7 +1974,7 @@ "manipulation", "processing" ], - "time": "2016-06-13 14:45:28" + "time": "2016-08-19 20:49:36" }, { "name": "martinbean/laravel-sluggable-trait", @@ -1676,16 +2073,16 @@ }, { "name": "monolog/monolog", - "version": "1.20.0", + "version": "1.21.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" + "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", - "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952", + "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952", "shasum": "" }, "require": { @@ -1750,7 +2147,7 @@ "logging", "psr-3" ], - "time": "2016-07-02 14:02:10" + "time": "2016-07-29 03:23:52" }, { "name": "mtdowling/cron-expression", @@ -1951,16 +2348,16 @@ }, { "name": "paragonie/random_compat", - "version": "v1.4.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf", + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf", "shasum": "" }, "require": { @@ -1995,7 +2392,7 @@ "pseudorandom", "random" ], - "time": "2016-03-18 20:34:03" + "time": "2016-04-03 06:00:07" }, { "name": "patchwork/utf8", @@ -2158,16 +2555,16 @@ }, { "name": "psr/http-message", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -2195,6 +2592,7 @@ } ], "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", @@ -2203,7 +2601,7 @@ "request", "response" ], - "time": "2015-05-04 20:22:00" + "time": "2016-08-06 14:39:51" }, { "name": "psr/log", @@ -2317,16 +2715,16 @@ }, { "name": "ramsey/uuid", - "version": "3.4.1", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "b4fe3b7387cb323fd15ad5837cae992422c9fa5c" + "reference": "a6d15c8618ea3951fd54d34e326b68d3d0bc0786" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/b4fe3b7387cb323fd15ad5837cae992422c9fa5c", - "reference": "b4fe3b7387cb323fd15ad5837cae992422c9fa5c", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/a6d15c8618ea3951fd54d34e326b68d3d0bc0786", + "reference": "a6d15c8618ea3951fd54d34e326b68d3d0bc0786", "shasum": "" }, "require": { @@ -2344,7 +2742,7 @@ "jakub-onderka/php-parallel-lint": "^0.9.0", "mockery/mockery": "^0.9.4", "moontoast/math": "^1.1", - "phpunit/phpunit": "^4.7|^5.0", + "phpunit/phpunit": "^4.7|>=5.0 <5.4", "satooshi/php-coveralls": "^0.6.1", "squizlabs/php_codesniffer": "^2.3" }, @@ -2393,7 +2791,7 @@ "identifier", "uuid" ], - "time": "2016-04-24 00:30:41" + "time": "2016-08-02 18:39:32" }, { "name": "spatie/laravel-glide", @@ -2440,35 +2838,42 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "4.7.0", + "version": "4.8.3", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "c914f9e32c5a69301dab9fb8b17f2b2a579a24d6" + "reference": "7fcb591ff0ef2d28b9b622f84f972c642ff3e8f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/c914f9e32c5a69301dab9fb8b17f2b2a579a24d6", - "reference": "c914f9e32c5a69301dab9fb8b17f2b2a579a24d6", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/7fcb591ff0ef2d28b9b622f84f972c642ff3e8f9", + "reference": "7fcb591ff0ef2d28b9b622f84f972c642ff3e8f9", "shasum": "" }, "require": { - "illuminate/bus": "~5.1.16|~5.2.0", - "illuminate/console": "~5.1.16|~5.2.0", - "illuminate/database": "~5.1.16|~5.2.0", - "illuminate/support": "~5.1.16|~5.2.0", + "illuminate/bus": "~5.1.16|~5.2.0|~5.3.0", + "illuminate/console": "~5.1.16|~5.2.0|~5.3.0", + "illuminate/database": "~5.1.16|~5.2.0|~5.3.0", + "illuminate/support": "~5.1.16|~5.2.0|~5.3.0", "php": "^7.0", "spatie/laravel-glide": "^3.0.0", "spatie/pdf-to-image": "^1.0.1", "spatie/string": "^2.0.0" }, + "conflict": { + "php-ffmpeg/php-ffmpeg": "<0.6.1" + }, "require-dev": { "doctrine/dbal": "^2.5.2", "mockery/mockery": "^0.9.4", - "orchestra/testbench": "^3.0", + "orchestra/database": "3.3.x-dev", + "orchestra/testbench": "3.3.x-dev", "phpunit/phpunit": "^5.0.0", "scrutinizer/ocular": "^1.1" }, + "suggest": { + "php-ffmpeg/php-ffmpeg": "Required for generating video thumbnails" + }, "type": "library", "autoload": { "psr-4": { @@ -2496,7 +2901,7 @@ "media", "spatie" ], - "time": "2016-07-18 07:56:41" + "time": "2016-08-25 08:08:10" }, { "name": "spatie/pdf-to-image", @@ -2656,16 +3061,16 @@ }, { "name": "symfony/console", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a7abb7153f6d1da47f87ec50274844e246b09d9f" + "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a7abb7153f6d1da47f87ec50274844e246b09d9f", - "reference": "a7abb7153f6d1da47f87ec50274844e246b09d9f", + "url": "https://api.github.com/repos/symfony/console/zipball/8ea494c34f0f772c3954b5fbe00bffc5a435e563", + "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563", "shasum": "" }, "require": { @@ -2685,7 +3090,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2712,20 +3117,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-06-29 07:02:21" + "time": "2016-08-19 06:48:39" }, { "name": "symfony/debug", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "c54bc3539c3b87e86799533801e8ae0e971d78c2" + "reference": "34f6ac18c2974ca5fce68adf419ee7d15def6f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/c54bc3539c3b87e86799533801e8ae0e971d78c2", - "reference": "c54bc3539c3b87e86799533801e8ae0e971d78c2", + "url": "https://api.github.com/repos/symfony/debug/zipball/34f6ac18c2974ca5fce68adf419ee7d15def6f11", + "reference": "34f6ac18c2974ca5fce68adf419ee7d15def6f11", "shasum": "" }, "require": { @@ -2742,7 +3147,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2769,20 +3174,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-08-23 13:39:15" }, { "name": "symfony/event-dispatcher", - "version": "v3.1.2", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5" + "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7f9839ede2070f53e7e2f0849b9bd14748c434c5", - "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c0c00c80b3a69132c4e55c3e7db32b4a387615e5", + "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5", "shasum": "" }, "require": { @@ -2829,20 +3234,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2016-07-19 10:45:57" }, { "name": "symfony/finder", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9" + "reference": "e568ef1784f447a0e54dcb6f6de30b9747b0f577" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", - "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", + "url": "https://api.github.com/repos/symfony/finder/zipball/e568ef1784f447a0e54dcb6f6de30b9747b0f577", + "reference": "e568ef1784f447a0e54dcb6f6de30b9747b0f577", "shasum": "" }, "require": { @@ -2851,7 +3256,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2878,20 +3283,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-08-26 12:04:02" }, { "name": "symfony/http-foundation", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "1341139f906d295baa4f4abd55293d07e25a065a" + "reference": "63592e00fd90632b57ee50220a1ddb29b6bf3bb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1341139f906d295baa4f4abd55293d07e25a065a", - "reference": "1341139f906d295baa4f4abd55293d07e25a065a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/63592e00fd90632b57ee50220a1ddb29b6bf3bb4", + "reference": "63592e00fd90632b57ee50220a1ddb29b6bf3bb4", "shasum": "" }, "require": { @@ -2904,7 +3309,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2931,20 +3336,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-06-29 07:02:21" + "time": "2016-08-22 12:11:19" }, { "name": "symfony/http-kernel", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "177b63b2d50b63fa6d82ea41359ed9928cc7a1fb" + "reference": "aeda215d6b01f119508c090d2a09ebb5b0bc61f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/177b63b2d50b63fa6d82ea41359ed9928cc7a1fb", - "reference": "177b63b2d50b63fa6d82ea41359ed9928cc7a1fb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aeda215d6b01f119508c090d2a09ebb5b0bc61f3", + "reference": "aeda215d6b01f119508c090d2a09ebb5b0bc61f3", "shasum": "" }, "require": { @@ -2986,7 +3391,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3013,7 +3418,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-06-30 16:30:17" + "time": "2016-09-03 15:28:24" }, { "name": "symfony/polyfill-mbstring", @@ -3184,16 +3589,16 @@ }, { "name": "symfony/process", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d7cde1f9d94d87060204f863779389b61c382eeb" + "reference": "e64e93041c80e77197ace5ab9385dedb5a143697" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d7cde1f9d94d87060204f863779389b61c382eeb", - "reference": "d7cde1f9d94d87060204f863779389b61c382eeb", + "url": "https://api.github.com/repos/symfony/process/zipball/e64e93041c80e77197ace5ab9385dedb5a143697", + "reference": "e64e93041c80e77197ace5ab9385dedb5a143697", "shasum": "" }, "require": { @@ -3202,7 +3607,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3229,20 +3634,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-08-16 14:58:24" }, { "name": "symfony/routing", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "9038984bd9c05ab07280121e9e10f61a7231457b" + "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/9038984bd9c05ab07280121e9e10f61a7231457b", - "reference": "9038984bd9c05ab07280121e9e10f61a7231457b", + "url": "https://api.github.com/repos/symfony/routing/zipball/8edf62498a1a4c57ba317664a4b698339c10cdf6", + "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6", "shasum": "" }, "require": { @@ -3271,7 +3676,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3304,20 +3709,20 @@ "uri", "url" ], - "time": "2016-06-29 05:40:00" + "time": "2016-08-16 14:58:24" }, { "name": "symfony/translation", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "6bf844e1ee3c820c012386c10427a5c67bbefec8" + "reference": "a35edc277513c9bc0f063ca174c36b346f974528" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6bf844e1ee3c820c012386c10427a5c67bbefec8", - "reference": "6bf844e1ee3c820c012386c10427a5c67bbefec8", + "url": "https://api.github.com/repos/symfony/translation/zipball/a35edc277513c9bc0f063ca174c36b346f974528", + "reference": "a35edc277513c9bc0f063ca174c36b346f974528", "shasum": "" }, "require": { @@ -3341,7 +3746,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3368,20 +3773,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-08-05 08:37:39" }, { "name": "symfony/var-dumper", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2f046e9a9d571f22cc8b26783564876713b06579" + "reference": "62ee73706c421654a4c840028954510277f7dfc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2f046e9a9d571f22cc8b26783564876713b06579", - "reference": "2f046e9a9d571f22cc8b26783564876713b06579", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/62ee73706c421654a4c840028954510277f7dfc8", + "reference": "62ee73706c421654a4c840028954510277f7dfc8", "shasum": "" }, "require": { @@ -3397,7 +3802,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3431,7 +3836,7 @@ "debug", "dump" ], - "time": "2016-06-29 05:40:00" + "time": "2016-08-31 09:05:42" }, { "name": "themattharris/tmhoauth", @@ -3521,16 +3926,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a" + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9ca5644c536654e9509b9d257f53c58630eb2a6a", - "reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", "shasum": "" }, "require": { @@ -3542,7 +3947,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -3567,27 +3972,27 @@ "env", "environment" ], - "time": "2016-06-14 14:14:52" + "time": "2016-09-01 10:05:43" } ], "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v2.2.2", + "version": "V2.2.3", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "c291e58d0a13953e0f68d99182ee77ebc693edc0" + "reference": "ecd1ce5c4a827e2f6a8fb41bcf67713beb1c1cbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/c291e58d0a13953e0f68d99182ee77ebc693edc0", - "reference": "c291e58d0a13953e0f68d99182ee77ebc693edc0", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/ecd1ce5c4a827e2f6a8fb41bcf67713beb1c1cbd", + "reference": "ecd1ce5c4a827e2f6a8fb41bcf67713beb1c1cbd", "shasum": "" }, "require": { - "illuminate/support": "5.1.*|5.2.*", - "maximebf/debugbar": "~1.11.0", + "illuminate/support": "5.1.*|5.2.*|5.3.*", + "maximebf/debugbar": "~1.11.0|~1.12.0", "php": ">=5.5.9", "symfony/finder": "~2.7|~3.0" }, @@ -3623,7 +4028,7 @@ "profiler", "webprofiler" ], - "time": "2016-05-11 13:54:43" + "time": "2016-07-29 15:00:36" }, { "name": "doctrine/instantiator", @@ -3681,16 +4086,16 @@ }, { "name": "filp/whoops", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "d13505b240a6f580bc75ba591da30299d6cb0eec" + "reference": "8828aaa2178e0a19325522e2a45282ff0a14649b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/d13505b240a6f580bc75ba591da30299d6cb0eec", - "reference": "d13505b240a6f580bc75ba591da30299d6cb0eec", + "url": "https://api.github.com/repos/filp/whoops/zipball/8828aaa2178e0a19325522e2a45282ff0a14649b", + "reference": "8828aaa2178e0a19325522e2a45282ff0a14649b", "shasum": "" }, "require": { @@ -3737,7 +4142,7 @@ "whoops", "zf2" ], - "time": "2016-04-07 06:16:25" + "time": "2016-05-06 18:25:35" }, { "name": "fzaninotto/faker", @@ -3834,16 +4239,16 @@ }, { "name": "maximebf/debugbar", - "version": "v1.11.1", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "d9302891c1f0a0ac5a4f66725163a00537c6359f" + "reference": "e634fbd32cd6bc3fa0e8c972b52d4bf49bab3988" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/d9302891c1f0a0ac5a4f66725163a00537c6359f", - "reference": "d9302891c1f0a0ac5a4f66725163a00537c6359f", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/e634fbd32cd6bc3fa0e8c972b52d4bf49bab3988", + "reference": "e634fbd32cd6bc3fa0e8c972b52d4bf49bab3988", "shasum": "" }, "require": { @@ -3862,7 +4267,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -3891,7 +4296,7 @@ "debug", "debugbar" ], - "time": "2016-01-22 12:22:23" + "time": "2016-05-15 13:11:34" }, { "name": "mockery/mockery", @@ -4210,16 +4615,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" + "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5f3f7e736d6319d5f1fc402aff8b026da26709a3", + "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3", "shasum": "" }, "require": { @@ -4228,7 +4633,7 @@ "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "^1.4.2", "sebastian/code-unit-reverse-lookup": "~1.0", - "sebastian/environment": "^1.3.2", + "sebastian/environment": "^1.3.2 || ^2.0", "sebastian/version": "~1.0|~2.0" }, "require-dev": { @@ -4269,7 +4674,7 @@ "testing", "xunit" ], - "time": "2016-06-03 05:03:56" + "time": "2016-07-26 14:39:29" }, { "name": "phpunit/php-file-iterator", @@ -4454,16 +4859,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.4.6", + "version": "5.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59" + "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f1fc94b77ea6418bd6a06c64a1dac0645fbce59", - "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6e88e56c912133de6e99b87728cca7ed70c5f5", + "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5", "shasum": "" }, "require": { @@ -4475,7 +4880,7 @@ "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0", + "phpunit/php-code-coverage": "^4.0.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", @@ -4502,7 +4907,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4.x-dev" + "dev-master": "5.5.x-dev" } }, "autoload": { @@ -4528,20 +4933,20 @@ "testing", "xunit" ], - "time": "2016-06-16 06:01:15" + "time": "2016-08-26 07:11:44" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.2.3", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52" + "reference": "46b249b43fd2ed8e127aa0fdb3cbcf56e9bc0e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/46b249b43fd2ed8e127aa0fdb3cbcf56e9bc0e49", + "reference": "46b249b43fd2ed8e127aa0fdb3cbcf56e9bc0e49", "shasum": "" }, "require": { @@ -4587,7 +4992,7 @@ "mock", "xunit" ], - "time": "2016-06-12 07:37:26" + "time": "2016-08-26 05:51:59" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4752,23 +5157,23 @@ }, { "name": "sebastian/environment", - "version": "1.3.7", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -4798,7 +5203,7 @@ "environment", "hhvm" ], - "time": "2016-05-17 03:18:57" + "time": "2016-08-18 05:49:44" }, { "name": "sebastian/exporter", @@ -5104,16 +5509,16 @@ }, { "name": "symfony/css-selector", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b8999c1f33c224b2b66b38253f5e3a838d0d0115" + "reference": "2851e1932d77ce727776154d659b232d061e816a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b8999c1f33c224b2b66b38253f5e3a838d0d0115", - "reference": "b8999c1f33c224b2b66b38253f5e3a838d0d0115", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/2851e1932d77ce727776154d659b232d061e816a", + "reference": "2851e1932d77ce727776154d659b232d061e816a", "shasum": "" }, "require": { @@ -5122,7 +5527,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -5153,20 +5558,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/dom-crawler", - "version": "v3.0.8", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "62769e3409006b937bb333b29da8df9a8b262975" + "reference": "bb7395e8b1db3654de82b9f35d019958276de4d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/62769e3409006b937bb333b29da8df9a8b262975", - "reference": "62769e3409006b937bb333b29da8df9a8b262975", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/bb7395e8b1db3654de82b9f35d019958276de4d7", + "reference": "bb7395e8b1db3654de82b9f35d019958276de4d7", "shasum": "" }, "require": { @@ -5182,7 +5587,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -5209,20 +5614,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-08-05 08:37:39" }, { "name": "symfony/yaml", - "version": "v3.1.2", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" + "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f291ed25eb1435bddbe8a96caaef16469c2a092d", + "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d", "shasum": "" }, "require": { @@ -5258,32 +5663,33 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2016-09-02 02:12:52" }, { "name": "webmozart/assert", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3|^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -5307,7 +5713,7 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "time": "2016-08-09 15:02:57" } ], "aliases": [], diff --git a/config/app.php b/config/app.php index 76190440..5ac83ad3 100644 --- a/config/app.php +++ b/config/app.php @@ -2,6 +2,18 @@ return [ + /* + |-------------------------------------------------------------------------- + | Application Name + |-------------------------------------------------------------------------- + | + | This value is the name of your application. This value is used when the + | framework needs to place the application's name in a notification or + | any other location as required by the application or its packages. + */ + + 'name' => 'jonnybarnes.uk', + /* |-------------------------------------------------------------------------- | Application Environment @@ -151,6 +163,7 @@ return [ Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, @@ -166,6 +179,7 @@ return [ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, @@ -221,6 +235,7 @@ return [ 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Notification' => Illuminate\Support\Facades\Notification::class, 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, diff --git a/config/auth.php b/config/auth.php index 3fa7f491..97b29789 100644 --- a/config/auth.php +++ b/config/auth.php @@ -81,10 +81,6 @@ return [ | Resetting Passwords |-------------------------------------------------------------------------- | - | Here you may set the options for resetting passwords including the view - | that is your password reset e-mail. You may also set the name of the - | table that maintains all of the reset tokens for your application. - | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. @@ -94,11 +90,9 @@ return [ | they have less time to be guessed. You may change this as needed. | */ - 'passwords' => [ 'users' => [ 'provider' => 'users', - 'email' => 'auth.emails.password', 'table' => 'password_resets', 'expire' => 60, ], diff --git a/config/broadcasting.php b/config/broadcasting.php index bf8b2dfe..19a59bad 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -11,11 +11,11 @@ return [ | framework when an event needs to be broadcast. You may set this to | any of the connections defined in the "connections" array below. | - | Supported: "pusher", "redis", "log" + | Supported: "pusher", "redis", "log", "null" | */ - 'default' => env('BROADCAST_DRIVER', 'pusher'), + 'default' => env('BROADCAST_DRIVER', 'null'), /* |-------------------------------------------------------------------------- @@ -49,6 +49,10 @@ return [ 'driver' => 'log', ], + 'null' => [ + 'driver' => 'null', + ], + ], ]; diff --git a/config/cache.php b/config/cache.php index 6b8ac914..1d3de874 100644 --- a/config/cache.php +++ b/config/cache.php @@ -51,6 +51,14 @@ return [ 'memcached' => [ 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], 'servers' => [ [ 'host' => env('MEMCACHED_HOST', '127.0.0.1'), diff --git a/config/database.php b/config/database.php index 598a7ff3..f3549992 100644 --- a/config/database.php +++ b/config/database.php @@ -53,29 +53,30 @@ return [ ], 'mysql' => [ - 'driver' => 'mysql', - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => '', - 'strict' => false, - 'engine' => null, + 'driver' => 'mysql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + 'strict' => true, + 'engine' => null, ], 'pgsql' => [ - 'driver' => 'pgsql', - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'schema' => 'public', + 'driver' => 'pgsql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + 'sslmode' => 'prefer', ], 'travis' => [ diff --git a/config/mail.php b/config/mail.php index a0765885..1ed58486 100644 --- a/config/mail.php +++ b/config/mail.php @@ -54,8 +54,10 @@ return [ | used globally for all e-mails that are sent by your application. | */ - - 'from' => ['address' => null, 'name' => null], + 'from' => [ + 'address' => 'hello@example.com', + 'name' => 'Example', + ], /* |-------------------------------------------------------------------------- diff --git a/config/queue.php b/config/queue.php index b4ae7965..549322ed 100644 --- a/config/queue.php +++ b/config/queue.php @@ -11,7 +11,7 @@ return [ | API, giving you convenient access to each back-end using the same | syntax for each one. Here you may set the default queue driver. | - | Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis" + | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null" | */ @@ -38,14 +38,14 @@ return [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', - 'expire' => 90, + 'retry_after' => 90, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', - 'ttr' => 90, + 'retry_after' => 90, ], 'sqs' => [ @@ -61,7 +61,7 @@ return [ 'driver' => 'redis', 'connection' => 'default', 'queue' => 'default', - 'expire' => 90, + 'retry_after' => 90, ], ], diff --git a/config/services.php b/config/services.php index 1581f1db..287b1186 100644 --- a/config/services.php +++ b/config/services.php @@ -19,10 +19,6 @@ return [ 'secret' => env('MAILGUN_SECRET'), ], - 'mandrill' => [ - 'secret' => env('MANDRILL_SECRET'), - ], - 'ses' => [ 'key' => env('SES_KEY'), 'secret' => env('SES_SECRET'), diff --git a/config/session.php b/config/session.php index a664ac76..d6e95b14 100644 --- a/config/session.php +++ b/config/session.php @@ -44,7 +44,7 @@ return [ | */ - 'encrypt' => false, + 'encrypt' => true, /* |-------------------------------------------------------------------------- diff --git a/config/url.php b/config/url.php index 96767e3f..ea8a81fd 100644 --- a/config/url.php +++ b/config/url.php @@ -7,5 +7,5 @@ return [ 'longurl' => env('APP_LONGURL', 'jonnybarnes.uk'), - 'shorturl' => env('APP_SHORTURL', 'jmb.so') -]; \ No newline at end of file + 'shorturl' => env('APP_SHORTURL', 'jmb.lv') +]; diff --git a/database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php b/database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php new file mode 100644 index 00000000..04ad6f0a --- /dev/null +++ b/database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php @@ -0,0 +1,33 @@ +jsonb('mf2')->nullable(); + $table->index(['mf2']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('webmentions', function (Blueprint $table) { + $table->dropIndex(['mf2']); + $table->dropColumn('mf2'); + }); + } +} diff --git a/database/migrations/2016_09_06_152900_add_exception_column_to_failed_jobs_table.php b/database/migrations/2016_09_06_152900_add_exception_column_to_failed_jobs_table.php new file mode 100644 index 00000000..e42bce8b --- /dev/null +++ b/database/migrations/2016_09_06_152900_add_exception_column_to_failed_jobs_table.php @@ -0,0 +1,31 @@ +text('exception'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('failed_jobs', function (Blueprint $table) { + $table->dropColumn('exception'); + }); + } +} diff --git a/resources/views/singlenote.blade.php b/resources/views/singlenote.blade.php index d564616e..9c5f6525 100644 --- a/resources/views/singlenote.blade.php +++ b/resources/views/singlenote.blade.php @@ -20,13 +20,13 @@ @if(count($likes) > 0)

Likes

@endif @foreach($likes as $like) - +profile picture of {{ $like['name'] }} @endforeach @if(count($reposts) > 0)

Reposts

@endif @foreach($reposts as $repost)

{{ $repost['name'] }} - reposted this at {{ $repost['date'] }}.

+ reposted this at {{ $repost['date'] }}.

@endforeach @stop diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 00000000..6b907f39 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,18 @@ +user(); +})->middleware('auth:api'); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 00000000..75dd0cde --- /dev/null +++ b/routes/console.php @@ -0,0 +1,18 @@ +comment(Inspiring::quote()); +})->describe('Display an inspiring quote'); diff --git a/app/Http/routes.php b/routes/web.php similarity index 96% rename from app/Http/routes.php rename to routes/web.php index 35f9fd42..da7a6f74 100644 --- a/app/Http/routes.php +++ b/routes/web.php @@ -2,12 +2,12 @@ /* |-------------------------------------------------------------------------- -| Application Routes +| Web Routes |-------------------------------------------------------------------------- | -| Here is where you can register all of the routes for an application. -| It's a breeze. Simply tell Laravel the URIs it should respond to -| and give it the controller to call when that URI is requested. +| This file is where you may define all of the routes that are handled +| by your application. Just tell Laravel the URIs it should respond +| to using a Closure or controller method. Build something great! | */ diff --git a/tests/NotesTest.php b/tests/NotesTest.php index 233704e3..c1ac954d 100644 --- a/tests/NotesTest.php +++ b/tests/NotesTest.php @@ -2,6 +2,7 @@ namespace App\Tests; +use Cache; use TestCase; use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; @@ -131,15 +132,15 @@ class NotesTest extends TestCase } /** - * Test the bridgy url shim method. + * Test a correct profile link is formed from a generic URL. * * @return void */ - public function testBridgy() + public function testCreatePhotoLinkWithNonCachedImage() { - $url = 'https://brid-gy.appspot.com/comment/twitter/jonnybarnes/497778866816299008/497781260937203712'; - $expected = 'https://twitter.com/_/status/497781260937203712'; - $this->assertEquals($expected, $this->notesController->bridgyReply($url)); + $homepage = 'https://example.org/profile.png'; + $expected = 'https://example.org/profile.png'; + $this->assertEquals($expected, $this->notesController->createPhotoLink($homepage)); } /** @@ -147,10 +148,10 @@ class NotesTest extends TestCase * * @return void */ - public function testCreatePhotoLinkWithGenericURL() + public function testCreatePhotoLinkWithCachedImage() { - $homepage = 'https://example.org'; - $expected = '/assets/profile-images/example.org/image'; + $homepage = 'https://aaronparecki.com/profile.png'; + $expected = '/assets/profile-images/aaronparecki.com/image'; $this->assertEquals($expected, $this->notesController->createPhotoLink($homepage)); } @@ -159,7 +160,7 @@ class NotesTest extends TestCase * * @return void */ - public function testCreatePhotoLinkWithTwitterProfileImageURL() + public function testCreatePhotoLinkWithTwimgProfileImageURL() { $twitterProfileImage = 'http://pbs.twimg.com/1234'; $expected = 'https://pbs.twimg.com/1234'; @@ -171,9 +172,11 @@ class NotesTest extends TestCase * * @return void */ - public function testCreatePhotoLinkWithTwitterURL() + public function testCreatePhotoLinkWithCachedTwitterURL() { $twitterURL = 'https://twitter.com/example'; - $this->assertNull($this->notesController->createPhotoLink($twitterURL)); + $expected = 'https://pbs.twimg.com/static_profile_link.jpg'; + Cache::put($twitterURL, $expected, 1); + $this->assertEquals($expected, $this->notesController->createPhotoLink($twitterURL)); } } diff --git a/tests/ProcessWebMentionTest.php b/tests/ProcessWebMentionTest.php new file mode 100644 index 00000000..77e04ba0 --- /dev/null +++ b/tests/ProcessWebMentionTest.php @@ -0,0 +1,29 @@ +appurl = config('app.url'); + } + + /** + * A basic test. + * + * @return void + */ + public function testExample() + { + + } +} diff --git a/tests/WebMentionsTest.php b/tests/WebMentionsTest.php new file mode 100644 index 00000000..a0bf502c --- /dev/null +++ b/tests/WebMentionsTest.php @@ -0,0 +1,92 @@ +appurl = config('app.url'); + } + + /** + * Test webmentions without source and target are rejected. + * + * @return void + */ + public function testWebmentionsWithoutSourceAndTargetAreRejected() + { + $this->call('POST', $this->appurl . '/webmention', ['source' => 'https://example.org/post/123']); + $this->assertResponseStatus(400) + ->see('You need both the target and source parameters'); + } + + /** + * Test invalid target gets a 400 response. + * + * @return void + */ + public function testInvalidTargetReturns400Response() + { + $this->call('POST', $this->appurl . '/webmention', [ + 'source' => 'https://example.org/post/123', + 'target' => $this->appurl . '/invalid/target' + ]); + $this->assertResponseStatus(400) + ->see('Invalid request'); + } + + /** + * Test blog target gets a 501 response. + * + * @return void + */ + public function testBlogpostTargetReturns501Response() + { + $this->call('POST', $this->appurl . '/webmention', [ + 'source' => 'https://example.org/post/123', + 'target' => $this->appurl . '/blog/target' + ]); + $this->assertResponseStatus(501) + ->see('I don’t accept webmentions for blog posts yet.'); + } + + /** + * Test that a non-existant note gives a 400 response. + * + * @return void + */ + public function testNonexistantNoteReturns400Response() + { + $this->call('POST', $this->appurl . '/webmention', [ + 'source' => 'https://example.org/post/123', + 'target' => $this->appurl . '/notes/ZZZZZ' + ]); + $this->assertResponseStatus(400) + ->see('This note doesn’t exist.'); + } + + /** + * Test a legit webmention triggers the ProcessWebMention job. + * + * @return void + */ + public function testLegitimateWebmnetionTriggersProcessWebMentionJob() + { + $this->expectsJobs(\App\Jobs\ProcessWebMention::class); + $this->call('POST', $this->appurl . '/webmention', [ + 'source' => 'https://example.org/post/123', + 'target' => $this->appurl . '/notes/B' + ]); + $this->assertResponseStatus(202) + ->see('Webmention received, it will be processed shortly'); + } +}