Merge pull request #522 from jonnybarnes/develop
MTM Mastodon syndication
This commit is contained in:
commit
272a5ea2fd
14 changed files with 585 additions and 751 deletions
|
@ -66,3 +66,5 @@ SECURE_SESSION_COOKIE=true
|
||||||
LOG_SLACK_WEBHOOK_URL=
|
LOG_SLACK_WEBHOOK_URL=
|
||||||
|
|
||||||
FONT_LINK=
|
FONT_LINK=
|
||||||
|
|
||||||
|
BRIDGY_MASTODON_TOKEN=
|
||||||
|
|
70
app/Jobs/SyndicateNoteToMastodon.php
Normal file
70
app/Jobs/SyndicateNoteToMastodon.php
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Jobs;
|
||||||
|
|
||||||
|
use App\Models\Note;
|
||||||
|
use GuzzleHttp\Client;
|
||||||
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class SyndicateNoteToMastodon implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new job instance.
|
||||||
|
*
|
||||||
|
* @param Note $note
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(
|
||||||
|
protected Note $note
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the job.
|
||||||
|
*
|
||||||
|
* @param Client $guzzle
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws GuzzleException
|
||||||
|
*/
|
||||||
|
public function handle(Client $guzzle): void
|
||||||
|
{
|
||||||
|
// We can only make the request if we have an access token
|
||||||
|
if (config('bridgy.mastodon_token') === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make micropub request
|
||||||
|
$response = $guzzle->request(
|
||||||
|
'POST',
|
||||||
|
'https://brid.gy/micropub',
|
||||||
|
[
|
||||||
|
'headers' => [
|
||||||
|
'Authorization' => 'Bearer ' . config('bridgy.mastodon_token'),
|
||||||
|
],
|
||||||
|
'json' => [
|
||||||
|
'type' => ['h-entry'],
|
||||||
|
'properties' => [
|
||||||
|
'content' => [$this->note->note],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Parse for syndication URL
|
||||||
|
if ($response->getStatusCode() === 201) {
|
||||||
|
$mastodonUrl = $response->getHeader('Location')[0];
|
||||||
|
$this->note->mastodon_url = $mastodonUrl;
|
||||||
|
$this->note->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
use App\Jobs\SendWebMentions;
|
use App\Jobs\SendWebMentions;
|
||||||
|
use App\Jobs\SyndicateNoteToMastodon;
|
||||||
use App\Jobs\SyndicateNoteToTwitter;
|
use App\Jobs\SyndicateNoteToTwitter;
|
||||||
use App\Models\Media;
|
use App\Models\Media;
|
||||||
use App\Models\Note;
|
use App\Models\Note;
|
||||||
|
@ -58,6 +59,10 @@ class NoteService
|
||||||
dispatch(new SyndicateNoteToTwitter($note));
|
dispatch(new SyndicateNoteToTwitter($note));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_array('mastodon', $this->getSyndicationTargets($request), true)) {
|
||||||
|
dispatch(new SyndicateNoteToMastodon($note));
|
||||||
|
}
|
||||||
|
|
||||||
return $note;
|
return $note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,6 +217,9 @@ class NoteService
|
||||||
if ($target && $target->service_name === 'Twitter') {
|
if ($target && $target->service_name === 'Twitter') {
|
||||||
$syndication[] = 'twitter';
|
$syndication[] = 'twitter';
|
||||||
}
|
}
|
||||||
|
if ($target && $target->service_name === 'Mastodon') {
|
||||||
|
$syndication[] = 'mastodon';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $syndication;
|
return $syndication;
|
||||||
|
|
241
composer.lock
generated
241
composer.lock
generated
|
@ -506,16 +506,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dflydev/dot-access-data",
|
"name": "dflydev/dot-access-data",
|
||||||
"version": "v3.0.1",
|
"version": "v3.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/dflydev/dflydev-dot-access-data.git",
|
"url": "https://github.com/dflydev/dflydev-dot-access-data.git",
|
||||||
"reference": "0992cc19268b259a39e86f296da5f0677841f42c"
|
"reference": "f41715465d65213d644d3141a6a93081be5d3549"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/0992cc19268b259a39e86f296da5f0677841f42c",
|
"url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549",
|
||||||
"reference": "0992cc19268b259a39e86f296da5f0677841f42c",
|
"reference": "f41715465d65213d644d3141a6a93081be5d3549",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -526,7 +526,7 @@
|
||||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
|
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
|
||||||
"scrutinizer/ocular": "1.6.0",
|
"scrutinizer/ocular": "1.6.0",
|
||||||
"squizlabs/php_codesniffer": "^3.5",
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
"vimeo/psalm": "^3.14"
|
"vimeo/psalm": "^4.0.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -575,9 +575,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
|
"issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
|
||||||
"source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.1"
|
"source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2"
|
||||||
},
|
},
|
||||||
"time": "2021-08-13T13:06:58+00:00"
|
"time": "2022-10-27T11:44:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/inflector",
|
"name": "doctrine/inflector",
|
||||||
|
@ -1222,16 +1222,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "2.4.1",
|
"version": "2.4.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379"
|
"reference": "3148458748274be1546f8f2809a6c09fe66f44aa"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/3148458748274be1546f8f2809a6c09fe66f44aa",
|
||||||
"reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379",
|
"reference": "3148458748274be1546f8f2809a6c09fe66f44aa",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1321,7 +1321,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/psr7/issues",
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
"source": "https://github.com/guzzle/psr7/tree/2.4.1"
|
"source": "https://github.com/guzzle/psr7/tree/2.4.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1337,7 +1337,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-08-28T14:45:39+00:00"
|
"time": "2022-10-25T13:49:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "indieauth/client",
|
"name": "indieauth/client",
|
||||||
|
@ -1741,16 +1741,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v9.36.4",
|
"version": "v9.38.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "15ce569fd93124e8e2257c24e3ed85b9ef9951d6"
|
"reference": "abf198e443e06696af3f356b44de67c0fa516107"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/15ce569fd93124e8e2257c24e3ed85b9ef9951d6",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/abf198e443e06696af3f356b44de67c0fa516107",
|
||||||
"reference": "15ce569fd93124e8e2257c24e3ed85b9ef9951d6",
|
"reference": "abf198e443e06696af3f356b44de67c0fa516107",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1923,20 +1923,20 @@
|
||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2022-10-20T16:11:03+00:00"
|
"time": "2022-11-01T14:05:55+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/horizon",
|
"name": "laravel/horizon",
|
||||||
"version": "v5.10.2",
|
"version": "v5.10.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/horizon.git",
|
"url": "https://github.com/laravel/horizon.git",
|
||||||
"reference": "de84bf86ffee940fa92e29c54d41618048ec9b6f"
|
"reference": "22403726851d62c45051114c89106130c348decc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/horizon/zipball/de84bf86ffee940fa92e29c54d41618048ec9b6f",
|
"url": "https://api.github.com/repos/laravel/horizon/zipball/22403726851d62c45051114c89106130c348decc",
|
||||||
"reference": "de84bf86ffee940fa92e29c54d41618048ec9b6f",
|
"reference": "22403726851d62c45051114c89106130c348decc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1998,9 +1998,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/laravel/horizon/issues",
|
"issues": "https://github.com/laravel/horizon/issues",
|
||||||
"source": "https://github.com/laravel/horizon/tree/v5.10.2"
|
"source": "https://github.com/laravel/horizon/tree/v5.10.3"
|
||||||
},
|
},
|
||||||
"time": "2022-09-26T13:45:51+00:00"
|
"time": "2022-10-14T13:33:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/serializable-closure",
|
"name": "laravel/serializable-closure",
|
||||||
|
@ -2267,16 +2267,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
"version": "2.3.5",
|
"version": "2.3.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/commonmark.git",
|
"url": "https://github.com/thephpleague/commonmark.git",
|
||||||
"reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257"
|
"reference": "a36bd2be4f5387c0f3a8792a0d76b7d68865abbf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/84d74485fdb7074f4f9dd6f02ab957b1de513257",
|
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/a36bd2be4f5387c0f3a8792a0d76b7d68865abbf",
|
||||||
"reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257",
|
"reference": "a36bd2be4f5387c0f3a8792a0d76b7d68865abbf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2296,7 +2296,7 @@
|
||||||
"erusev/parsedown": "^1.0",
|
"erusev/parsedown": "^1.0",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"github/gfm": "0.29.0",
|
"github/gfm": "0.29.0",
|
||||||
"michelf/php-markdown": "^1.4",
|
"michelf/php-markdown": "^1.4 || ^2.0",
|
||||||
"nyholm/psr7": "^1.5",
|
"nyholm/psr7": "^1.5",
|
||||||
"phpstan/phpstan": "^1.8.2",
|
"phpstan/phpstan": "^1.8.2",
|
||||||
"phpunit/phpunit": "^9.5.21",
|
"phpunit/phpunit": "^9.5.21",
|
||||||
|
@ -2369,7 +2369,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-07-29T10:59:45+00:00"
|
"time": "2022-11-03T17:29:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/config",
|
"name": "league/config",
|
||||||
|
@ -2455,16 +2455,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "3.10.1",
|
"version": "3.10.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "9857d7208a94fc63c7bf09caf223280e59ac7274"
|
"reference": "b9bd194b016114d6ff6765c09d40c7d427e4e3f6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9857d7208a94fc63c7bf09caf223280e59ac7274",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b9bd194b016114d6ff6765c09d40c7d427e4e3f6",
|
||||||
"reference": "9857d7208a94fc63c7bf09caf223280e59ac7274",
|
"reference": "b9bd194b016114d6ff6765c09d40c7d427e4e3f6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2526,7 +2526,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||||
"source": "https://github.com/thephpleague/flysystem/tree/3.10.1"
|
"source": "https://github.com/thephpleague/flysystem/tree/3.10.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -2542,7 +2542,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-21T18:57:47+00:00"
|
"time": "2022-10-25T07:01:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem-aws-s3-v3",
|
"name": "league/flysystem-aws-s3-v3",
|
||||||
|
@ -3505,16 +3505,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nunomaduro/termwind",
|
"name": "nunomaduro/termwind",
|
||||||
"version": "v1.14.1",
|
"version": "v1.14.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nunomaduro/termwind.git",
|
"url": "https://github.com/nunomaduro/termwind.git",
|
||||||
"reference": "86fc30eace93b9b6d4c844ba6de76db84184e01b"
|
"reference": "9a8218511eb1a0965629ff820dda25985440aefc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/86fc30eace93b9b6d4c844ba6de76db84184e01b",
|
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/9a8218511eb1a0965629ff820dda25985440aefc",
|
||||||
"reference": "86fc30eace93b9b6d4c844ba6de76db84184e01b",
|
"reference": "9a8218511eb1a0965629ff820dda25985440aefc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3571,7 +3571,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/nunomaduro/termwind/issues",
|
"issues": "https://github.com/nunomaduro/termwind/issues",
|
||||||
"source": "https://github.com/nunomaduro/termwind/tree/v1.14.1"
|
"source": "https://github.com/nunomaduro/termwind/tree/v1.14.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -3587,7 +3587,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-17T15:20:29+00:00"
|
"time": "2022-10-28T22:51:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "p3k/http",
|
"name": "p3k/http",
|
||||||
|
@ -4443,16 +4443,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/browsershot",
|
"name": "spatie/browsershot",
|
||||||
"version": "3.57.2",
|
"version": "3.57.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/browsershot.git",
|
"url": "https://github.com/spatie/browsershot.git",
|
||||||
"reference": "7125719979b7de1257bbf699ff1d3bff3125b228"
|
"reference": "6dbd43cc3e8f35879e1add2fba6801aa97443e12"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/browsershot/zipball/7125719979b7de1257bbf699ff1d3bff3125b228",
|
"url": "https://api.github.com/repos/spatie/browsershot/zipball/6dbd43cc3e8f35879e1add2fba6801aa97443e12",
|
||||||
"reference": "7125719979b7de1257bbf699ff1d3bff3125b228",
|
"reference": "6dbd43cc3e8f35879e1add2fba6801aa97443e12",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4497,7 +4497,7 @@
|
||||||
"webpage"
|
"webpage"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/spatie/browsershot/tree/3.57.2"
|
"source": "https://github.com/spatie/browsershot/tree/3.57.3"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -4505,7 +4505,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-08-19T16:43:07+00:00"
|
"time": "2022-10-25T08:30:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/commonmark-highlighter",
|
"name": "spatie/commonmark-highlighter",
|
||||||
|
@ -4685,16 +4685,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/temporary-directory",
|
"name": "spatie/temporary-directory",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/temporary-directory.git",
|
"url": "https://github.com/spatie/temporary-directory.git",
|
||||||
"reference": "79f138f2b81adae583d04d3727a4538dd394023f"
|
"reference": "e2818d871783d520b319c2d38dc37c10ecdcde20"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/79f138f2b81adae583d04d3727a4538dd394023f",
|
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/e2818d871783d520b319c2d38dc37c10ecdcde20",
|
||||||
"reference": "79f138f2b81adae583d04d3727a4538dd394023f",
|
"reference": "e2818d871783d520b319c2d38dc37c10ecdcde20",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4730,7 +4730,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/spatie/temporary-directory/issues",
|
"issues": "https://github.com/spatie/temporary-directory/issues",
|
||||||
"source": "https://github.com/spatie/temporary-directory/tree/2.1.0"
|
"source": "https://github.com/spatie/temporary-directory/tree/2.1.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -4742,7 +4742,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-03-11T08:16:01+00:00"
|
"time": "2022-08-23T07:15:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "stella-maris/clock",
|
"name": "stella-maris/clock",
|
||||||
|
@ -4789,16 +4789,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v6.1.6",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "7fa3b9cf17363468795e539231a5c91b02b608fc"
|
"reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/7fa3b9cf17363468795e539231a5c91b02b608fc",
|
"url": "https://api.github.com/repos/symfony/console/zipball/a1282bd0c096e0bdb8800b104177e2ce404d8815",
|
||||||
"reference": "7fa3b9cf17363468795e539231a5c91b02b608fc",
|
"reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4865,7 +4865,7 @@
|
||||||
"terminal"
|
"terminal"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/console/tree/v6.1.6"
|
"source": "https://github.com/symfony/console/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -4881,7 +4881,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-07T08:04:03+00:00"
|
"time": "2022-10-26T21:42:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
|
@ -5017,16 +5017,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/error-handler",
|
"name": "symfony/error-handler",
|
||||||
"version": "v6.1.6",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/error-handler.git",
|
"url": "https://github.com/symfony/error-handler.git",
|
||||||
"reference": "49f718e41f1b6f0fd5730895ca5b1c37defd828d"
|
"reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/49f718e41f1b6f0fd5730895ca5b1c37defd828d",
|
"url": "https://api.github.com/repos/symfony/error-handler/zipball/699a26ce5ec656c198bf6e26398b0f0818c7e504",
|
||||||
"reference": "49f718e41f1b6f0fd5730895ca5b1c37defd828d",
|
"reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5068,7 +5068,7 @@
|
||||||
"description": "Provides tools to manage errors and ease debugging PHP code",
|
"description": "Provides tools to manage errors and ease debugging PHP code",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/error-handler/tree/v6.1.6"
|
"source": "https://github.com/symfony/error-handler/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5084,7 +5084,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-07T08:04:03+00:00"
|
"time": "2022-10-28T16:23:08+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
|
@ -5383,16 +5383,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v6.1.6",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "3ae8e9c57155fc48930493a629da293b32efbde0"
|
"reference": "792a1856d2b95273f0e1c3435785f1d01a60ecc6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3ae8e9c57155fc48930493a629da293b32efbde0",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/792a1856d2b95273f0e1c3435785f1d01a60ecc6",
|
||||||
"reference": "3ae8e9c57155fc48930493a629da293b32efbde0",
|
"reference": "792a1856d2b95273f0e1c3435785f1d01a60ecc6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5438,7 +5438,7 @@
|
||||||
"description": "Defines an object-oriented layer for the HTTP specification",
|
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-foundation/tree/v6.1.6"
|
"source": "https://github.com/symfony/http-foundation/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5454,20 +5454,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-02T08:30:52+00:00"
|
"time": "2022-10-12T09:44:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v6.1.6",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "102f99bf81799e93f61b9a73b2f38b309c587a94"
|
"reference": "8fc1ffe753948c47a103a809cdd6a4a8458b3254"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/102f99bf81799e93f61b9a73b2f38b309c587a94",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/8fc1ffe753948c47a103a809cdd6a4a8458b3254",
|
||||||
"reference": "102f99bf81799e93f61b9a73b2f38b309c587a94",
|
"reference": "8fc1ffe753948c47a103a809cdd6a4a8458b3254",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5548,7 +5548,7 @@
|
||||||
"description": "Provides a structured process for converting a Request into a Response",
|
"description": "Provides a structured process for converting a Request into a Response",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-kernel/tree/v6.1.6"
|
"source": "https://github.com/symfony/http-kernel/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5564,20 +5564,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-12T07:48:47+00:00"
|
"time": "2022-10-28T18:06:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mailer",
|
"name": "symfony/mailer",
|
||||||
"version": "v6.1.5",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/mailer.git",
|
"url": "https://github.com/symfony/mailer.git",
|
||||||
"reference": "e1b32deb9efc48def0c76b876860ad36f2123e89"
|
"reference": "7e19813c0b43387c55665780c4caea505cc48391"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/e1b32deb9efc48def0c76b876860ad36f2123e89",
|
"url": "https://api.github.com/repos/symfony/mailer/zipball/7e19813c0b43387c55665780c4caea505cc48391",
|
||||||
"reference": "e1b32deb9efc48def0c76b876860ad36f2123e89",
|
"reference": "7e19813c0b43387c55665780c4caea505cc48391",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5622,7 +5622,7 @@
|
||||||
"description": "Helps sending emails",
|
"description": "Helps sending emails",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/mailer/tree/v6.1.5"
|
"source": "https://github.com/symfony/mailer/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5638,20 +5638,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-08-29T06:58:39+00:00"
|
"time": "2022-10-28T16:23:08+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mime",
|
"name": "symfony/mime",
|
||||||
"version": "v6.1.6",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/mime.git",
|
"url": "https://github.com/symfony/mime.git",
|
||||||
"reference": "5ae192b9a39730435cfec025a499f79d05ac68a3"
|
"reference": "f440f066d57691088d998d6e437ce98771144618"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mime/zipball/5ae192b9a39730435cfec025a499f79d05ac68a3",
|
"url": "https://api.github.com/repos/symfony/mime/zipball/f440f066d57691088d998d6e437ce98771144618",
|
||||||
"reference": "5ae192b9a39730435cfec025a499f79d05ac68a3",
|
"reference": "f440f066d57691088d998d6e437ce98771144618",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5663,8 +5663,7 @@
|
||||||
"egulias/email-validator": "~3.0.0",
|
"egulias/email-validator": "~3.0.0",
|
||||||
"phpdocumentor/reflection-docblock": "<3.2.2",
|
"phpdocumentor/reflection-docblock": "<3.2.2",
|
||||||
"phpdocumentor/type-resolver": "<1.4.0",
|
"phpdocumentor/type-resolver": "<1.4.0",
|
||||||
"symfony/mailer": "<5.4",
|
"symfony/mailer": "<5.4"
|
||||||
"symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"egulias/email-validator": "^2.1.10|^3.1",
|
"egulias/email-validator": "^2.1.10|^3.1",
|
||||||
|
@ -5672,7 +5671,7 @@
|
||||||
"symfony/dependency-injection": "^5.4|^6.0",
|
"symfony/dependency-injection": "^5.4|^6.0",
|
||||||
"symfony/property-access": "^5.4|^6.0",
|
"symfony/property-access": "^5.4|^6.0",
|
||||||
"symfony/property-info": "^5.4|^6.0",
|
"symfony/property-info": "^5.4|^6.0",
|
||||||
"symfony/serializer": "^5.4.14|~6.0.14|^6.1.6"
|
"symfony/serializer": "^5.2|^6.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -5704,7 +5703,7 @@
|
||||||
"mime-type"
|
"mime-type"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/mime/tree/v6.1.6"
|
"source": "https://github.com/symfony/mime/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5720,7 +5719,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-07T08:04:03+00:00"
|
"time": "2022-10-19T08:10:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
|
@ -6522,16 +6521,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v6.1.5",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/routing.git",
|
"url": "https://github.com/symfony/routing.git",
|
||||||
"reference": "f8c1ebb43d0f39e5ecd12a732ba1952a3dd8455c"
|
"reference": "95effeb9d6e2cec861cee06bf5bbf82d09aea7f5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/routing/zipball/f8c1ebb43d0f39e5ecd12a732ba1952a3dd8455c",
|
"url": "https://api.github.com/repos/symfony/routing/zipball/95effeb9d6e2cec861cee06bf5bbf82d09aea7f5",
|
||||||
"reference": "f8c1ebb43d0f39e5ecd12a732ba1952a3dd8455c",
|
"reference": "95effeb9d6e2cec861cee06bf5bbf82d09aea7f5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6590,7 +6589,7 @@
|
||||||
"url"
|
"url"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/routing/tree/v6.1.5"
|
"source": "https://github.com/symfony/routing/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -6606,7 +6605,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-09-09T09:26:14+00:00"
|
"time": "2022-10-18T13:12:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/service-contracts",
|
"name": "symfony/service-contracts",
|
||||||
|
@ -6695,16 +6694,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/string",
|
"name": "symfony/string",
|
||||||
"version": "v6.1.6",
|
"version": "v6.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/string.git",
|
"url": "https://github.com/symfony/string.git",
|
||||||
"reference": "7e7e0ff180d4c5a6636eaad57b65092014b61864"
|
"reference": "823f143370880efcbdfa2dbca946b3358c4707e5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/string/zipball/7e7e0ff180d4c5a6636eaad57b65092014b61864",
|
"url": "https://api.github.com/repos/symfony/string/zipball/823f143370880efcbdfa2dbca946b3358c4707e5",
|
||||||
"reference": "7e7e0ff180d4c5a6636eaad57b65092014b61864",
|
"reference": "823f143370880efcbdfa2dbca946b3358c4707e5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6760,7 +6759,7 @@
|
||||||
"utf8"
|
"utf8"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/string/tree/v6.1.6"
|
"source": "https://github.com/symfony/string/tree/v6.1.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -9809,16 +9808,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "9.2.17",
|
"version": "9.2.18",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "aa94dc41e8661fe90c7316849907cba3007b10d8"
|
"reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/12fddc491826940cf9b7e88ad9664cf51f0f6d0a",
|
||||||
"reference": "aa94dc41e8661fe90c7316849907cba3007b10d8",
|
"reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -9874,7 +9873,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17"
|
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.18"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -9882,7 +9881,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-08-30T12:24:04+00:00"
|
"time": "2022-10-27T13:35:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
|
@ -10127,16 +10126,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "9.5.25",
|
"version": "9.5.26",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d"
|
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2",
|
||||||
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
|
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -10209,7 +10208,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -10225,7 +10224,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-09-25T03:44:45+00:00"
|
"time": "2022-10-28T06:00:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pimple/pimple",
|
"name": "pimple/pimple",
|
||||||
|
@ -11501,16 +11500,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-ignition",
|
"name": "spatie/laravel-ignition",
|
||||||
"version": "1.5.2",
|
"version": "1.6.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/laravel-ignition.git",
|
"url": "https://github.com/spatie/laravel-ignition.git",
|
||||||
"reference": "f2336fc79d99aab5cf27fa4aebe5e9c9ecf3808a"
|
"reference": "2b79cf6ed40946b64ac6713d7d2da8a9d87f612b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/f2336fc79d99aab5cf27fa4aebe5e9c9ecf3808a",
|
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/2b79cf6ed40946b64ac6713d7d2da8a9d87f612b",
|
||||||
"reference": "f2336fc79d99aab5cf27fa4aebe5e9c9ecf3808a",
|
"reference": "2b79cf6ed40946b64ac6713d7d2da8a9d87f612b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -11587,7 +11586,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-14T12:24:21+00:00"
|
"time": "2022-10-26T17:39:54+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-ray",
|
"name": "spatie/laravel-ray",
|
||||||
|
|
18
config/bridgy.php
Normal file
18
config/bridgy.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mastodon Token
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When syndicating posts to Mastodon using Brid.gy’s Micropub endpoint, we
|
||||||
|
| need to provide an access token. This token can be generated by going to
|
||||||
|
| https://brid.gy/mastodon and clicking the “Get token” button.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mastodon_token' => env('BRIDGY_MASTODON_TOKEN'),
|
||||||
|
|
||||||
|
];
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('notes', function (Blueprint $table) {
|
||||||
|
$table->string('mastodon_url')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('notes', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('mastodon_url');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
|
@ -137,6 +137,7 @@ class NotesTableSeeder extends Seeder
|
||||||
$noteSyndicated->facebook_url = 'https://www.facebook.com/post/12345789';
|
$noteSyndicated->facebook_url = 'https://www.facebook.com/post/12345789';
|
||||||
$noteSyndicated->swarm_url = 'https://www.swarmapp.com/checking/123456789';
|
$noteSyndicated->swarm_url = 'https://www.swarmapp.com/checking/123456789';
|
||||||
$noteSyndicated->instagram_url = 'https://www.instagram.com/p/aWsEd123Jh';
|
$noteSyndicated->instagram_url = 'https://www.instagram.com/p/aWsEd123Jh';
|
||||||
|
$noteSyndicated->mastodon_url = 'https://mastodon.social/@jonnybarnes/123456789';
|
||||||
$noteSyndicated->save();
|
$noteSyndicated->save();
|
||||||
DB::table('notes')
|
DB::table('notes')
|
||||||
->where('id', $noteSyndicated->id)
|
->where('id', $noteSyndicated->id)
|
||||||
|
|
876
package-lock.json
generated
876
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
@ -6,17 +6,17 @@
|
||||||
"license": "CC0-1.0",
|
"license": "CC0-1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"puppeteer": "^19.1.0"
|
"puppeteer": "^19.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.19.6",
|
"@babel/core": "^7.19.6",
|
||||||
"@babel/preset-env": "^7.19.4",
|
"@babel/preset-env": "^7.19.4",
|
||||||
"autoprefixer": "^10.4.12",
|
"autoprefixer": "^10.4.13",
|
||||||
"babel-loader": "^8.2.1",
|
"babel-loader": "^9.1.0",
|
||||||
"browserlist": "^1.0.1",
|
"browserlist": "^1.0.1",
|
||||||
"compression-webpack-plugin": "^10.0.0",
|
"compression-webpack-plugin": "^10.0.0",
|
||||||
"css-loader": "^6.2.0",
|
"css-loader": "^6.2.0",
|
||||||
"cssnano": "^5.1.13",
|
"cssnano": "^5.1.14",
|
||||||
"eslint": "^8.26.0",
|
"eslint": "^8.26.0",
|
||||||
"eslint-webpack-plugin": "^3.2.0",
|
"eslint-webpack-plugin": "^3.2.0",
|
||||||
"mini-css-extract-plugin": "^2.6.1",
|
"mini-css-extract-plugin": "^2.6.1",
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
"postcss-combine-media-query": "^1.0.1",
|
"postcss-combine-media-query": "^1.0.1",
|
||||||
"postcss-import": "^15.0.0",
|
"postcss-import": "^15.0.0",
|
||||||
"postcss-loader": "^7.0.1",
|
"postcss-loader": "^7.0.1",
|
||||||
"stylelint": "^14.14.0",
|
"stylelint": "^14.14.1",
|
||||||
"stylelint-config-standard": "^29.0.0",
|
"stylelint-config-standard": "^29.0.0",
|
||||||
"stylelint-webpack-plugin": "^3.1.1",
|
"stylelint-webpack-plugin": "^3.1.1",
|
||||||
"webpack": "^5.74.0",
|
"webpack": "^5.74.0",
|
||||||
|
|
|
@ -33,12 +33,14 @@
|
||||||
$note->tweet_id ||
|
$note->tweet_id ||
|
||||||
$note->facebook_url ||
|
$note->facebook_url ||
|
||||||
$note->swarm_url ||
|
$note->swarm_url ||
|
||||||
$note->instagram_url)
|
$note->instagram_url ||
|
||||||
|
$note->mastodon_url)
|
||||||
@include('templates.social-links', [
|
@include('templates.social-links', [
|
||||||
'tweet_id' => $note->tweet_id,
|
'tweet_id' => $note->tweet_id,
|
||||||
'facebook_url' => $note->facebook_url,
|
'facebook_url' => $note->facebook_url,
|
||||||
'swarm_url' => $note->swarm_url,
|
'swarm_url' => $note->swarm_url,
|
||||||
'instagram_url' => $note->instagram_url,
|
'instagram_url' => $note->instagram_url,
|
||||||
|
'mastodon_url' => $note->mastodon_url,
|
||||||
])
|
])
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
@ -27,3 +27,15 @@
|
||||||
<path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/>
|
<path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/>
|
||||||
</svg>
|
</svg>
|
||||||
</a>@endif
|
</a>@endif
|
||||||
|
@if($mastodon_url !== null)<a class="u-syndication" href="{{ $mastodon_url }}" title="View note on Mastodon">
|
||||||
|
<svg width="75" height="79" viewBox="0 0 75 79" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M73.8393 17.4898C72.6973 9.00165 65.2994 2.31235 56.5296 1.01614C55.05 0.797115 49.4441 0 36.4582 0H36.3612C23.3717 0 20.585 0.797115 19.1054 1.01614C10.5798 2.27644 2.79399 8.28712 0.904997 16.8758C-0.00358524 21.1056 -0.100549 25.7949 0.0682394 30.0965C0.308852 36.2651 0.355538 42.423 0.91577 48.5665C1.30307 52.6474 1.97872 56.6957 2.93763 60.6812C4.73325 68.042 12.0019 74.1676 19.1233 76.6666C26.7478 79.2728 34.9474 79.7055 42.8039 77.9162C43.6682 77.7151 44.5217 77.4817 45.3645 77.216C47.275 76.6092 49.5123 75.9305 51.1571 74.7385C51.1797 74.7217 51.1982 74.7001 51.2112 74.6753C51.2243 74.6504 51.2316 74.6229 51.2325 74.5948V68.6416C51.2321 68.6154 51.2259 68.5896 51.2142 68.5661C51.2025 68.5426 51.1858 68.522 51.1651 68.5058C51.1444 68.4896 51.1204 68.4783 51.0948 68.4726C51.0692 68.4669 51.0426 68.467 51.0171 68.4729C45.9835 69.675 40.8254 70.2777 35.6502 70.2682C26.7439 70.2682 24.3486 66.042 23.6626 64.2826C23.1113 62.762 22.7612 61.1759 22.6212 59.5646C22.6197 59.5375 22.6247 59.5105 22.6357 59.4857C22.6466 59.4609 22.6633 59.4391 22.6843 59.422C22.7053 59.4048 22.73 59.3929 22.7565 59.3871C22.783 59.3813 22.8104 59.3818 22.8367 59.3886C27.7864 60.5826 32.8604 61.1853 37.9522 61.1839C39.1768 61.1839 40.3978 61.1839 41.6224 61.1516C46.7435 61.008 52.1411 60.7459 57.1796 59.7621C57.3053 59.7369 57.431 59.7154 57.5387 59.6831C65.4861 58.157 73.0493 53.3672 73.8178 41.2381C73.8465 40.7606 73.9184 36.2364 73.9184 35.7409C73.9219 34.0569 74.4606 23.7949 73.8393 17.4898Z" fill="url(#paint0_linear_549_34)"/>
|
||||||
|
<path d="M61.2484 27.0263V48.114H52.8916V27.6475C52.8916 23.3388 51.096 21.1413 47.4437 21.1413C43.4287 21.1413 41.4177 23.7409 41.4177 28.8755V40.0782H33.1111V28.8755C33.1111 23.7409 31.0965 21.1413 27.0815 21.1413C23.4507 21.1413 21.6371 23.3388 21.6371 27.6475V48.114H13.2839V27.0263C13.2839 22.7176 14.384 19.2946 16.5843 16.7572C18.8539 14.2258 21.8311 12.926 25.5264 12.926C29.8036 12.926 33.0357 14.5705 35.1905 17.8559L37.2698 21.346L39.3527 17.8559C41.5074 14.5705 44.7395 12.926 49.0095 12.926C52.7013 12.926 55.6784 14.2258 57.9553 16.7572C60.1531 19.2922 61.2508 22.7152 61.2484 27.0263Z" fill="white"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_549_34" x1="37.0692" y1="0" x2="37.0692" y2="79" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#6364FF"/>
|
||||||
|
<stop offset="1" stop-color="#563ACC"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
</a>@endif
|
||||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace Tests\Feature;
|
namespace Tests\Feature;
|
||||||
|
|
||||||
use App\Jobs\SendWebMentions;
|
use App\Jobs\SendWebMentions;
|
||||||
|
use App\Jobs\SyndicateNoteToMastodon;
|
||||||
use App\Jobs\SyndicateNoteToTwitter;
|
use App\Jobs\SyndicateNoteToTwitter;
|
||||||
use App\Models\Media;
|
use App\Models\Media;
|
||||||
use App\Models\Note;
|
use App\Models\Note;
|
||||||
|
@ -123,7 +124,7 @@ class MicropubControllerTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
public function micropubClientCanRequestTheNewNoteIsSyndicatedToTwitter(): void
|
public function micropubClientCanRequestTheNewNoteIsSyndicatedToTwitterAndMastodon(): void
|
||||||
{
|
{
|
||||||
Queue::fake();
|
Queue::fake();
|
||||||
|
|
||||||
|
@ -131,6 +132,10 @@ class MicropubControllerTest extends TestCase
|
||||||
'uid' => 'https://twitter.com/jonnybarnes',
|
'uid' => 'https://twitter.com/jonnybarnes',
|
||||||
'service_name' => 'Twitter',
|
'service_name' => 'Twitter',
|
||||||
]);
|
]);
|
||||||
|
SyndicationTarget::factory()->create([
|
||||||
|
'uid' => 'https://mastodon.social/@jonnybarnes',
|
||||||
|
'service_name' => 'Mastodon',
|
||||||
|
]);
|
||||||
|
|
||||||
$faker = Factory::create();
|
$faker = Factory::create();
|
||||||
$note = $faker->text;
|
$note = $faker->text;
|
||||||
|
@ -139,13 +144,17 @@ class MicropubControllerTest extends TestCase
|
||||||
[
|
[
|
||||||
'h' => 'entry',
|
'h' => 'entry',
|
||||||
'content' => $note,
|
'content' => $note,
|
||||||
'mp-syndicate-to' => 'https://twitter.com/jonnybarnes',
|
'mp-syndicate-to' => [
|
||||||
|
'https://twitter.com/jonnybarnes',
|
||||||
|
'https://mastodon.social/@jonnybarnes',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
|
['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
|
||||||
);
|
);
|
||||||
$response->assertJson(['response' => 'created']);
|
$response->assertJson(['response' => 'created']);
|
||||||
$this->assertDatabaseHas('notes', ['note' => $note]);
|
$this->assertDatabaseHas('notes', ['note' => $note]);
|
||||||
Queue::assertPushed(SyndicateNoteToTwitter::class);
|
Queue::assertPushed(SyndicateNoteToTwitter::class);
|
||||||
|
Queue::assertPushed(SyndicateNoteToMastodon::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
|
@ -243,6 +252,10 @@ class MicropubControllerTest extends TestCase
|
||||||
'uid' => 'https://twitter.com/jonnybarnes',
|
'uid' => 'https://twitter.com/jonnybarnes',
|
||||||
'service_name' => 'Twitter',
|
'service_name' => 'Twitter',
|
||||||
]);
|
]);
|
||||||
|
SyndicationTarget::factory()->create([
|
||||||
|
'uid' => 'https://mastodon.social/@jonnybarnes',
|
||||||
|
'service_name' => 'Mastodon',
|
||||||
|
]);
|
||||||
|
|
||||||
$faker = Factory::create();
|
$faker = Factory::create();
|
||||||
$note = $faker->text;
|
$note = $faker->text;
|
||||||
|
@ -255,6 +268,7 @@ class MicropubControllerTest extends TestCase
|
||||||
'in-reply-to' => ['https://aaronpk.localhost'],
|
'in-reply-to' => ['https://aaronpk.localhost'],
|
||||||
'mp-syndicate-to' => [
|
'mp-syndicate-to' => [
|
||||||
'https://twitter.com/jonnybarnes',
|
'https://twitter.com/jonnybarnes',
|
||||||
|
'https://mastodon.social/@jonnybarnes',
|
||||||
],
|
],
|
||||||
'photo' => [config('filesystems.disks.s3.url') . '/test-photo.jpg'],
|
'photo' => [config('filesystems.disks.s3.url') . '/test-photo.jpg'],
|
||||||
],
|
],
|
||||||
|
@ -266,6 +280,7 @@ class MicropubControllerTest extends TestCase
|
||||||
->assertJson(['response' => 'created']);
|
->assertJson(['response' => 'created']);
|
||||||
Queue::assertPushed(SendWebMentions::class);
|
Queue::assertPushed(SendWebMentions::class);
|
||||||
Queue::assertPushed(SyndicateNoteToTwitter::class);
|
Queue::assertPushed(SyndicateNoteToTwitter::class);
|
||||||
|
Queue::assertPushed(SyndicateNoteToMastodon::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
39
tests/Unit/Jobs/SyndicateNoteToMastodonJobTest.php
Normal file
39
tests/Unit/Jobs/SyndicateNoteToMastodonJobTest.php
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Unit\Jobs;
|
||||||
|
|
||||||
|
use App\Jobs\SyndicateNoteToMastodon;
|
||||||
|
use App\Models\Note;
|
||||||
|
use Faker\Factory;
|
||||||
|
use GuzzleHttp\Client;
|
||||||
|
use GuzzleHttp\Handler\MockHandler;
|
||||||
|
use GuzzleHttp\HandlerStack;
|
||||||
|
use GuzzleHttp\Psr7\Response;
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class SyndicateNoteToMastodonJobTest extends TestCase
|
||||||
|
{
|
||||||
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function weSyndicateNotesToMastodon(): void
|
||||||
|
{
|
||||||
|
config(['bridgy.mastodon_token' => 'test']);
|
||||||
|
$faker = Factory::create();
|
||||||
|
$randomNumber = $faker->randomNumber();
|
||||||
|
$mock = new MockHandler([
|
||||||
|
new Response(201, ['Location' => 'https://mastodon.example/@jonny/' . $randomNumber]),
|
||||||
|
]);
|
||||||
|
$handler = HandlerStack::create($mock);
|
||||||
|
$client = new Client(['handler' => $handler]);
|
||||||
|
|
||||||
|
$note = Note::factory()->create();
|
||||||
|
$job = new SyndicateNoteToMastodon($note);
|
||||||
|
$job->handle($client);
|
||||||
|
|
||||||
|
$this->assertDatabaseHas('notes', [
|
||||||
|
'mastodon_url' => 'https://mastodon.example/@jonny/' . $randomNumber,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -113,8 +113,8 @@ class NotesTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function shorturlMethodReturnsExpectedValue(): void
|
public function shorturlMethodReturnsExpectedValue(): void
|
||||||
{
|
{
|
||||||
Note::factory(14)->create();
|
$note = Note::factory()->make();
|
||||||
$note = Note::find(14);
|
$note->id = 14;
|
||||||
$this->assertEquals(config('app.shorturl') . '/notes/E', $note->shorturl);
|
$this->assertEquals(config('app.shorturl') . '/notes/E', $note->shorturl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue