Skip to content

Commit

Permalink
[core] Reorganizing project packages (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 25, 2024
1 parent 4cef7b6 commit ed0838d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"require": {
"php": ">=8.2.0",
"cweagans/composer-patches": "^1.7",
"fastybird/application-library": "dev-main",
"fastybird/application": "dev-main",
"fastybird/metadata-library": "dev-main",
"fig/http-message-util": "^1.1",
"ipub/slim-router": "^0.2",
"nette/bootstrap": "^3.1",
"nette/di": "^3.0",
"nette/bootstrap": "^3.2",
"nette/di": "^3.2",
"nette/utils": "^4.0",
"psr/event-dispatcher": "^1.0",
"psr/http-message": "^1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/HttpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace FastyBird\Plugin\WebServer\Commands;

use FastyBird\Library\Application\Helpers as ApplicationHelpers;
use FastyBird\Core\Tools\Helpers as ToolsHelpers;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Plugin\WebServer\Events;
use FastyBird\Plugin\WebServer\Exceptions;
Expand Down Expand Up @@ -124,7 +124,7 @@ protected function execute(
[
'source' => MetadataTypes\Sources\Plugin::WEB_SERVER->value,
'type' => 'server-command',
'exception' => ApplicationHelpers\Logger::buildException($ex),
'exception' => ToolsHelpers\Logger::buildException($ex),
'cmd' => $this->getName(),
],
);
Expand Down
2 changes: 1 addition & 1 deletion src/DI/WebServerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace FastyBird\Plugin\WebServer\DI;

use FastyBird\Library\Application\Boot as ApplicationBoot;
use FastyBird\Core\Application\Boot as ApplicationBoot;
use FastyBird\Plugin\WebServer\Application;
use FastyBird\Plugin\WebServer\Commands;
use FastyBird\Plugin\WebServer\Http;
Expand Down
4 changes: 2 additions & 2 deletions src/Server/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace FastyBird\Plugin\WebServer\Server;

use FastyBird\Library\Application\Helpers as ApplicationHelpers;
use FastyBird\Core\Tools\Helpers as ToolsHelpers;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Plugin\WebServer\Middleware;
use Psr\Log;
Expand Down Expand Up @@ -63,7 +63,7 @@ public function create(Socket\ServerInterface $server): void
[
'source' => MetadataTypes\Sources\Plugin::WEB_SERVER->value,
'type' => 'factory',
'exception' => ApplicationHelpers\Logger::buildException($ex),
'exception' => ToolsHelpers\Logger::buildException($ex),
],
);

Expand Down
12 changes: 6 additions & 6 deletions src/Subscribers/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
namespace FastyBird\Plugin\WebServer\Subscribers;

use Doctrine\DBAL;
use FastyBird\Library\Application\Exceptions as ApplicationExceptions;
use FastyBird\Library\Application\Helpers as ApplicationHelpers;
use FastyBird\Core\Tools\Exceptions as ToolsExceptions;
use FastyBird\Core\Tools\Helpers as ToolsHelpers;
use FastyBird\Plugin\WebServer\Events;
use FastyBird\Plugin\WebServer\Exceptions;
use Symfony\Component\EventDispatcher;
Expand All @@ -33,7 +33,7 @@
readonly class Server implements EventDispatcher\EventSubscriberInterface
{

public function __construct(private ApplicationHelpers\Database $database)
public function __construct(private ToolsHelpers\Database $database)
{
}

Expand All @@ -47,9 +47,9 @@ public static function getSubscribedEvents(): array
}

/**
* @throws ApplicationExceptions\InvalidState
* @throws DBAL\Exception
* @throws Exceptions\InvalidState
* @throws ToolsExceptions\InvalidState
*/
public function check(): void
{
Expand All @@ -66,8 +66,8 @@ public function check(): void
}

/**
* @throws ApplicationExceptions\InvalidState
* @throws DBAL\Exception
* @throws ToolsExceptions\InvalidState
*/
public function request(): void
{
Expand All @@ -78,7 +78,7 @@ public function request(): void
}

/**
* @throws ApplicationExceptions\InvalidState
* @throws ToolsExceptions\InvalidState
*/
public function response(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/cases/unit/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace FastyBird\Plugin\WebServer\Tests\Cases\Unit;

use Error;
use FastyBird\Library\Application\Boot as ApplicationBoot;
use FastyBird\Library\Application\Exceptions as ApplicationExceptions;
use FastyBird\Core\Application\Boot as ApplicationBoot;
use FastyBird\Core\Application\Exceptions as ApplicationExceptions;
use FastyBird\Plugin\WebServer;
use Nette;
use Nette\DI;
Expand Down
7 changes: 7 additions & 0 deletions tests/common.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@

php:
date.timezone: Europe/Prague

extensions:
fbTools : FastyBird\Core\Tools\DI\ToolsExtension

fbApplication:
documents:
mapping: []

0 comments on commit ed0838d

Please sign in to comment.