Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Jérémy Munsch
5ac7888fc8
Fix #13 Send only notifications to Admin users if message is private 2023-04-21 16:19:57 +02:00
Jérémy Munsch
b446a09167
fix composer lock 2023-04-21 15:16:04 +02:00
8 changed files with 182 additions and 166 deletions

View file

@ -454,6 +454,7 @@ class TicketController extends Controller
/** @var \App\Enums\TicketStatus */ /** @var \App\Enums\TicketStatus */
$oldStatus = $ticket->status; $oldStatus = $ticket->status;
// * Notification systeme doit etre privée.
event(new TicketStatusChanged($ticket, $oldStatus, null, $message, true, false)); event(new TicketStatusChanged($ticket, $oldStatus, null, $message, true, false));
event(new NotifySubscriptions($ticket, $message, collect([$ticket->user]))); event(new NotifySubscriptions($ticket, $message, collect([$ticket->user])));

View file

@ -20,14 +20,15 @@ class CreateMessage extends FormRequest
return false; return false;
} }
if ( if (
!auth()->user()->can('createPrivateMessage', request()->route()->ticket) !$user->can('createPrivateMessage', $this->route()->ticket)
&& $this->is_private == MessageType::private() && $this->is_private == MessageType::private()
) { ) {
return false; return false;
} }
return auth()->check() and auth()->user()->sites and ( return auth()->check() and $user->sites and (
$user->isAdmin() or $user->isAdmin() or $user->sites->contains(
auth()->user()->sites->contains(request()->route()->ticket->site_id) $this->route()->ticket->site_id
)
); );
} }

View file

@ -18,25 +18,25 @@ class AddStatusMessages
*/ */
public function handle(TicketStatusChanged $event) public function handle(TicketStatusChanged $event)
{ {
// phpcs:enable
$message = new Message(); $message = new Message();
$message->ticket_id = $event->ticket->id; $message->ticket_id = $event->ticket->id;
$message->type = MessageType::public(); // * Le message system est privé si demandé (eg: Assignation à une personne).
if ($event->is_private) { $message->type = $event->is_private ?
$message->type = MessageType::private(); MessageType::public() : MessageType::private();
}
if ($event->message) { if ($event->message) {
$message->message = $event->message; $message->message = $event->message;
} elseif ($event->user) { } elseif ($event->user) {
$message->message = sprintf( $message->message = sprintf(
"<b>%s</b> %s <b>%s</b>", "<b>%s</b> %s <b>%s</b>",
$event->user->name, $event->user->name,
__("a modifié le statut en"), trans('a modifié le statut en'),
$event->ticket->status->label $event->ticket->status->label
); );
} else { } else {
$message->message = sprintf( $message->message = sprintf(
"%s : <b>%s</b>", "%s : <b>%s</b>",
__("Le statut est passé à"), trans('Le statut est passé à'),
$event->ticket->status->label $event->ticket->status->label
); );
} }
@ -46,55 +46,55 @@ class AddStatusMessages
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("Votre ticket a été créé, nous allons en prendre connaissance.") trans('Votre ticket a été créé, nous allons en prendre connaissance.')
); );
break; break;
case TicketStatus::estimateTodo(): case TicketStatus::estimateTodo():
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("Votre ticket nécessite une estimation, nous allons vous proposer un devis.") trans('Votre ticket nécessite une estimation, nous allons vous proposer un devis.')
); );
break; break;
case TicketStatus::takenInAccount(): case TicketStatus::takenInAccount():
$message->message .= sprintf("<br>" . $message->message .= sprintf("<br>" .
__("Votre ticket est dans le processus de traitement.") . "<br>"); trans('Votre ticket est dans le processus de traitement.') . "<br>");
break; break;
case TicketStatus::waiting(): case TicketStatus::waiting():
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("Nous attendons une réponse de votre part pour procéder à la suite du traitement.") trans('Nous attendons une réponse de votre part pour procéder à la suite du traitement.')
); );
break; break;
case TicketStatus::waitingValidation(): case TicketStatus::waitingValidation():
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("Nous attendons une validation de votre part pour procéder au traitement.") trans('Nous attendons une validation de votre part pour procéder au traitement.')
); );
break; break;
case TicketStatus::recette(): case TicketStatus::recette():
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("Le traitement à été réalisé et mis à disposition sur la plateforme de recette. trans('Le traitement à été réalisé et mis à disposition sur la plateforme de recette.
Vous pouvez vérifier que la solution mise en œuvre correspond à la demande.") Vous pouvez vérifier que la solution mise en œuvre correspond à la demande.')
); );
break; break;
case TicketStatus::production(): case TicketStatus::production():
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("La solution à été mise en ligne. trans('La solution à été mise en ligne.
Vous pouvez vérifier sur le site de production que tout fonctionne comme attendu.") Vous pouvez vérifier sur le site de production que tout fonctionne comme attendu.')
); );
break; break;
case TicketStatus::archived(): case TicketStatus::archived():
$message->message = sprintf( $message->message = sprintf(
"%s<br>%s<br>", "%s<br>%s<br>",
$message->message, $message->message,
__("Ce ticket est clos.") trans('Ce ticket est clos.')
); );
break; break;
} //end switch } //end switch

