Skip to content

Commit

Permalink
WS exchange to devices bridge + bootstrap cleaning (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 4, 2022
1 parent 9552c31 commit 9d25efb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"ext-pcntl": "*",
"cweagans/composer-patches": "^1.7",
"evenement/evenement": "^3.0",
"fastybird/bootstrap-library": "dev-main",
"fastybird/datetime-factory": "^0.6",
"fastybird/devices-module": "dev-main",
"fastybird/metadata-library": "dev-main",
Expand All @@ -45,7 +46,7 @@
},
"require-dev": {
"brianium/paratest": "^6.6",
"contributte/translation": "^0.9",
"contributte/translation": "^2.0",
"dg/bypass-finals": "^1.4",
"infection/infection": "^0.26",
"orisai/coding-standard": "^3.2",
Expand Down
5 changes: 3 additions & 2 deletions src/DI/TuyaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use FastyBird\Connector\Tuya\Mappers;
use FastyBird\Connector\Tuya\Schemas;
use FastyBird\Connector\Tuya\Subscribers;
use FastyBird\Library\Bootstrap\Boot as BootstrapBoot;
use FastyBird\Module\Devices\DI as DevicesDI;
use Nette;
use Nette\DI;
Expand All @@ -46,12 +47,12 @@ class TuyaExtension extends DI\CompilerExtension
public const NAME = 'fbTuyaConnector';

public static function register(
Nette\Configurator $config,
Nette\Configurator|BootstrapBoot\Configurator $config,
string $extensionName = self::NAME,
): void
{
$config->onCompile[] = static function (
Nette\Configurator $config,
Nette\Configurator|BootstrapBoot\Configurator $config,
DI\Compiler $compiler,
) use ($extensionName): void {
$compiler->addExtension($extensionName, new TuyaExtension());
Expand Down
3 changes: 2 additions & 1 deletion tests/cases/unit/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace FastyBird\Connector\Tuya\Tests\Cases\Unit;

use FastyBird\Connector\Tuya\DI;
use FastyBird\Library\Bootstrap\Boot as BootstrapBoot;
use Nette;
use PHPUnit\Framework\TestCase;
use function constant;
Expand All @@ -28,7 +29,7 @@ protected function createContainer(string|null $additionalConfig = null): Nette\
$rootDir = __DIR__ . '/../..';
$vendorDir = defined('FB_VENDOR_DIR') ? constant('FB_VENDOR_DIR') : $rootDir . '/../vendor';

$config = new Nette\Configurator();
$config = new BootstrapBoot\Configurator();
$config->setTempDirectory(FB_TEMP_DIR);

$config->addParameters(['container' => ['class' => 'SystemContainer_' . md5((string) time())]]);
Expand Down
3 changes: 2 additions & 1 deletion tests/cases/unit/DbTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use FastyBird\Connector\Tuya\DI;
use FastyBird\Connector\Tuya\Exceptions;
use FastyBird\DateTimeFactory;
use FastyBird\Library\Bootstrap\Boot as BootstrapBoot;
use Nette;
use Nettrine\ORM as NettrineORM;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -114,7 +115,7 @@ private function createContainer(): Nette\DI\Container
$rootDir = __DIR__ . '/../..';
$vendorDir = defined('FB_VENDOR_DIR') ? constant('FB_VENDOR_DIR') : $rootDir . '/../vendor';

$config = new Nette\Configurator();
$config = new BootstrapBoot\Configurator();
$config->setTempDirectory(FB_TEMP_DIR);

$config->addParameters(['container' => ['class' => 'SystemContainer_' . md5((string) time())]]);
Expand Down

0 comments on commit 9d25efb

Please sign in to comment.