Merge branch 'master' of github.com:beyondcode/laravel-websockets

This commit is contained in:
freek 2018-11-27 16:10:00 +01:00
commit 085b80542c
23 changed files with 49 additions and 49 deletions

View File

@ -8,7 +8,7 @@ use BeyondCode\LaravelWebSockets\Events\ChannelVacated;
use BeyondCode\LaravelWebSockets\Events\ClientMessageSent; use BeyondCode\LaravelWebSockets\Events\ClientMessageSent;
use BeyondCode\LaravelWebSockets\Events\ConnectionEstablished; use BeyondCode\LaravelWebSockets\Events\ConnectionEstablished;
use BeyondCode\LaravelWebSockets\Events\SubscribedToChannel; use BeyondCode\LaravelWebSockets\Events\SubscribedToChannel;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\DashboardLogger; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\DashboardLogger;
use Illuminate\Events\Dispatcher; use Illuminate\Events\Dispatcher;
class EventSubscriber class EventSubscriber

View File

@ -4,11 +4,11 @@ namespace BeyondCode\LaravelWebSockets\Server;
use BeyondCode\LaravelWebSockets\LaravelEcho; use BeyondCode\LaravelWebSockets\LaravelEcho;
use BeyondCode\LaravelWebSockets\Server\Logger\MessageLogger; use BeyondCode\LaravelWebSockets\Server\Logger\MessageLogger;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\FetchChannel; use BeyondCode\LaravelWebSockets\WebSocket\Controllers\FetchChannel;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\FetchChannels; use BeyondCode\LaravelWebSockets\WebSocket\Controllers\FetchChannels;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\FetchUsers; use BeyondCode\LaravelWebSockets\WebSocket\Controllers\FetchUsers;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\TriggerEvent; use BeyondCode\LaravelWebSockets\WebSocket\Controllers\TriggerEvent;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\PusherController; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\PusherController;
use Ratchet\WebSocket\WsServer; use Ratchet\WebSocket\WsServer;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
use Ratchet\Http\HttpServerInterface; use Ratchet\Http\HttpServerInterface;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers; namespace BeyondCode\LaravelWebSockets\WebSocket\Controllers;
use BeyondCode\LaravelWebSockets\ClientProviders\Client; use BeyondCode\LaravelWebSockets\ClientProviders\Client;
use BeyondCode\LaravelWebSockets\Events\ExceptionThrown; use BeyondCode\LaravelWebSockets\Events\ExceptionThrown;
@ -15,11 +15,11 @@ use Ratchet\Http\HttpServerInterface;
use Psr\Http\Message\RequestInterface; use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
abstract class Controller implements HttpServerInterface abstract class Controller implements HttpServerInterface
{ {
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager */ /** @var \BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager */
protected $channelManager; protected $channelManager;
public function __construct(ChannelManager $channelManager) public function __construct(ChannelManager $channelManager)

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers; namespace BeyondCode\LaravelWebSockets\WebSocket\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;

View File

@ -1,10 +1,10 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers; namespace BeyondCode\LaravelWebSockets\WebSocket\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\PresenceChannel; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\PresenceChannel;
class FetchChannels extends Controller class FetchChannels extends Controller
{ {

View File

@ -1,11 +1,11 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers; namespace BeyondCode\LaravelWebSockets\WebSocket\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\PresenceChannel; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\PresenceChannel;
class FetchUsers extends Controller class FetchUsers extends Controller
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers; namespace BeyondCode\LaravelWebSockets\WebSocket\Controllers;
use BeyondCode\LaravelWebSockets\Events\ApiMessageSent; use BeyondCode\LaravelWebSockets\Events\ApiMessageSent;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View File

@ -1,9 +1,9 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Messages; namespace BeyondCode\LaravelWebSockets\WebSocket\Messages;
use BeyondCode\LaravelWebSockets\Events\ClientMessageSent; use BeyondCode\LaravelWebSockets\Events\ClientMessageSent;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;
@ -15,7 +15,7 @@ class Message implements RespondableMessage
/** @var \Ratchet\ConnectionInterface */ /** @var \Ratchet\ConnectionInterface */
protected $connection; protected $connection;
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager */ /** @var \BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager */
protected $channelManager; protected $channelManager;
public function __construct(stdClass $payload, ConnectionInterface $connection, ChannelManager $channelManager) public function __construct(stdClass $payload, ConnectionInterface $connection, ChannelManager $channelManager)

View File

@ -1,5 +1,5 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Messages; namespace BeyondCode\LaravelWebSockets\WebSocket\Messages;
interface RespondableMessage interface RespondableMessage
{ {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Messages; namespace BeyondCode\LaravelWebSockets\WebSocket\Messages;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\PusherMessage; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\PusherMessage;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use Ratchet\RFC6455\Messaging\MessageInterface; use Ratchet\RFC6455\Messaging\MessageInterface;

View File

@ -1,11 +1,11 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels;
use BeyondCode\LaravelWebSockets\Events\ChannelOccupied; use BeyondCode\LaravelWebSockets\Events\ChannelOccupied;
use BeyondCode\LaravelWebSockets\Events\ChannelVacated; use BeyondCode\LaravelWebSockets\Events\ChannelVacated;
use BeyondCode\LaravelWebSockets\Events\SubscribedToChannel; use BeyondCode\LaravelWebSockets\Events\SubscribedToChannel;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions\InvalidSignature; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions\InvalidSignature;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels;
use ReflectionClass; use ReflectionClass;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;

View File

@ -1,9 +1,9 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
use stdClass; use stdClass;
class DashboardLogger class DashboardLogger

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions;
class InvalidConnection extends PusherException class InvalidConnection extends PusherException
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions;
class InvalidSignature extends PusherException class InvalidSignature extends PusherException
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions;
use Exception; use Exception;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions;
class UnknownAppKey extends PusherException class UnknownAppKey extends PusherException
{ {

View File

@ -1,22 +1,22 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher;
use BeyondCode\LaravelWebSockets\Events\ConnectionEstablished; use BeyondCode\LaravelWebSockets\Events\ConnectionEstablished;
use BeyondCode\LaravelWebSockets\WebSocketServer\Messages\RespondableMessageFactory; use BeyondCode\LaravelWebSockets\WebSocket\Messages\RespondableMessageFactory;
use BeyondCode\LaravelWebSockets\QueryParameters; use BeyondCode\LaravelWebSockets\QueryParameters;
use Exception; use Exception;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use Ratchet\RFC6455\Messaging\MessageInterface; use Ratchet\RFC6455\Messaging\MessageInterface;
use BeyondCode\LaravelWebSockets\Server\WebSocketController; use BeyondCode\LaravelWebSockets\Server\WebSocketController;
use BeyondCode\LaravelWebSockets\ClientProviders\Client; use BeyondCode\LaravelWebSockets\ClientProviders\Client;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions\PusherException; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions\PusherException;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions\UnknownAppKey; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions\UnknownAppKey;
class PusherController extends WebSocketController class PusherController extends WebSocketController
{ {
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager */ /** @var \BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager */
protected $channelManager; protected $channelManager;
public function __construct(ChannelManager $channelManager) public function __construct(ChannelManager $channelManager)

View File

@ -1,21 +1,21 @@
<?php <?php
namespace BeyondCode\LaravelWebSockets\WebSocketServer\Pusher; namespace BeyondCode\LaravelWebSockets\WebSocket\Pusher;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
use BeyondCode\LaravelWebSockets\WebSocketServer\Messages\RespondableMessage; use BeyondCode\LaravelWebSockets\WebSocket\Messages\RespondableMessage;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;
class PusherMessage implements RespondableMessage class PusherMessage implements RespondableMessage
{ {
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\stdClass */ /** @var \BeyondCode\LaravelWebSockets\WebSocket\Pusher\stdClass */
protected $payload; protected $payload;
/** @var \React\Socket\ConnectionInterface */ /** @var \React\Socket\ConnectionInterface */
protected $connection; protected $connection;
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager */ /** @var \BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager */
protected $channelManager; protected $channelManager;
public function __construct(stdClass $payload, ConnectionInterface $connection, ChannelManager $channelManager) public function __construct(stdClass $payload, ConnectionInterface $connection, ChannelManager $channelManager)

View File

@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use BeyondCode\LaravelWebSockets\ClientProviders\ClientProvider; use BeyondCode\LaravelWebSockets\ClientProviders\ClientProvider;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Channels\ChannelManager;
class WebSocketsServiceProvider extends ServiceProvider class WebSocketsServiceProvider extends ServiceProvider
{ {

View File

@ -3,14 +3,14 @@
namespace BeyondCode\LaravelWebSockets\Tests; namespace BeyondCode\LaravelWebSockets\Tests;
use BeyondCode\LaravelWebSockets\ClientProviders\Client; use BeyondCode\LaravelWebSockets\ClientProviders\Client;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions\InvalidSignature; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions\InvalidSignature;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Exceptions\UnknownAppKey; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\Exceptions\UnknownAppKey;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\PusherController; use BeyondCode\LaravelWebSockets\WebSocket\Pusher\PusherController;
use BeyondCode\LaravelWebSockets\Tests\Mocks\Message; use BeyondCode\LaravelWebSockets\Tests\Mocks\Message;
class ConnectionTest extends TestCase class ConnectionTest extends TestCase
{ {
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\PusherController */ /** @var \BeyondCode\LaravelWebSockets\WebSocket\Pusher\PusherController */
protected $pusherServer; protected $pusherServer;
public function setUp() public function setUp()