View file

@ -22,7 +22,9 @@ class SendSubscriptionsNotificationsMail
$ignoreUsers = $event->ignoreUsers ?? collect(); $ignoreUsers = $event->ignoreUsers ?? collect();
foreach ($event->ticket->subscriptions as $sub) { foreach ($event->ticket->subscriptions as $sub) {
if ( if (
// * Ignore the message author (job in sync).
$sub->email !== $ignoreConnectedUserEmail and $sub->email !== $ignoreConnectedUserEmail and
// * Are there are users to notify
!$ignoreUsers->filter(function (User $user) use ($sub) { !$ignoreUsers->filter(function (User $user) use ($sub) {
return $user->email === $sub->email; return $user->email === $sub->email;
})->count() })->count()

View file

@ -9,6 +9,14 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Kwaadpepper\Enum\Traits\CastsEnums; use Kwaadpepper\Enum\Traits\CastsEnums;
/**
*
* @property string $message The message content.
* @property \App\Enums\MessageType $type The message is not visible for clients.
* @property string $file The message joined file path.
*
* @package App\Models
*/
class Message extends Model class Message extends Model
{ {
use HasFactory; use HasFactory;
@ -32,7 +40,6 @@ class Message extends Model
protected $enumCasts = [ protected $enumCasts = [
'type' => MessageType::class 'type' => MessageType::class
]; ];
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.
* *
@ -52,10 +59,30 @@ class Message extends Model
}]); }]);
/** @var \App\Models\User $messageUser */ /** @var \App\Models\User $messageUser */
$messageUser = $message->user()->withTrashed()->firstOrFail(); $messageUser = $message->user()->withTrashed()->firstOrFail();
// * Send mail to mentionned users // * Send mail to mentionned users\
$usersNotified = $ticket->sendBeenMentionnedToUser($message); /** @var \Illuminate\Support\Collection<\App\Models\User> */
$dontNotifyUsers = $ticket->sendBeenMentionnedToUser($message);
// * Ignorer le cas où le message est privé et l'auteur du ticket n'est pas admin.
if (!$ticket->user->isAdmin() && $message->type->equals(MessageType::private())) {
$dontNotifyUsers->push($ticket->user);
}
// * Filter Users if the message is private.
if ($message->type->equals(MessageType::private())) {
$dontNotifyUsers = $dontNotifyUsers->concat(
// * Add to ignore list all non Admin users.
$ticket->subscriptions->filter(function (User $suscribedUser) {
return !$suscribedUser->isAdmin();
})
);
}
// * If email has not been sen to ticket author yet. // * If email has not been sen to ticket author yet.
if (!$usersNotified->contains($ticket->user) and $ticket->user->id !== $messageUser->id) { if (
!$dontNotifyUsers->contains(function (User $dontNotifyUser) use ($ticket) {
return $dontNotifyUser->id === $ticket->user->id;
}) and $ticket->user->id !== $messageUser->id
) {
// * Send mail to ticket author // * Send mail to ticket author
event(new NotifyTicketCreator( event(new NotifyTicketCreator(
$ticket, $ticket,
@ -64,7 +91,7 @@ class Message extends Model
'message' => $message->message 'message' => $message->message
]) ])
)); ));
$usersNotified->push($ticket->user); $dontNotifyUsers->push($ticket->user);
} }
// ? Is message author is admin ? // ? Is message author is admin ?
if ($messageUser->isAdmin()) { if ($messageUser->isAdmin()) {
@ -85,7 +112,7 @@ class Message extends Model
'name' => $message->user->name, 'name' => $message->user->name,
'message' => $message->message 'message' => $message->message
]), ]),
$usersNotified $dontNotifyUsers
)); ));
}//end if }//end if
}); });

