Skip to content

Commit

Permalink
Adjustment for tests.
Browse files Browse the repository at this point in the history
Updated to latest Bag version.
  • Loading branch information
lotharthesavior committed Oct 10, 2024
1 parent a82c58c commit 0b74464
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 55 deletions.
106 changes: 53 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion jackit
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
#!/usr/bin/env php
<?php

require __DIR__.'/vendor/autoload.php';
$autoload = null;
$dir = __DIR__;

for ($i = 0; $i < 6; $i++) {
if (file_exists($dir . '/vendor/autoload.php')) {
$autoload = $dir . '/vendor/autoload.php';
break;
}
$dir = dirname($dir);
}

if ($autoload) {
require $autoload;
} else {
fwrite(STDERR, "Autoload file not found.\n");
exit(1);
}

use JackedPhp\JackedServer\Commands\RunCommand;
use JackedPhp\JackedServer\Services\Server;
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Traits/DataBagHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

trait DataBagHelper
{
public static function from(mixed $values): static
public static function from(mixed ...$values): static
{
/** @var static $data */
$data = parent::from($values);
Expand Down
4 changes: 4 additions & 0 deletions tests/Sample/config/jacked-server-http.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@

// @phpstan-ignore-next-line
// 'pid_file' => $_ENV['JACKED_SERVER_PID_FILE'] ?? ROOT_DIR . '/jacked-server.pid',

'http_compression' => ($_ENV['JACKED_SERVER_HTTP_COMPRESSION'] ?? 'true') === 'true',
'http_compression_level' => (int) ($_ENV['JACKED_SERVER_HTTP_COMPRESSION_LEVEL'] ?? 1),
'http_parse_cookie' => ($_ENV['JACKED_SERVER_HTTP_PARSE_COOKIE'] ?? 'true') === 'true',
],

// ------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions tests/Sample/config/jacked-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@

// @phpstan-ignore-next-line
// 'pid_file' => $_ENV['JACKED_SERVER_PID_FILE'] ?? ROOT_DIR . '/jacked-server.pid',

'http_compression' => ($_ENV['JACKED_SERVER_HTTP_COMPRESSION'] ?? 'true') === 'true',
'http_compression_level' => (int) ($_ENV['JACKED_SERVER_HTTP_COMPRESSION_LEVEL'] ?? 1),
'http_parse_cookie' => ($_ENV['JACKED_SERVER_HTTP_PARSE_COOKIE'] ?? 'true') === 'true',
],

// ------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions tests/Sample/ws-auth/jacked-server-with-ws-auth-2.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@

// @phpstan-ignore-next-line
// 'pid_file' => $_ENV['JACKED_SERVER_PID_FILE'] ?? ROOT_DIR . '/jacked-server.pid',

'http_compression' => ($_ENV['JACKED_SERVER_HTTP_COMPRESSION'] ?? 'true') === 'true',
'http_compression_level' => (int) ($_ENV['JACKED_SERVER_HTTP_COMPRESSION_LEVEL'] ?? 1),
'http_parse_cookie' => ($_ENV['JACKED_SERVER_HTTP_PARSE_COOKIE'] ?? 'true') === 'true',
],
'conveyor-options' => [
'websocket-auth-token' => $_ENV['JACKED_SERVER_WEBSOCKET_AUTH_TOKEN'] ?? null,
Expand Down
4 changes: 4 additions & 0 deletions tests/Sample/ws-auth/jacked-server-with-ws-auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@

// @phpstan-ignore-next-line
// 'pid_file' => $_ENV['JACKED_SERVER_PID_FILE'] ?? ROOT_DIR . '/jacked-server.pid',

'http_compression' => ($_ENV['JACKED_SERVER_HTTP_COMPRESSION'] ?? 'true') === 'true',
'http_compression_level' => (int) ($_ENV['JACKED_SERVER_HTTP_COMPRESSION_LEVEL'] ?? 1),
'http_parse_cookie' => ($_ENV['JACKED_SERVER_HTTP_PARSE_COOKIE'] ?? 'true') === 'true',
],
'conveyor-options' => [
'websocket-auth-token' => $_ENV['JACKED_SERVER_WEBSOCKET_AUTH_TOKEN'] ?? null,
Expand Down

0 comments on commit 0b74464

Please sign in to comment.