Skip to content

Commit

Permalink
Upgrading dependecnies
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Jul 2, 2024
1 parent 7642afd commit 2c0cbae
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 30 deletions.
48 changes: 24 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,38 @@
},

"require" : {
"php": ">=7.4.0|>=8.0.0",
"php": ">=8.1.0|>=8.2.0",
"ext-iconv": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"fig/http-message-util": "^1.1",
"nette/bootstrap": "^3.1",
"nette/di": "^3.0",
"nette/http": "^3.1",
"nette/utils": "^3.2||^4.0",
"psr/log": "^1.1|^3.0",
"react/socket": "^1.11"
"nette/bootstrap": "^3.2",
"nette/di": "^3.2",
"nette/http": "^3.2",
"nette/utils": "^4.0",
"psr/log": "^3.0",
"react/socket": "^1.15"
},

"require-dev" : {
"mockery/mockery": "^1.4",
"nette/mail": "^3.1",
"nette/robot-loader": "^3.4",
"nette/safe-stream": "^2.5",
"nette/security": "^3.1",
"nette/tester": "^2.4",
"ninjify/nunjuck": "^0.3",
"ninjify/qa": "^0.12",
"mockery/mockery": "^1.6",
"nette/mail": "^4.0",
"nette/robot-loader": "^4.0",
"nette/safe-stream": "^3.0",
"nette/security": "^3.2",
"nette/tester": "^2.5",
"ninjify/nunjuck": "^0.4.0",
"ninjify/qa": "^0.13",
"pds/skeleton": "^1.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-nette": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"symfony/console": "^5.0|^6.0",
"symfony/event-dispatcher": "^5.0|^6.0",
"tracy/tracy": "^2.9"
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-doctrine": "^1.4",
"phpstan/phpstan-nette": "^1.3",
"phpstan/phpstan-strict-rules": "^1.6",
"symfony/console": "^7.1",
"symfony/event-dispatcher": "^7.1",
"tracy/tracy": "^2.10"
},

"suggest": {
Expand Down
7 changes: 5 additions & 2 deletions src/Application/Controller/WebSocketsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Nette\DI;
use Nette\Utils;
use ReflectionException;
use ReflectionNamedType;

/**
* WebSockets micro controller
Expand Down Expand Up @@ -87,8 +88,10 @@ public function run(Application\Request $request): Responses\IResponse

if ($this->context) {
foreach ($reflection->getParameters() as $param) {
if ($param->getClass()) {
$params[$param->getName()] = $this->context->getByType($param->getClass()->getName(), false);
$type = $param->getType();

if ($type instanceof ReflectionNamedType && !$type->isBuiltin()) {
$params[$param->getName()] = $this->context->getByType($type->getName(), false);
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/Commands/ServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function configure(): void
/**
* {@inheritdoc}
*/
protected function execute(Input\InputInterface $input, Output\OutputInterface $output): void
protected function execute(Input\InputInterface $input, Output\OutputInterface $output): int
{
$io = new Style\SymfonyStyle($input, $output);

Expand All @@ -79,7 +79,11 @@ protected function execute(Input\InputInterface $input, Output\OutputInterface $

} catch (Exceptions\TerminateException $ex) {
$this->server->stop();

return self::FAILURE;
}

return self::SUCCESS;
}

}
6 changes: 3 additions & 3 deletions src/DI/WebSocketsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,16 @@ interface_exists('Symfony\Component\EventDispatcher\EventDispatcherInterface')
}

/**
* @param Nette\Configurator $config
* @param Nette\Bootstrap\Configurator $config
* @param string $extensionName
*
* @return void
*/
public static function register(
Nette\Configurator $config,
Nette\Bootstrap\Configurator $config,
string $extensionName = 'webSockets'
): void {
$config->onCompile[] = function (Nette\Configurator $config, DI\Compiler $compiler) use ($extensionName): void {
$config->onCompile[] = function (Nette\Bootstrap\Configurator $config, DI\Compiler $compiler) use ($extensionName): void {
$compiler->addExtension($extensionName, new WebSocketsExtension());
};
}
Expand Down

0 comments on commit 2c0cbae

Please sign in to comment.