View file

@ -181,6 +181,7 @@ class Ticket extends Model
{ {
$ticket = $this; $ticket = $this;
// Find @user + send mail si un seul user est trouvé. // Find @user + send mail si un seul user est trouvé.
/** @var \Illuminate\Support\Collection<\App\Models\User> */
$usersNotified = collect([]); $usersNotified = collect([]);
$matches = []; $matches = [];
$ticket->load('site'); $ticket->load('site');
@ -215,8 +216,9 @@ class Ticket extends Model
} }
} catch (ModelNotFoundException $e) { } catch (ModelNotFoundException $e) {
continue; continue;
}//end try } //end try
}//end foreach } //end foreach
return $usersNotified; return $usersNotified;
} }

257
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "1cb09b6eb9684ab4e08cfc8ec38653e4", "content-hash": "f03798765bdd8a2afc43bb39751452b9",
"packages": [ "packages": [
{ {
"name": "asm89/stack-cors", "name": "asm89/stack-cors",
@ -1260,22 +1260,22 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.5.0", "version": "7.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9",
"reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5", "guzzlehttp/promises": "^1.5",
"guzzlehttp/psr7": "^1.9 || ^2.4", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
@ -1368,7 +1368,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.5.0" "source": "https://github.com/guzzle/guzzle/tree/7.5.1"
}, },
"funding": [ "funding": [
{ {
@ -1384,7 +1384,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-08-28T15:39:27+00:00" "time": "2023-04-17T16:30:08+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@ -1472,22 +1472,22 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.4.4", "version": "2.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf" "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf", "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
"reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf", "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-factory": "^1.0", "psr/http-factory": "^1.0",
"psr/http-message": "^1.0", "psr/http-message": "^1.1 || ^2.0",
"ralouphie/getallheaders": "^3.0" "ralouphie/getallheaders": "^3.0"
}, },
"provide": { "provide": {
@ -1507,9 +1507,6 @@
"bamarni-bin": { "bamarni-bin": {
"bin-links": true, "bin-links": true,
"forward-command": false "forward-command": false
},
"branch-alias": {
"dev-master": "2.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -1571,7 +1568,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.4" "source": "https://github.com/guzzle/psr7/tree/2.5.0"
}, },
"funding": [ "funding": [
{ {
@ -1587,7 +1584,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-09T13:19:02+00:00" "time": "2023-04-17T16:11:26+00:00"
}, },
{ {
"name": "http-interop/http-factory-guzzle", "name": "http-interop/http-factory-guzzle",
@ -3129,38 +3126,39 @@
}, },
{ {
"name": "nyholm/psr7", "name": "nyholm/psr7",
"version": "1.5.1", "version": "1.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Nyholm/psr7.git", "url": "https://github.com/Nyholm/psr7.git",
"reference": "f734364e38a876a23be4d906a2a089e1315be18a" "reference": "ed7cf98f6562831dbc3c962406b5e49dc8179c8c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", "url": "https://api.github.com/repos/Nyholm/psr7/zipball/ed7cf98f6562831dbc3c962406b5e49dc8179c8c",
"reference": "f734364e38a876a23be4d906a2a089e1315be18a", "reference": "ed7cf98f6562831dbc3c962406b5e49dc8179c8c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1", "php": ">=7.2",
"php-http/message-factory": "^1.0", "php-http/message-factory": "^1.0",
"psr/http-factory": "^1.0", "psr/http-factory": "^1.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.1 || ^2.0"
}, },
"provide": { "provide": {
"php-http/message-factory-implementation": "1.0",
"psr/http-factory-implementation": "1.0", "psr/http-factory-implementation": "1.0",
"psr/http-message-implementation": "1.0" "psr/http-message-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"http-interop/http-factory-tests": "^0.9", "http-interop/http-factory-tests": "^0.9",
"php-http/psr7-integration-tests": "^1.0", "php-http/psr7-integration-tests": "^1.0@dev",
"phpunit/phpunit": "^7.5 || 8.5 || 9.4", "phpunit/phpunit": "^7.5 || 8.5 || 9.4",
"symfony/error-handler": "^4.4" "symfony/error-handler": "^4.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4-dev" "dev-master": "1.7-dev"
} }
}, },
"autoload": { "autoload": {
@ -3190,7 +3188,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/Nyholm/psr7/issues", "issues": "https://github.com/Nyholm/psr7/issues",
"source": "https://github.com/Nyholm/psr7/tree/1.5.1" "source": "https://github.com/Nyholm/psr7/tree/1.7.0"
}, },
"funding": [ "funding": [
{ {
@ -3202,7 +3200,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-06-22T07:13:36+00:00" "time": "2023-04-20T08:38:48+00:00"
}, },
{ {
"name": "opis/closure", "name": "opis/closure",
@ -3321,16 +3319,16 @@
}, },
{ {
"name": "php-http/client-common", "name": "php-http/client-common",
"version": "2.6.0", "version": "2.6.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-http/client-common.git", "url": "https://github.com/php-http/client-common.git",
"reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0" "reference": "665bfc381bb910385f70391ed3eeefd0b7bbdd0d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-http/client-common/zipball/45db684cd4e186dcdc2b9c06b22970fe123796c0", "url": "https://api.github.com/repos/php-http/client-common/zipball/665bfc381bb910385f70391ed3eeefd0b7bbdd0d",
"reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0", "reference": "665bfc381bb910385f70391ed3eeefd0b7bbdd0d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3340,7 +3338,7 @@
"php-http/message-factory": "^1.0", "php-http/message-factory": "^1.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"psr/http-factory": "^1.0", "psr/http-factory": "^1.0",
"psr/http-message": "^1.0", "psr/http-message": "^1.0 || ^2.0",
"symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0", "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.17" "symfony/polyfill-php80": "^1.17"
}, },
@ -3350,7 +3348,7 @@
"nyholm/psr7": "^1.2", "nyholm/psr7": "^1.2",
"phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1",
"phpspec/prophecy": "^1.10.2", "phpspec/prophecy": "^1.10.2",
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" "phpunit/phpunit": "^7.5.20 || ^8.5.33 || ^9.6.7"
}, },
"suggest": { "suggest": {
"ext-json": "To detect JSON responses with the ContentTypePlugin", "ext-json": "To detect JSON responses with the ContentTypePlugin",
@ -3360,11 +3358,6 @@
"php-http/stopwatch-plugin": "Symfony Stopwatch plugin" "php-http/stopwatch-plugin": "Symfony Stopwatch plugin"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Http\\Client\\Common\\": "src/" "Http\\Client\\Common\\": "src/"
@ -3390,9 +3383,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-http/client-common/issues", "issues": "https://github.com/php-http/client-common/issues",
"source": "https://github.com/php-http/client-common/tree/2.6.0" "source": "https://github.com/php-http/client-common/tree/2.6.1"
}, },
"time": "2022-09-29T09:59:43+00:00" "time": "2023-04-14T13:30:08+00:00"
}, },
{ {
"name": "php-http/discovery", "name": "php-http/discovery",
@ -3470,34 +3463,29 @@
}, },
{ {
"name": "php-http/httplug", "name": "php-http/httplug",
"version": "2.3.0", "version": "2.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-http/httplug.git", "url": "https://github.com/php-http/httplug.git",
"reference": "f640739f80dfa1152533976e3c112477f69274eb" "reference": "625ad742c360c8ac580fcc647a1541d29e257f67"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67",
"reference": "f640739f80dfa1152533976e3c112477f69274eb", "reference": "625ad742c360c8ac580fcc647a1541d29e257f67",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0", "php": "^7.1 || ^8.0",
"php-http/promise": "^1.1", "php-http/promise": "^1.1",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"require-dev": { "require-dev": {
"friends-of-phpspec/phpspec-code-coverage": "^4.1", "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0",
"phpspec/phpspec": "^5.1 || ^6.0" "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Http\\Client\\": "src/" "Http\\Client\\": "src/"
@ -3526,29 +3514,29 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-http/httplug/issues", "issues": "https://github.com/php-http/httplug/issues",
"source": "https://github.com/php-http/httplug/tree/2.3.0" "source": "https://github.com/php-http/httplug/tree/2.4.0"
}, },
"time": "2022-02-21T09:52:22+00:00" "time": "2023-04-14T15:10:03+00:00"
}, },
{ {
"name": "php-http/message", "name": "php-http/message",
"version": "1.13.0", "version": "1.14.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-http/message.git", "url": "https://github.com/php-http/message.git",
"reference": "7886e647a30a966a1a8d1dad1845b71ca8678361" "reference": "2ccee04a28c3d98eb3f2b85ce1e2fcff70c0e63b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361", "url": "https://api.github.com/repos/php-http/message/zipball/2ccee04a28c3d98eb3f2b85ce1e2fcff70c0e63b",
"reference": "7886e647a30a966a1a8d1dad1845b71ca8678361", "reference": "2ccee04a28c3d98eb3f2b85ce1e2fcff70c0e63b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"clue/stream-filter": "^1.5", "clue/stream-filter": "^1.5",
"php": "^7.1 || ^8.0", "php": "^7.1 || ^8.0",
"php-http/message-factory": "^1.0.2", "php-http/message-factory": "^1.0.2",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"provide": { "provide": {
"php-http/message-factory-implementation": "1.0" "php-http/message-factory-implementation": "1.0"
@ -3568,11 +3556,6 @@
"slim/slim": "Used with Slim Framework PSR-7 implementation" "slim/slim": "Used with Slim Framework PSR-7 implementation"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
}
},
"autoload": { "autoload": {
"files": [ "files": [
"src/filters.php" "src/filters.php"
@ -3600,32 +3583,32 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-http/message/issues", "issues": "https://github.com/php-http/message/issues",
"source": "https://github.com/php-http/message/tree/1.13.0" "source": "https://github.com/php-http/message/tree/1.14.0"
}, },
"time": "2022-02-11T13:41:14+00:00" "time": "2023-04-14T14:26:18+00:00"
}, },
{ {
"name": "php-http/message-factory", "name": "php-http/message-factory",
"version": "v1.0.2", "version": "1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-http/message-factory.git", "url": "https://github.com/php-http/message-factory.git",
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.4", "php": ">=5.4",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0-dev" "dev-master": "1.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -3654,9 +3637,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-http/message-factory/issues", "issues": "https://github.com/php-http/message-factory/issues",
"source": "https://github.com/php-http/message-factory/tree/master" "source": "https://github.com/php-http/message-factory/tree/1.1.0"
}, },
"time": "2015-12-19T14:08:53+00:00" "time": "2023-04-14T14:16:17+00:00"
}, },
{ {
"name": "php-http/promise", "name": "php-http/promise",
@ -3939,21 +3922,21 @@
}, },
{ {
"name": "psr/http-client", "name": "psr/http-client",
"version": "1.0.1", "version": "1.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/http-client.git", "url": "https://github.com/php-fig/http-client.git",
"reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
"reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.0 || ^8.0", "php": "^7.0 || ^8.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -3973,7 +3956,7 @@
"authors": [ "authors": [
{ {
"name": "PHP-FIG", "name": "PHP-FIG",
"homepage": "http://www.php-fig.org/" "homepage": "https://www.php-fig.org/"
} }
], ],
"description": "Common interface for HTTP clients", "description": "Common interface for HTTP clients",
@ -3985,27 +3968,27 @@
"psr-18" "psr-18"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/http-client/tree/master" "source": "https://github.com/php-fig/http-client/tree/1.0.2"
}, },
"time": "2020-06-29T06:28:15+00:00" "time": "2023-04-10T20:12:12+00:00"
}, },
{ {
"name": "psr/http-factory", "name": "psr/http-factory",
"version": "1.0.1", "version": "1.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/http-factory.git", "url": "https://github.com/php-fig/http-factory.git",
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" "reference": "e616d01114759c4c489f93b099585439f795fe35"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "reference": "e616d01114759c4c489f93b099585439f795fe35",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.0.0", "php": ">=7.0.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -4025,7 +4008,7 @@
"authors": [ "authors": [
{ {
"name": "PHP-FIG", "name": "PHP-FIG",
"homepage": "http://www.php-fig.org/" "homepage": "https://www.php-fig.org/"
} }
], ],
"description": "Common interfaces for PSR-7 HTTP message factories", "description": "Common interfaces for PSR-7 HTTP message factories",
@ -4040,9 +4023,9 @@
"response" "response"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/http-factory/tree/master" "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
}, },
"time": "2019-04-30T12:38:16+00:00" "time": "2023-04-10T20:10:41+00:00"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
@ -4200,16 +4183,16 @@
}, },
{ {
"name": "psy/psysh", "name": "psy/psysh",
"version": "v0.11.14", "version": "v0.11.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/bobthecow/psysh.git", "url": "https://github.com/bobthecow/psysh.git",
"reference": "8c2e264def7a8263a68ef6f0b55ce90b77d41e17" "reference": "5350ce0ec8ecf2c5b5cf554cd2496f97b444af85"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/8c2e264def7a8263a68ef6f0b55ce90b77d41e17", "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5350ce0ec8ecf2c5b5cf554cd2496f97b444af85",
"reference": "8c2e264def7a8263a68ef6f0b55ce90b77d41e17", "reference": "5350ce0ec8ecf2c5b5cf554cd2496f97b444af85",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4270,9 +4253,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/bobthecow/psysh/issues", "issues": "https://github.com/bobthecow/psysh/issues",
"source": "https://github.com/bobthecow/psysh/tree/v0.11.14" "source": "https://github.com/bobthecow/psysh/tree/v0.11.15"
}, },
"time": "2023-03-28T03:41:01+00:00" "time": "2023-04-07T21:57:09+00:00"
}, },
{ {
"name": "ralouphie/getallheaders", "name": "ralouphie/getallheaders",
@ -4658,16 +4641,16 @@
}, },
{ {
"name": "sentry/sentry-laravel", "name": "sentry/sentry-laravel",
"version": "3.3.2", "version": "3.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git", "url": "https://github.com/getsentry/sentry-laravel.git",
"reference": "c502e8b9005990d03f5ec5cc852e98a27c26056d" "reference": "8a72bb67e208687fbb2ebc8ca1bd229c26f28dd1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/c502e8b9005990d03f5ec5cc852e98a27c26056d", "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/8a72bb67e208687fbb2ebc8ca1bd229c26f28dd1",
"reference": "c502e8b9005990d03f5ec5cc852e98a27c26056d", "reference": "8a72bb67e208687fbb2ebc8ca1bd229c26f28dd1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4735,7 +4718,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/getsentry/sentry-laravel/issues", "issues": "https://github.com/getsentry/sentry-laravel/issues",
"source": "https://github.com/getsentry/sentry-laravel/tree/3.3.2" "source": "https://github.com/getsentry/sentry-laravel/tree/3.3.3"
}, },
"funding": [ "funding": [
{ {
@ -4747,7 +4730,7 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2023-03-22T10:51:03+00:00" "time": "2023-04-18T09:01:41+00:00"
}, },
{ {
"name": "setasign/fpdi", "name": "setasign/fpdi",
@ -6817,32 +6800,32 @@
}, },
{ {
"name": "symfony/psr-http-message-bridge", "name": "symfony/psr-http-message-bridge",
"version": "v2.1.4", "version": "v2.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git", "url": "https://github.com/symfony/psr-http-message-bridge.git",
"reference": "a125b93ef378c492e274f217874906fb9babdebb" "reference": "28a732c05bbad801304ad5a5c674cf2970508993"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a125b93ef378c492e274f217874906fb9babdebb", "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993",
"reference": "a125b93ef378c492e274f217874906fb9babdebb", "reference": "28a732c05bbad801304ad5a5c674cf2970508993",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1", "php": ">=7.2.5",
"psr/http-message": "^1.0", "psr/http-message": "^1.0 || ^2.0",
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0" "symfony/http-foundation": "^5.4 || ^6.0"
}, },
"require-dev": { "require-dev": {
"nyholm/psr7": "^1.1", "nyholm/psr7": "^1.1",
"psr/log": "^1.1 || ^2 || ^3", "psr/log": "^1.1 || ^2 || ^3",
"symfony/browser-kit": "^4.4 || ^5.0 || ^6.0", "symfony/browser-kit": "^5.4 || ^6.0",
"symfony/config": "^4.4 || ^5.0 || ^6.0", "symfony/config": "^5.4 || ^6.0",
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", "symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", "symfony/http-kernel": "^5.4 || ^6.0",
"symfony/phpunit-bridge": "^5.4@dev || ^6.0" "symfony/phpunit-bridge": "^6.2"
}, },
"suggest": { "suggest": {
"nyholm/psr7": "For a super lightweight PSR-7/17 implementation" "nyholm/psr7": "For a super lightweight PSR-7/17 implementation"
@ -6850,7 +6833,7 @@
"type": "symfony-bridge", "type": "symfony-bridge",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "2.1-dev" "dev-main": "2.2-dev"
} }
}, },
"autoload": { "autoload": {
@ -6885,7 +6868,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/symfony/psr-http-message-bridge/issues", "issues": "https://github.com/symfony/psr-http-message-bridge/issues",
"source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.4" "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0"
}, },
"funding": [ "funding": [
{ {
@ -6901,7 +6884,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-11-28T22:46:34+00:00" "time": "2023-04-21T08:40:19+00:00"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
@ -7989,16 +7972,16 @@
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
"version": "2.15.1", "version": "2.15.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filp/whoops.git", "url": "https://github.com/filp/whoops.git",
"reference": "e864ac957acd66e1565f25efda61e37791a5db0b" "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/e864ac957acd66e1565f25efda61e37791a5db0b", "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
"reference": "e864ac957acd66e1565f25efda61e37791a5db0b", "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8048,7 +8031,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/filp/whoops/issues", "issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.15.1" "source": "https://github.com/filp/whoops/tree/2.15.2"
}, },
"funding": [ "funding": [
{ {
@ -8056,7 +8039,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-03-06T18:09:13+00:00" "time": "2023-04-12T12:00:00+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@ -8381,16 +8364,16 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.17.1", "version": "1.20.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "d3753fcb3abc6f78f5de6f72153d4b9c99c72dee" "reference": "10553ab3f0337ff1a71433c3417d7eb2a3eec1fd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/d3753fcb3abc6f78f5de6f72153d4b9c99c72dee", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/10553ab3f0337ff1a71433c3417d7eb2a3eec1fd",
"reference": "d3753fcb3abc6f78f5de6f72153d4b9c99c72dee", "reference": "10553ab3f0337ff1a71433c3417d7eb2a3eec1fd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8420,9 +8403,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.17.1" "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.0"
}, },
"time": "2023-04-04T11:11:22+00:00" "time": "2023-04-20T11:18:07+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -8744,16 +8727,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.6.6", "version": "9.6.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115" "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b65d59a059d3004a040c16a82e07bbdf6cfdd115", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",
"reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115", "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8827,7 +8810,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.6" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7"
}, },
"funding": [ "funding": [
{ {
@ -8843,7 +8826,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-27T11:43:46+00:00" "time": "2023-04-14T08:58:40+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

View file

@ -130,7 +130,7 @@
<div class="row mt-4"> <div class="row mt-4">
<div class="col"> <div class="col">
<div class="form-check"> <div class="form-check">
<input name="is_private" type="checkbox" class="form-check-input" id="setPrivate" autocomplete="off" value="{{MessageTypeEnum::private()}}"> <input name="is_private" type="checkbox" class="form-check-input" id="setPrivate" autocomplete="off" value="{{ MessageTypeEnum::private() }}">
<label class="form-check-label" for="setPrivate">{{ __('Rendre le message privé') }}</label> <label class="form-check-label" for="setPrivate">{{ __('Rendre le message privé') }}</label>
</div> </div>
</div> </div>