Add auto Twitter. Closes #2380

This commit is contained in:
James Brooks
2017-03-04 17:34:44 +00:00
parent c229fd1757
commit d966bc82b5
5 changed files with 159 additions and 89 deletions

View File

@@ -17,6 +17,7 @@ QUEUE_DRIVER=sync
CACHET_BEACON=true
CACHET_EMOJI=false
CACHET_AUTO_TWITTER=true
MAIL_DRIVER=log
MAIL_HOST=null

View File

@@ -29,8 +29,10 @@
"ext-xml": "*",
"alt-three/badger": "^3.1",
"alt-three/bus": "^2.0",
"alt-three/emoji": "^3.1",
"alt-three/emoji": "^4.1",
"alt-three/logger": "^1.3",
"alt-three/throttle": "^1.0",
"alt-three/twitter": "^1.0",
"alt-three/validator": "^1.5",
"aws/aws-sdk-php": "^3.7",
"backup-manager/laravel": "^1.1",
@@ -40,7 +42,7 @@
"graham-campbell/binput": "^3.5",
"graham-campbell/core": "^5.1",
"graham-campbell/exceptions": "^9.1",
"graham-campbell/markdown": "^6.1",
"graham-campbell/markdown": "^7.1",
"guzzlehttp/guzzle": "^6.2.1",
"laravel/framework": "5.3.*",
"mccool/laravel-auto-presenter": "^4.3",
@@ -48,8 +50,7 @@
"pragmarx/google2fa": "^0.7.1",
"predis/predis": "^1.1",
"roumen/feed": "^2.10.4",
"twig/twig": "^1.26.1",
"alt-three/logger": "^1.3"
"twig/twig": "^1.26.1"
},
"require-dev": {
"alt-three/testbench": "^1.9",

232
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "48661b17696b4a6a64fd61e19a3d8fac",
"content-hash": "43c85ea04920842652d64b760f121486",
"packages": [
{
"name": "alt-three/badger",
@@ -140,34 +140,34 @@
},
{
"name": "alt-three/emoji",
"version": "v3.1.0",
"version": "v4.1.0",
"source": {
"type": "git",
"url": "https://github.com/AltThree/Emoji.git",
"reference": "631119fb03162af8f42f7eda4c1f92c87611e36f"
"reference": "3aa00f11d5a13f7fb43fc8f1e8d66c9788e626ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/AltThree/Emoji/zipball/631119fb03162af8f42f7eda4c1f92c87611e36f",
"reference": "631119fb03162af8f42f7eda4c1f92c87611e36f",
"url": "https://api.github.com/repos/AltThree/Emoji/zipball/3aa00f11d5a13f7fb43fc8f1e8d66c9788e626ec",
"reference": "3aa00f11d5a13f7fb43fc8f1e8d66c9788e626ec",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^5.3|^6.0",
"illuminate/contracts": "5.1.*|5.2.*|5.3.*",
"illuminate/support": "5.1.*|5.2.*|5.3.*",
"league/commonmark": "^0.13",
"illuminate/contracts": "5.1.*|5.2.*|5.3.*|5.4.*",
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*",
"league/commonmark": "^0.15",
"php": ">=5.5.9"
},
"require-dev": {
"graham-campbell/markdown": "^6.0",
"graham-campbell/markdown": "^7.0",
"graham-campbell/testbench": "^3.1",
"phpunit/phpunit": "^4.8|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
"dev-master": "4.1-dev"
}
},
"autoload": {
@@ -199,7 +199,7 @@
"emoji",
"parser"
],
"time": "2016-04-22T17:24:35+00:00"
"time": "2017-01-01T12:37:40+00:00"
},
{
"name": "alt-three/logger",
@@ -324,6 +324,69 @@
],
"time": "2017-01-01T12:37:29+00:00"
},
{
"name": "alt-three/twitter",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/AltThree/Twitter.git",
"reference": "b4e4a33bc76f8e444359fd772bb4f063a21a578f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/AltThree/Twitter/zipball/b4e4a33bc76f8e444359fd772bb4f063a21a578f",
"reference": "b4e4a33bc76f8e444359fd772bb4f063a21a578f",
"shasum": ""
},
"require": {
"illuminate/contracts": "5.1.*|5.2.*|5.3.*|5.4.*",
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*",
"league/commonmark": "^0.15",
"php": ">=5.5.9"
},
"require-dev": {
"graham-campbell/markdown": "^7.0",
"graham-campbell/testbench": "^3.1",
"phpunit/phpunit": "^4.8|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"AltThree\\Twitter\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "James Brooks",
"email": "james@alt-three.com"
},
{
"name": "Graham Campbell",
"email": "graham@alt-three.com"
},
{
"name": "Joseph Cohen",
"email": "joe@alt-three.com"
}
],
"description": "A Twitter handle parser for Laravel 5",
"keywords": [
"Alt Three",
"markdown",
"parser",
"twitter"
],
"time": "2017-03-03T21:19:20+00:00"
},
{
"name": "alt-three/validator",
"version": "v1.6.0",
@@ -386,16 +449,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.22.11",
"version": "3.23.1",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "277939bd789204b314f3aaca06976cf3ddf78f07"
"reference": "7d319413995f9326e7aa41e02bcc799490038deb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/277939bd789204b314f3aaca06976cf3ddf78f07",
"reference": "277939bd789204b314f3aaca06976cf3ddf78f07",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7d319413995f9326e7aa41e02bcc799490038deb",
"reference": "7d319413995f9326e7aa41e02bcc799490038deb",
"shasum": ""
},
"require": {
@@ -462,7 +525,7 @@
"s3",
"sdk"
],
"time": "2017-02-24T21:47:48+00:00"
"time": "2017-02-28T03:16:27+00:00"
},
{
"name": "backup-manager/backup-manager",
@@ -1537,35 +1600,35 @@
},
{
"name": "graham-campbell/markdown",
"version": "v6.1.0",
"version": "v7.1.0",
"source": {
"type": "git",
"url": "https://github.com/GrahamCampbell/Laravel-Markdown.git",
"reference": "2208ec910d9880d6bca28d332ae7f3b7350355d1"
"reference": "507783993b40f4b118f201e8a8bec9e908b3ab1d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/GrahamCampbell/Laravel-Markdown/zipball/2208ec910d9880d6bca28d332ae7f3b7350355d1",
"reference": "2208ec910d9880d6bca28d332ae7f3b7350355d1",
"url": "https://api.github.com/repos/GrahamCampbell/Laravel-Markdown/zipball/507783993b40f4b118f201e8a8bec9e908b3ab1d",
"reference": "507783993b40f4b118f201e8a8bec9e908b3ab1d",
"shasum": ""
},
"require": {
"illuminate/contracts": "5.1.*|5.2.*|5.3.*",
"illuminate/support": "5.1.*|5.2.*|5.3.*",
"illuminate/view": "5.1.*|5.2.*|5.3.*",
"league/commonmark": "^0.13",
"illuminate/contracts": "5.1.*|5.2.*|5.3.*|5.4.*",
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*",
"illuminate/view": "5.1.*|5.2.*|5.3.*|5.4.*",
"league/commonmark": "^0.15",
"php": ">=5.5.9"
},
"require-dev": {
"graham-campbell/testbench": "^3.1",
"league/commonmark-extras": "^0.1",
"league/commonmark-extras": "^0.1.2",
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^4.8|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.1-dev"
"dev-master": "7.1-dev"
}
},
"autoload": {
@@ -1595,7 +1658,7 @@
"laravel",
"markdown"
],
"time": "2016-04-26T14:28:21+00:00"
"time": "2017-01-01T13:30:44+00:00"
},
{
"name": "graham-campbell/security",
@@ -2158,16 +2221,16 @@
},
{
"name": "league/commonmark",
"version": "0.13.4",
"version": "0.15.3",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459"
"reference": "c8b43ee5821362216f8e9ac684f0f59de164edcc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/83f8210427fb01f671e272bb8d44b4ed3a94d459",
"reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c8b43ee5821362216f8e9ac684f0f59de164edcc",
"reference": "c8b43ee5821362216f8e9ac684f0f59de164edcc",
"shasum": ""
},
"require": {
@@ -2180,7 +2243,7 @@
"require-dev": {
"cebe/markdown": "~1.0",
"erusev/parsedown": "~1.0",
"jgm/commonmark": "0.25",
"jgm/commonmark": "0.27",
"michelf/php-markdown": "~1.4",
"mikehaertl/php-shellcommand": "~1.2.0",
"phpunit/phpunit": "~4.3|~5.0",
@@ -2196,7 +2259,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.14-dev"
"dev-master": "0.16-dev"
}
},
"autoload": {
@@ -2223,7 +2286,7 @@
"markdown",
"parser"
],
"time": "2016-06-14T14:49:29+00:00"
"time": "2016-12-19T00:11:43+00:00"
},
{
"name": "league/flysystem",
@@ -2699,16 +2762,16 @@
},
{
"name": "paragonie/random_compat",
"version": "v2.0.7",
"version": "v2.0.9",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "b5ea1ef3d8ff10c307ba8c5945c2f134e503278f"
"reference": "6968531206671f94377b01dc7888d5d1b858a01b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/b5ea1ef3d8ff10c307ba8c5945c2f134e503278f",
"reference": "b5ea1ef3d8ff10c307ba8c5945c2f134e503278f",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/6968531206671f94377b01dc7888d5d1b858a01b",
"reference": "6968531206671f94377b01dc7888d5d1b858a01b",
"shasum": ""
},
"require": {
@@ -2743,7 +2806,7 @@
"pseudorandom",
"random"
],
"time": "2017-02-27T17:11:23+00:00"
"time": "2017-03-03T20:43:42+00:00"
},
{
"name": "php-http/guzzle6-adapter",
@@ -3114,16 +3177,16 @@
},
{
"name": "psy/psysh",
"version": "v0.8.1",
"version": "v0.8.2",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
"reference": "701e8a1cc426ee170f1296f5d9f6b8a26ad25c4a"
"reference": "97113db4107a4126bef933b60fea6dbc9f615d41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/701e8a1cc426ee170f1296f5d9f6b8a26ad25c4a",
"reference": "701e8a1cc426ee170f1296f5d9f6b8a26ad25c4a",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/97113db4107a4126bef933b60fea6dbc9f615d41",
"reference": "97113db4107a4126bef933b60fea6dbc9f615d41",
"shasum": ""
},
"require": {
@@ -3183,7 +3246,7 @@
"interactive",
"shell"
],
"time": "2017-01-15T17:54:13+00:00"
"time": "2017-03-01T00:13:29+00:00"
},
{
"name": "ramsey/uuid",
@@ -4486,20 +4549,21 @@
},
{
"name": "filp/whoops",
"version": "2.1.6",
"version": "2.1.7",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "92bdc6800ac6e233c9e161a1768e082389a73530"
"reference": "1a8192deae1f35aabc3a73aad19cd07c68091dd1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/92bdc6800ac6e233c9e161a1768e082389a73530",
"reference": "92bdc6800ac6e233c9e161a1768e082389a73530",
"url": "https://api.github.com/repos/filp/whoops/zipball/1a8192deae1f35aabc3a73aad19cd07c68091dd1",
"reference": "1a8192deae1f35aabc3a73aad19cd07c68091dd1",
"shasum": ""
},
"require": {
"php": "^5.5.9 || ^7.0"
"php": "^5.5.9 || ^7.0",
"psr/log": "^1.0.1"
},
"require-dev": {
"mockery/mockery": "0.9.*",
@@ -4542,7 +4606,7 @@
"whoops",
"zf2"
],
"time": "2017-02-18T14:22:27+00:00"
"time": "2017-03-02T16:54:56+00:00"
},
{
"name": "fzaninotto/faker",
@@ -4952,27 +5016,27 @@
},
{
"name": "phpspec/prophecy",
"version": "v1.6.2",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
"reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
"reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
"reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "^1.1",
"sebastian/recursion-context": "^1.0|^2.0"
"sebastian/comparator": "^1.1|^2.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
"phpspec/phpspec": "^2.0",
"phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8 || ^5.6.5"
},
"type": "library",
@@ -5011,39 +5075,39 @@
"spy",
"stub"
],
"time": "2016-11-21T14:58:47+00:00"
"time": "2017-03-02T20:05:34+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "4.0.6",
"version": "4.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "ca060f645beeddebedb1885c97bf163e93264c35"
"reference": "09e2277d14ea467e5a984010f501343ef29ffc69"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca060f645beeddebedb1885c97bf163e93264c35",
"reference": "ca060f645beeddebedb1885c97bf163e93264c35",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69",
"reference": "09e2277d14ea467e5a984010f501343ef29ffc69",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^5.6 || ^7.0",
"phpunit/php-file-iterator": "~1.3",
"phpunit/php-text-template": "~1.2",
"phpunit/php-file-iterator": "^1.3",
"phpunit/php-text-template": "^1.2",
"phpunit/php-token-stream": "^1.4.2 || ^2.0",
"sebastian/code-unit-reverse-lookup": "~1.0",
"sebastian/code-unit-reverse-lookup": "^1.0",
"sebastian/environment": "^1.3.2 || ^2.0",
"sebastian/version": "~1.0|~2.0"
"sebastian/version": "^1.0 || ^2.0"
},
"require-dev": {
"ext-xdebug": ">=2.1.4",
"phpunit/phpunit": "^5.4"
"ext-xdebug": "^2.1.4",
"phpunit/phpunit": "^5.7"
},
"suggest": {
"ext-dom": "*",
"ext-xdebug": ">=2.4.0",
"ext-xmlwriter": "*"
"ext-xdebug": "^2.5.1"
},
"type": "library",
"extra": {
@@ -5074,7 +5138,7 @@
"testing",
"xunit"
],
"time": "2017-02-23T07:38:02+00:00"
"time": "2017-03-01T09:12:17+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -5264,16 +5328,16 @@
},
{
"name": "phpunit/phpunit",
"version": "5.7.14",
"version": "5.7.15",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "4906b8faf23e42612182fd212eb6f4c0f2954b57"
"reference": "b99112aecc01f62acf3d81a3f59646700a1849e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4906b8faf23e42612182fd212eb6f4c0f2954b57",
"reference": "4906b8faf23e42612182fd212eb6f4c0f2954b57",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b99112aecc01f62acf3d81a3f59646700a1849e5",
"reference": "b99112aecc01f62acf3d81a3f59646700a1849e5",
"shasum": ""
},
"require": {
@@ -5342,7 +5406,7 @@
"testing",
"xunit"
],
"time": "2017-02-19T07:22:16+00:00"
"time": "2017-03-02T15:22:43+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -5405,23 +5469,23 @@
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "1.0.0",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
"reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
"reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
"reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
"shasum": ""
},
"require": {
"php": ">=5.6"
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "~5"
"phpunit/phpunit": "^5.7 || ^6.0"
},
"type": "library",
"extra": {
@@ -5446,7 +5510,7 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"time": "2016-02-13T06:45:14+00:00"
"time": "2017-03-04T06:30:41+00:00"
},
{
"name": "sebastian/comparator",

View File

@@ -176,6 +176,7 @@ return [
AltThree\Badger\BadgerServiceProvider::class,
AltThree\Emoji\EmojiServiceProvider::class,
AltThree\Logger\LoggerServiceProvider::class,
AltThree\Twitter\TwitterServiceProvider::class,
BackupManager\Laravel\Laravel5ServiceProvider::class,
Barryvdh\Cors\ServiceProvider::class,
Fideloper\Proxy\TrustedProxyServiceProvider::class,

View File

@@ -39,7 +39,10 @@ return [
|
*/
'extensions' => env('CACHET_EMOJI', false) ? ['AltThree\Emoji\EmojiExtension'] : [],
'extensions' => array_filter([
env('CACHET_EMOJI', false) ? 'AltThree\Emoji\EmojiExtension' : null,
env('CACHET_AUTO_TWITTER', true) ? 'AltThree\Twitter\TwitterExtension' : null,
]),
/*
|--------------------------------------------------------------------------