pixelfederation/swoole-bundle

View on GitHub
chore(release): v0.14.0 :tada: #132
swoole-bundle-bot authored a965f58d
complete00:00:24
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.yml.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
7
shellcheck
shellcheck engine documentation
8
phpcodesniffer
phpcodesniffer engine documentation
9
phpmd
phpmd engine documentation
10
sonar-php
sonar-php engine documentation
View output
INFO: Java 1.8.0_322 Amazon.com Inc. (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: Invalid character encountered in file '/code/docs/img/blackfire-io.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 214 files indexed
INFO: 184 source files to be analyzed
ERROR: Unable to parse file: /code/src/Coroutine/CoroutinePool.php
ERROR: Parse error at line 24 column 9:

14:  */
15: final class CoroutinePool
16: {
17:     private $coroutines;
18:     private $coroutinesCount;
19:     private $results;
20:     private $exceptions;
21:     private $started;
22: 
23:     public function __construct(
24:         private Channel $resultsChannel,
            ^
25:         callable ...$coroutines
26:     ) {
27:         $this->coroutines = $coroutines;
28:         $this->coroutinesCount = \count($coroutines);
29:         $this->results = [];
30:         $this->exceptions = [];
31:         $this->started = false;
32:     }
33: 
34:     public static function fromCoroutines(callable ...$coroutines): self

ERROR: Unable to parse file: /code/src/Server/LifecycleHandler/SigIntHandler.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Server\LifecycleHandler;
 6: 
 7: use Swoole\Process;
 8: use Swoole\Server;
 9: 
10: final class SigIntHandler implements ServerStartHandlerInterface
11: {
12:     private $signalInterrupt;
13: 
14:     public function __construct(private ?ServerStartHandlerInterface $decorated = null)
                                    ^
15:     {
16:         $this->signalInterrupt = \defined('SIGINT') ? (int) \constant('SIGINT') : 2;
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function handle(Server $server): void
23:     {
24:         // 2 => SIGINT

ERROR: Unable to parse file: /code/src/Server/WorkerHandler/HMRWorkerStartHandler.php
ERROR: Parse error at line 13 column 9:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\WorkerHandler;
 6: 
 7: use K911\Swoole\Server\Runtime\HMR\HotModuleReloaderInterface;
 8: use Swoole\Server;
 9: 
10: final class HMRWorkerStartHandler implements WorkerStartHandlerInterface
11: {
12:     public function __construct(
13:         private HotModuleReloaderInterface $hmr,
            ^
14:         private int $interval = 2000,
15:         private ?WorkerStartHandlerInterface $decorated = null
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function handle(Server $worker, int $workerId): void
23:     {

ERROR: Unable to parse file: /code/src/Server/RequestHandler/LimitedRequestHandler.php
ERROR: Parse error at line 18 column 13:

 8: use K911\Swoole\Server\HttpServer;
 9: use K911\Swoole\Server\Runtime\BootableInterface;
10: use Swoole\Http\Request;
11: use Swoole\Http\Response;
12: use Symfony\Component\Console\Style\SymfonyStyle;
13: 
14: final class LimitedRequestHandler implements RequestHandlerInterface, BootableInterface
15: {
16:     private $requestLimit;
17: 
18:     private ?SymfonyStyle $symfonyStyle = null;
                ^
19: 
20:     public function __construct(
21:         private RequestHandlerInterface $decorated,
22:         private HttpServer $server,
23:         private AtomicCounter $requestCounter
24:     ) {
25:         $this->requestLimit = -1;
26:     }
27: 
28:     /**

ERROR: Unable to parse file: /code/src/Server/RequestHandler/ExceptionHandler/JsonExceptionHandler.php
ERROR: Parse error at line 15 column 9:

 5: namespace K911\Swoole\Server\RequestHandler\ExceptionHandler;
 6: 
 7: use K911\Swoole\Client\Http;
 8: use K911\Swoole\Component\ExceptionArrayTransformer;
 9: use Swoole\Http\Request;
10: use Swoole\Http\Response;
11: 
12: final class JsonExceptionHandler implements ExceptionHandlerInterface
13: {
14:     public function __construct(
15:         private ExceptionArrayTransformer $exceptionArrayTransformer,
            ^
16:         private string $verbosity = 'default'
17:     ) {
18:     }
19: 
20:     public function handle(Request $request, \Throwable $exception, Response $response): void
21:     {
22:         $data = $this->exceptionArrayTransformer->transform($exception, $this->verbosity);
23: 
24:         $response->header(Http::HEADER_CONTENT_TYPE, Http::CONTENT_TYPE_APPLICATION_JSON);
25:         $response->status(500);

ERROR: Unable to parse file: /code/src/Server/RequestHandler/AdvancedStaticFilesServer.php
ERROR: Parse error at line 97 column 13:

 87:         'xls' => 'application/vnd.ms-excel',
 88:         'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
 89:         'xml' => 'application/xml',
 90:         'xul' => 'application/vnd.mozilla.xul+xml',
 91:         'zip' => 'application/zip',
 92:     ];
 93: 
 94:     /**
 95:      * @var array<string,string>
 96:      */
 97:     private array $cachedMimeTypes = [];
                 ^
 98: 
 99:     private string $publicDir;
100: 
101:     /**
102:      * @var array<string, string>
103:      */
104:     private array $fileExtensionMimeTypeMap;
105: 
106:     public function __construct(
107:         private RequestHandlerInterface $decorated,

ERROR: Unable to parse file: /code/src/Server/RequestHandler/ExceptionRequestHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Server\RequestHandler;
 6: 
 7: use K911\Swoole\Server\RequestHandler\ExceptionHandler\ExceptionHandlerInterface;
 8: use Swoole\Http\Request;
 9: use Swoole\Http\Response;
10: 
11: final class ExceptionRequestHandler implements RequestHandlerInterface
12: {
13:     public function __construct(
14:         private RequestHandlerInterface $decorated,
            ^
15:         private ExceptionHandlerInterface $exceptionHandler
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function handle(Request $request, Response $response): void
23:     {
24:         try {

ERROR: Unable to parse file: /code/src/Server/Runtime/CallableBootManager.php
ERROR: Parse error at line 17 column 33:

 7: use Assert\Assertion;
 8: 
 9: /**
10:  * Chain of services implementing BootableInterface.
11:  */
12: final class CallableBootManager implements BootableInterface
13: {
14:     /**
15:      * @param iterable<callable> $bootables
16:      */
17:     public function __construct(private iterable $bootables, private bool $booted = false)
                                    ^
18:     {
19:     }
20: 
21:     /**
22:      * {@inheritdoc}
23:      *
24:      * Method MUST be called directly before Swoole server start.
25:      *
26:      * @throws \Assert\AssertionFailedException When already booted
27:      */

ERROR: Unable to parse file: /code/src/Server/Runtime/CallableBootManagerFactory.php
ERROR: Parse error at line 29 column 45:

19:             return $result;
20:         };
21: 
22:         return new CallableBootManager(
23:             (new GeneratedCollection($bootableCollection, ...$bootables))
24:                 ->filter(function ($bootable) use ($isAlreadyRegistered): bool {
25:                     Assertion::isInstanceOf($bootable, BootableInterface::class);
26: 
27:                     return $isAlreadyRegistered(spl_object_id($bootable));
28:                 })
29:                 ->map(fn (BootableInterface $bootable): callable => [$bootable, 'boot'])
                                                ^
30:         );
31:     }
32: }
33: 

ERROR: Unable to parse file: /code/src/Server/Api/ApiServerClient.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Api;
 6: 
 7: use K911\Swoole\Client\Http;
 8: use K911\Swoole\Client\HttpClient;
 9: 
10: final class ApiServerClient implements ApiServerInterface
11: {
12:     public function __construct(private HttpClient $client)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * Get Swoole HTTP Server status.
18:      */
19:     public function status(): array
20:     {
21:         return $this->client->send('/api/server')['response']['body'];
22:     }

ERROR: Unable to parse file: /code/src/Server/Api/WithApiServerConfiguration.php
ERROR: Parse error at line 18 column 9:

 8: use K911\Swoole\Server\Configurator\ConfiguratorInterface;
 9: use K911\Swoole\Server\RequestHandler\RequestHandlerInterface;
10: use Swoole\Http\Server;
11: 
12: /**
13:  * @internal This class will be dropped, once named server listeners will be implemented
14:  */
15: final class WithApiServerConfiguration implements ConfiguratorInterface
16: {
17:     public function __construct(
18:         private Sockets $sockets,
            ^
19:         private RequestHandlerInterface $requestHandler
20:     ) {
21:     }
22: 
23:     public function configure(Server $server): void
24:     {
25:         if (!$this->sockets->hasApiSocket()) {
26:             return;
27:         }
28: 

ERROR: Unable to parse file: /code/src/Server/Api/ApiServer.php
ERROR: Parse error at line 18 column 9:

 8: use K911\Swoole\Server\HttpServerConfiguration;
 9: use Swoole\Server\Port;
10: 
11: /**
12:  * API Server for Swoole HTTP Server. If enabled, is running on another port, than regular server.
13:  * Used to control original Swoole HTTP Server.
14:  */
15: final class ApiServer implements ApiServerInterface
16: {
17:     public function __construct(
18:         private HttpServer $server,
            ^
19:         private HttpServerConfiguration $serverConfiguration
20:     ) {
21:     }
22: 
23:     /**
24:      * {@inheritdoc}
25:      */
26:     public function metrics(): array
27:     {
28:         $metrics = $this->server->metrics();

ERROR: Unable to parse file: /code/src/Server/Api/ApiServerClientFactory.php
ERROR: Parse error at line 13 column 33:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Api;
 6: 
 7: use Assert\Assertion;
 8: use K911\Swoole\Client\HttpClient;
 9: use K911\Swoole\Server\Config\Sockets;
10: 
11: final class ApiServerClientFactory
12: {
13:     public function __construct(private Sockets $sockets)
                                    ^
14:     {
15:     }
16: 
17:     public function newClient(array $options = []): ApiServerClient
18:     {
19:         Assertion::true($this->sockets->hasApiSocket(), 'Swoole HTTP Server is not configured properly. To access API trough HTTP interface, you must enable and provide proper address of configured API Server.');
20: 
21:         return new ApiServerClient(HttpClient::fromSocket(
22:             $this->sockets->getApiSocket(),
23:             $options

ERROR: Unable to parse file: /code/src/Server/Api/ApiServerRequestHandler.php
ERROR: Parse error at line 27 column 83:

17:         Http::METHOD_POST,
18:         Http::METHOD_PATCH,
19:         Http::METHOD_DELETE,
20:     ];
21:     private $routes;
22: 
23:     public function __construct(ApiServerInterface $apiServer)
24:     {
25:         $this->routes = [
26:             '/healthz' => [
27:                 Http::METHOD_GET => $this->composeSimpleRouteDefinition(200, fn (): array => ['ok' => true]),
                                                                                      ^
28:             ],
29:             '/api' => [
30:                 Http::METHOD_GET => $this->composeSimpleRouteDefinition(200, [$this, 'getRouteMap']),
31:             ],
32:             '/api/server' => [
33:                 Http::METHOD_GET => $this->composeSimpleRouteDefinition(200, [$apiServer, 'status']),
34:                 Http::METHOD_PATCH => $this->composeSimpleRouteDefinition(204, [$apiServer, 'reload']),
35:                 Http::METHOD_DELETE => $this->composeSimpleRouteDefinition(204, [$apiServer, 'shutdown']),
36:             ],
37:             '/api/server/metrics' => [

ERROR: Unable to parse file: /code/src/Server/Config/Sockets.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Server\Config;
 6: 
 7: use Assert\Assertion;
 8: 
 9: final class Sockets
10: {
11:     private $additionalSockets;
12: 
13:     public function __construct(
14:         private Socket $serverSocket,
            ^
15:         private ?Socket $apiSocket = null,
16:         Socket ...$additionalSockets
17:     ) {
18:         $this->additionalSockets = $additionalSockets;
19:     }
20: 
21:     public function changeServerSocket(Socket $socket): void
22:     {
23:         $this->serverSocket = $socket;
24:     }

ERROR: Unable to parse file: /code/src/Server/Config/Socket.php
ERROR: Parse error at line 42 column 9:

32:      * @var bool
33:      */
34:     private $ssl;
35: 
36:     /**
37:      * @throws \Assert\AssertionFailedException
38:      */
39:     public function __construct(
40:         string $host = '0.0.0.0',
41:         int $port = 9501,
42:         private string $type = 'tcp',
            ^
43:         bool $ssl = false
44:     ) {
45:         $this->setHost($host);
46:         $this->setPort($port);
47: 
48:         if ($ssl) {
49:             Assertion::defined('SWOOLE_SSL', self::CONSTANT_SWOOLE_SSL_IS_NOT_DEFINED_ERROR_MESSAGE);
50:         }
51:         $this->ssl = $ssl;
52:     }

ERROR: Unable to parse file: /code/src/Server/HttpServerConfiguration.php
ERROR: Parse error at line 82 column 13:

72:         'trace' => \SWOOLE_LOG_TRACE,
73:         'info' => \SWOOLE_LOG_INFO,
74:         'notice' => \SWOOLE_LOG_NOTICE,
75:         'warning' => \SWOOLE_LOG_WARNING,
76:         'error' => \SWOOLE_LOG_ERROR,
77:     ];
78: 
79:     /**
80:      * @var array<string, mixed>
81:      */
82:     private array $settings;
                ^
83: 
84:     /**
85:      * @param array $settings settings available:
86:      *                        - reactor_count (default: number of cpu cores)
87:      *                        - worker_count (default: 2 * number of cpu cores)
88:      *                        - task_worker_count (default: unset; "auto" => number of cpu cores; number of task workers)
89:      *                        - serve_static_files (default: false)
90:      *                        - public_dir (default: '%kernel.root_dir%/public')
91:      *                        - buffer_output_size (default: '2097152' unit in byte (2MB))
92:      *                        - package_max_length (default: '8388608b' unit in byte (8MB))

ERROR: Unable to parse file: /code/src/Server/Session/SwooleTableStorage.php
ERROR: Parse error at line 39 column 9:

29: 
30:         $this->sharedMemory = $sharedMemory;
31:         $this->maxSessionDataBytes = $maxSessionDataBytes;
32:     }
33: 
34:     public static function fromDefaults(int $maxActiveSessions = 1024, int $maxSessionDataBytes = 1024, float $tableConflictProportion = 0.2): self
35:     {
36:         return new self(
37:             new Table($maxActiveSessions, $tableConflictProportion),
38:             $maxSessionDataBytes,
39:         );
            ^
40:     }
41: 
42:     /**
43:      * {@inheritdoc}
44:      *
45:      * @throws \Assert\AssertionFailedException
46:      */
47:     public function set(string $key, mixed $data, int $ttl): void
48:     {
49:         Assertion::greaterThan($ttl, 0, 'Provided TTL "%d" is not a positive number.');

ERROR: Unable to parse file: /code/src/Server/Middleware/MiddlewareInjector.php
ERROR: Parse error at line 43 column 38:

33:                 return $port;
34:             }
35:         }
36: 
37:         throw new \UnexpectedValueException('Primary server port was not found.');
38:     }
39: 
40:     /**
41:      * Retrieve a callback subscribed to a given event.
42:      */
43:     private function getCallback(Port|Server $observer, string $eventName): ?callable
                                         ^
44:     {
45:         try {
46:             $propertyName = 'on'.ucfirst($eventName);
47:             $property = new \ReflectionProperty($observer, $propertyName);
48:             $property->setAccessible(true);
49: 
50:             return $property->getValue($observer);
51:         } catch (\ReflectionException) {
52:             return null;
53:         }

ERROR: Unable to parse file: /code/src/Server/Configurator/WithTaskHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\HttpServerConfiguration;
 8: use K911\Swoole\Server\TaskHandler\TaskHandlerInterface;
 9: use Swoole\Http\Server;
10: 
11: final class WithTaskHandler implements ConfiguratorInterface
12: {
13:     public function __construct(
14:         private TaskHandlerInterface $handler,
            ^
15:         private HttpServerConfiguration $configuration
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function configure(Server $server): void
23:     {
24:         if ($this->configuration->getTaskWorkerCount() > 0) {

ERROR: Unable to parse file: /code/src/Server/Configurator/WithHttpServerConfiguration.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\HttpServerConfiguration;
 8: use Swoole\Http\Server;
 9: 
10: final class WithHttpServerConfiguration implements ConfiguratorInterface
11: {
12:     public function __construct(private HttpServerConfiguration $configuration)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $server->set($this->configuration->getSwooleSettings());
22: 

ERROR: Unable to parse file: /code/src/Server/Configurator/WithServerManagerStopHandler.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\LifecycleHandler\ServerManagerStopHandlerInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithServerManagerStopHandler implements ConfiguratorInterface
11: {
12:     public function __construct(private ServerManagerStopHandlerInterface $handler)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $server->on('ManagerStop', [$this->handler, 'handle']);
22:     }

ERROR: Unable to parse file: /code/src/Server/Configurator/WithTaskFinishedHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\HttpServerConfiguration;
 8: use K911\Swoole\Server\TaskHandler\TaskFinishedHandlerInterface;
 9: use Swoole\Http\Server;
10: 
11: final class WithTaskFinishedHandler implements ConfiguratorInterface
12: {
13:     public function __construct(
14:         private TaskFinishedHandlerInterface $handler,
            ^
15:         private HttpServerConfiguration $configuration
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function configure(Server $server): void
23:     {
24:         if ($this->configuration->getTaskWorkerCount() > 0) {

ERROR: Unable to parse file: /code/src/Server/Configurator/WithServerShutdownHandler.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\LifecycleHandler\ServerShutdownHandlerInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithServerShutdownHandler implements ConfiguratorInterface
11: {
12:     public function __construct(private ServerShutdownHandlerInterface $handler)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $server->on('shutdown', [$this->handler, 'handle']);
22:     }

ERROR: Unable to parse file: /code/src/Server/Configurator/WithServerManagerStartHandler.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\LifecycleHandler\ServerManagerStartHandlerInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithServerManagerStartHandler implements ConfiguratorInterface
11: {
12:     public function __construct(private ServerManagerStartHandlerInterface $handler)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $server->on('ManagerStart', [$this->handler, 'handle']);
22:     }

ERROR: Unable to parse file: /code/src/Server/Configurator/WithServerStartHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\HttpServerConfiguration;
 8: use K911\Swoole\Server\LifecycleHandler\ServerStartHandlerInterface;
 9: use Swoole\Http\Server;
10: 
11: final class WithServerStartHandler implements ConfiguratorInterface
12: {
13:     public function __construct(
14:         private ServerStartHandlerInterface $handler,
            ^
15:         private HttpServerConfiguration $configuration
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function configure(Server $server): void
23:     {
24:         // see: https://github.com/swoole/swoole-src/blob/077c2dfe84d9f2c6d47a4e105f41423421dd4c43/src/server/reactor_process.cc#L181

ERROR: Unable to parse file: /code/src/Server/Configurator/WithWorkerStartHandler.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\WorkerHandler\WorkerStartHandlerInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithWorkerStartHandler implements ConfiguratorInterface
11: {
12:     public function __construct(private WorkerStartHandlerInterface $handler)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $server->on('WorkerStart', [$this->handler, 'handle']);
22:     }

ERROR: Unable to parse file: /code/src/Server/Configurator/WithRequestHandler.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use K911\Swoole\Server\RequestHandler\RequestHandlerInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithRequestHandler implements ConfiguratorInterface
11: {
12:     public function __construct(private RequestHandlerInterface $requestHandler)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $server->on('request', [$this->requestHandler, 'handle']);
22:     }

ERROR: Unable to parse file: /code/src/Server/Configurator/CallableChainConfigurator.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Server\Configurator;
 6: 
 7: use Swoole\Http\Server;
 8: 
 9: final class CallableChainConfigurator implements ConfiguratorInterface
10: {
11:     /**
12:      * @param iterable<callable> $configurators
13:      */
14:     public function __construct(private iterable $configurators)
                                    ^
15:     {
16:     }
17: 
18:     /**
19:      * {@inheritdoc}
20:      */
21:     public function configure(Server $server): void
22:     {
23:         /** @var callable $configurator */
24:         foreach ($this->configurators as $configurator) {

ERROR: Unable to parse file: /code/src/Server/HttpServer.php
ERROR: Parse error at line 33 column 9:

23: 
24:     /**
25:      * @var Listener[]
26:      */
27:     private $listeners = [];
28:     private $signalTerminate;
29:     private $signalReload;
30:     private $signalKill;
31: 
32:     public function __construct(
33:         private HttpServerConfiguration $configuration,
            ^
34:         private bool $running = false
35:     ) {
36:         $this->signalTerminate = \defined('SIGTERM') ? (int) \constant('SIGTERM') : 15;
37:         $this->signalReload = \defined('SIGUSR1') ? (int) \constant('SIGUSR1') : 10;
38:         $this->signalKill = \defined('SIGKILL') ? (int) \constant('SIGKILL') : 9;
39:     }
40: 
41:     /**
42:      * Attach already configured Swoole HTTP Server instance.
43:      */

ERROR: Unable to parse file: /code/src/Component/AtomicCounter.php
ERROR: Parse error at line 11 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Component;
 6: 
 7: use Swoole\Atomic;
 8: 
 9: final class AtomicCounter
10: {
11:     public function __construct(private Atomic $counter)
                                    ^
12:     {
13:     }
14: 
15:     public function increment(): void
16:     {
17:         $this->counter->add(1);
18:     }
19: 
20:     public function get(): int
21:     {

ERROR: Unable to parse file: /code/src/Component/ExceptionArrayTransformer.php
ERROR: Parse error at line 11 column 35:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Component;
 6: 
 7: final class ExceptionArrayTransformer
 8: {
 9:     public function transform(\Throwable $exception, string $verbosity = 'default'): array
10:     {
11:         return match ($verbosity) {
                                      ^
12:             'trace' => $this->transformWithFn($exception, [$this, 'transformFnVerboseWithTrace']),
13:             'verbose' => $this->transformWithFn($exception, [$this, 'transformFnVerbose']),
14:             default => $this->transformWithFn($exception, [$this, 'transformFnDefault']),
15:         };
16:     }
17: 
18:     private function transformWithFn(\Throwable $exception, callable $transformer): array
19:     {
20:         $data = $transformer($exception);
21: 

ERROR: Unable to parse file: /code/src/Component/GeneratedCollection.php
ERROR: Parse error at line 22 column 33:

12:  * @implements IteratorAggregate<T>
13:  */
14: final class GeneratedCollection implements \IteratorAggregate
15: {
16:     private $items;
17: 
18:     /**
19:      * @param iterable<T> $itemCollection
20:      * @param T           ...$items
21:      */
22:     public function __construct(private iterable $itemCollection, ...$items)
                                    ^
23:     {
24:         $this->items = $items;
25:     }
26: 
27:     /**
28:      * @throws \Exception
29:      *
30:      * @return \Generator<T>
31:      */
32:     public function each(callable $func): \Generator

ERROR: Unable to parse file: /code/src/Component/Locking/Channel/ChannelMutex.php
ERROR: Parse error at line 12 column 13:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Component\Locking\Channel;
 6: 
 7: use K911\Swoole\Component\Locking\Mutex;
 8: use Swoole\Coroutine\Channel;
 9: 
10: final class ChannelMutex implements Mutex
11: {
12:     private bool $isAcquired = false;
                ^
13: 
14:     /**
15:      * @var array<Channel>
16:      */
17:     private array $channels = [];
18: 
19:     /**
20:      * @var array<Channel>
21:      */
22:     private static array $spareChannels = [];

ERROR: Unable to parse file: /code/src/Component/Locking/RecursiveOwner/RecursiveOwnerMutexFactory.php
ERROR: Parse error at line 11 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Component\Locking\RecursiveOwner;
 6: 
 7: use K911\Swoole\Component\Locking\MutexFactory;
 8: 
 9: class RecursiveOwnerMutexFactory implements MutexFactory
10: {
11:     public function __construct(private MutexFactory $wrapped)
                                    ^
12:     {
13:     }
14: 
15:     public function newMutex(): RecursiveOwnerMutex
16:     {
17:         return new RecursiveOwnerMutex($this->wrapped->newMutex());
18:     }
19: }
20: 

ERROR: Unable to parse file: /code/src/Component/Locking/RecursiveOwner/RecursiveOwnerMutex.php
ERROR: Parse error at line 13 column 13:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Component\Locking\RecursiveOwner;
 6: 
 7: use K911\Swoole\Component\Locking\Mutex;
 8: 
 9: final class RecursiveOwnerMutex implements Mutex
10: {
11:     private const NO_OWNER = -2;
12: 
13:     private int $ownerId = self::NO_OWNER;
                ^
14: 
15:     private int $currentOwnerUsageCount = 0;
16: 
17:     public function __construct(private ?Mutex $wrapped)
18:     {
19:     }
20: 
21:     public function acquire(): void
22:     {
23:         $possibleOwnerId = \Co::getCid();

ERROR: Unable to parse file: /code/src/Component/Locking/FirstTimeOnly/FirstTimeOnlyMutexFactory.php
ERROR: Parse error at line 11 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Component\Locking\FirstTimeOnly;
 6: 
 7: use K911\Swoole\Component\Locking\MutexFactory;
 8: 
 9: final class FirstTimeOnlyMutexFactory implements MutexFactory
10: {
11:     public function __construct(private MutexFactory $wrapped)
                                    ^
12:     {
13:     }
14: 
15:     public function newMutex(): FirstTimeOnlyMutex
16:     {
17:         return new FirstTimeOnlyMutex($this->wrapped->newMutex());
18:     }
19: }
20: 

ERROR: Unable to parse file: /code/src/Component/Locking/FirstTimeOnly/FirstTimeOnlyMutex.php
ERROR: Parse error at line 17 column 13:

 7: use K911\Swoole\Component\Locking\Mutex;
 8: 
 9: final class FirstTimeOnlyMutex implements Mutex
10: {
11:     private const NEW = 0;
12: 
13:     private const LOCKED = 1;
14: 
15:     private const RELEASED = 2;
16: 
17:     private int $lockState = self::NEW;
                ^
18: 
19:     private int $waitingCount = 0;
20: 
21:     public function __construct(private ?Mutex $wrapped)
22:     {
23:     }
24: 
25:     public function acquire(): void
26:     {
27:         if (self::RELEASED === $this->lockState) {

ERROR: Unable to parse file: /code/src/Common/XdebugHandler/XdebugHandler.php
ERROR: Parse error at line 23 column 33:

13:  */
14: final class XdebugHandler
15: {
16:     private const SIGNALS_MAP = [
17:         2 => 'SIGINT',
18:         15 => 'SIGTERM',
19:         10 => 'SIGUSR1',
20:         12 => 'SIGUSR2',
21:     ];
22: 
23:     public function __construct(private string $allowXdebugEnvName = 'SWOOLE_ALLOW_XDEBUG')
                                    ^
24:     {
25:     }
26: 
27:     public function shouldRestart(): bool
28:     {
29:         return !$this->isAllowed() && \extension_loaded('xdebug');
30:     }
31: 
32:     public function canBeRestarted(): bool
33:     {

ERROR: Unable to parse file: /code/src/Bridge/Monolog/MonologProcessor.php
ERROR: Parse error at line 18 column 23:

 8: use K911\Swoole\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServices\Proxifier;
 9: use Symfony\Component\DependencyInjection\Alias;
10: use Symfony\Component\DependencyInjection\ContainerBuilder;
11: 
12: final class MonologProcessor implements CompileProcessor
13: {
14:     public function process(ContainerBuilder $container, Proxifier $proxifier): void
15:     {
16:         $loggerAliases = array_filter(
17:             $container->getAliases(),
18:             fn (Alias $alias): bool => str_starts_with((string) $alias, 'monolog.logger')
                          ^
19:         );
20:         $loggerSvcIds = array_map(fn (Alias $alias): string => (string) $alias, $loggerAliases);
21:         $loggerSvcIds = array_unique($loggerSvcIds);
22: 
23:         foreach ($loggerSvcIds as $loggerSvcId) {
24:             $proxifier->proxifyService($loggerSvcId);
25:         }
26:     }
27: }
28: 

ERROR: Unable to parse file: /code/src/Bridge/Tideways/Apm/RequestProfiler.php
ERROR: Parse error at line 13 column 13:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Tideways\Apm;
 6: 
 7: use Swoole\Http\Request;
 8: use Swoole\Http\Response;
 9: use Tideways\Profiler;
10: 
11: final class RequestProfiler
12: {
13:     private string $serviceName;
                ^
14: 
15:     public function __construct(
16:         private RequestDataProvider $dataProvider,
17:         string $serviceName = 'web'
18:     ) {
19:         $serviceName = trim($serviceName);
20:         $this->serviceName = '' !== $serviceName ? $serviceName : 'web';
21:     }
22: 
23:     public function profile(\Closure $fn, Request $request, Response $response): void

ERROR: Unable to parse file: /code/src/Bridge/Tideways/Apm/ProfilingMiddleware.php
ERROR: Parse error at line 14 column 13:

 4: 
 5: namespace K911\Swoole\Bridge\Tideways\Apm;
 6: 
 7: use K911\Swoole\Server\Middleware\Middleware;
 8: use Swoole\Http\Request;
 9: use Swoole\Http\Response;
10: use Tideways\Profiler;
11: 
12: final class ProfilingMiddleware implements Middleware
13: {
14:     private \Closure $nextMiddleware;
                ^
15: 
16:     public function __construct(
17:         callable $nextMiddleware,
18:         private RequestProfiler $profiler
19:     ) {
20:         $this->nextMiddleware = \Closure::fromCallable($nextMiddleware);
21:     }
22: 
23:     public function __invoke(Request $request, Response $response): void
24:     {

ERROR: Unable to parse file: /code/src/Bridge/Tideways/Apm/TidewaysMiddlewareFactory.php
ERROR: Parse error at line 11 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Tideways\Apm;
 6: 
 7: use K911\Swoole\Server\Middleware\MiddlewareFactory;
 8: 
 9: final class TidewaysMiddlewareFactory implements MiddlewareFactory
10: {
11:     public function __construct(private RequestProfiler $profiler)
                                    ^
12:     {
13:     }
14: 
15:     public function createMiddleware(callable $nextMiddleware): callable
16:     {
17:         return new ProfilingMiddleware($nextMiddleware, $this->profiler);
18:     }
19: }
20: 

ERROR: Unable to parse file: /code/src/Bridge/Tideways/Apm/Apm.php
ERROR: Parse error at line 13 column 9:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Tideways\Apm;
 6: 
 7: use K911\Swoole\Server\Middleware\MiddlewareInjector;
 8: use Swoole\Http\Server;
 9: 
10: final class Apm
11: {
12:     public function __construct(
13:         private MiddlewareInjector $injector,
            ^
14:         private TidewaysMiddlewareFactory $middlewareFactory
15:     ) {
16:     }
17: 
18:     /**
19:      * Install monitoring instrumentation.
20:      */
21:     public function instrument(Server $server): void
22:     {
23:         $this->injector->injectMiddlevare($server, $this->middlewareFactory);

ERROR: Unable to parse file: /code/src/Bridge/Tideways/Apm/WithApm.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Tideways\Apm;
 6: 
 7: use K911\Swoole\Server\Configurator\ConfiguratorInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithApm implements ConfiguratorInterface
11: {
12:     public function __construct(private Apm $apm)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $this->apm->instrument($server);
22:     }

ERROR: Unable to parse file: /code/src/Bridge/Tideways/Apm/RequestDataProvider.php
ERROR: Parse error at line 13 column 33:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Tideways\Apm;
 6: 
 7: use K911\Swoole\Bridge\Symfony\HttpFoundation\RequestFactoryInterface;
 8: use Swoole\Http\Request as SwooleRequest;
 9: use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
10: 
11: final class RequestDataProvider
12: {
13:     public function __construct(private RequestFactoryInterface $requestFactory)
                                    ^
14:     {
15:     }
16: 
17:     public function getSymfonyRequest(SwooleRequest $request): SymfonyRequest
18:     {
19:         return $this->requestFactory->make($request);
20:     }
21: 
22:     public function getDeveloperSession(SymfonyRequest $request): ?string
23:     {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/CloudFrontRequestFactory.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpFoundation;
 6: 
 7: use Swoole\Http\Request as SwooleRequest;
 8: use Symfony\Component\HttpFoundation\Request as HttpFoundationRequest;
 9: 
10: final class CloudFrontRequestFactory implements RequestFactoryInterface
11: {
12:     public function __construct(private RequestFactoryInterface $decorated)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      *
19:      * @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-protocol
20:      */
21:     public function make(SwooleRequest $request): HttpFoundationRequest
22:     {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/ResponseProcessorInjector.php
ERROR: Parse error at line 13 column 33:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpFoundation;
 6: 
 7: use Swoole\Http\Response as SwooleResponse;
 8: use Symfony\Component\HttpFoundation\Request as HttpFoundationRequest;
 9: use Symfony\Component\HttpFoundation\Response as HttpFoundationResponse;
10: 
11: final class ResponseProcessorInjector implements ResponseProcessorInjectorInterface
12: {
13:     public function __construct(private ResponseProcessorInterface $responseProcessor)
                                    ^
14:     {
15:     }
16: 
17:     public function injectProcessor(
18:         HttpFoundationRequest $request,
19:         SwooleResponse $swooleResponse
20:     ): void {
21:         $request->attributes->set(
22:             self::ATTR_KEY_RESPONSE_PROCESSOR,
23:             function (HttpFoundationResponse $httpFoundationResponse) use ($swooleResponse): void {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/TrustAllProxiesRequestHandler.php
ERROR: Parse error at line 18 column 9:

 8: use K911\Swoole\Server\Runtime\BootableInterface;
 9: use Swoole\Http\Request as SwooleRequest;
10: use Swoole\Http\Response as SwooleResponse;
11: use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
12: 
13: final class TrustAllProxiesRequestHandler implements RequestHandlerInterface, BootableInterface
14: {
15:     public const HEADER_X_FORWARDED_ALL = SymfonyRequest::HEADER_X_FORWARDED_FOR | SymfonyRequest::HEADER_X_FORWARDED_HOST | SymfonyRequest::HEADER_X_FORWARDED_PORT | SymfonyRequest::HEADER_X_FORWARDED_PROTO;
16: 
17:     public function __construct(
18:         private RequestHandlerInterface $decorated,
            ^
19:         private bool $trustAllProxies = false
20:     ) {
21:     }
22: 
23:     /**
24:      * {@inheritdoc}
25:      */
26:     public function boot(array $runtimeConfiguration = []): void
27:     {
28:         if (isset($runtimeConfiguration['trustAllProxies']) && true === $runtimeConfiguration['trustAllProxies']) {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/StreamedResponseListener.php
ERROR: Parse error at line 15 column 33:

 5: namespace K911\Swoole\Bridge\Symfony\HttpFoundation;
 6: 
 7: use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 8: use Symfony\Component\HttpFoundation\StreamedResponse;
 9: use Symfony\Component\HttpKernel\Event\ResponseEvent;
10: use Symfony\Component\HttpKernel\EventListener\StreamedResponseListener as HttpFoundationStreamedResponseListener;
11: use Symfony\Component\HttpKernel\KernelEvents;
12: 
13: class StreamedResponseListener implements EventSubscriberInterface
14: {
15:     public function __construct(private ?HttpFoundationStreamedResponseListener $delegate = null)
                                    ^
16:     {
17:     }
18: 
19:     public function onKernelResponse(ResponseEvent $event): void
20:     {
21:         if (!$event->isMainRequest()) {
22:             return;
23:         }
24: 
25:         $response = $event->getResponse();

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/RequestFactory.php
ERROR: Parse error at line 25 column 34:

15:     public function make(SwooleRequest $request): HttpFoundationRequest
16:     {
17:         $server = array_change_key_case($request->server, \CASE_UPPER);
18: 
19:         // Add formatted headers to server
20:         foreach ($request->header as $key => $value) {
21:             $server['HTTP_'.mb_strtoupper(str_replace('-', '_', $key))] = $value;
22:         }
23: 
24:         $queryString = $server['QUERY_STRING'] ?? '';
25:         $server['REQUEST_URI'] ??= '';
                                     ^
26:         $server['REQUEST_URI'] .= '' !== $queryString ? '?'.$queryString : '';
27:         $rawContent = $request->rawContent();
28: 
29:         return new HttpFoundationRequest(
30:             $request->get ?? [],
31:             $request->post ?? [],
32:             [],
33:             $request->cookie ?? [],
34:             $request->files ?? [],
35:             $server,

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/NoOpStreamedResponseProcessor.php
ERROR: Parse error at line 13 column 33:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpFoundation;
 6: 
 7: use Swoole\Http\Response as SwooleResponse;
 8: use Symfony\Component\HttpFoundation\Response as HttpFoundationResponse;
 9: use Symfony\Component\HttpFoundation\StreamedResponse;
10: 
11: final class NoOpStreamedResponseProcessor implements ResponseProcessorInterface
12: {
13:     public function __construct(private ResponseProcessorInterface $decorated)
                                    ^
14:     {
15:     }
16: 
17:     /**
18:      * {@inheritdoc}
19:      */
20:     public function process(HttpFoundationResponse $httpFoundationResponse, SwooleResponse $swooleResponse): void
21:     {
22:         if ($httpFoundationResponse instanceof StreamedResponse) {
23:             return;

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/StreamedResponseProcessor.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpFoundation;
 6: 
 7: use Assert\Assertion;
 8: use Swoole\Http\Response as SwooleResponse;
 9: use Symfony\Component\HttpFoundation\Response as HttpFoundationResponse;
10: use Symfony\Component\HttpFoundation\StreamedResponse;
11: 
12: final class StreamedResponseProcessor implements ResponseProcessorInterface
13: {
14:     public function __construct(private int $bufferOutputSize = 8192)
                                    ^
15:     {
16:     }
17: 
18:     /**
19:      * {@inheritdoc}
20:      */
21:     public function process(HttpFoundationResponse $httpFoundationResponse, SwooleResponse $swooleResponse): void
22:     {
23:         Assertion::isInstanceOf($httpFoundationResponse, StreamedResponse::class);
24: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/ResponseHeadersAndStatusProcessor.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpFoundation;
 6: 
 7: use Swoole\Http\Response as SwooleResponse;
 8: use Symfony\Component\HttpFoundation\Response as HttpFoundationResponse;
 9: 
10: final class ResponseHeadersAndStatusProcessor implements ResponseProcessorInterface
11: {
12:     public function __construct(private ResponseProcessorInterface $decorated)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function process(HttpFoundationResponse $httpFoundationResponse, SwooleResponse $swooleResponse): void
20:     {
21:         foreach ($httpFoundationResponse->headers->allPreserveCaseWithoutCookies() as $name => $values) {
22:             $swooleResponse->header($name, implode(', ', $values));

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/Session/SessionCookieEventListener.php
ERROR: Parse error at line 26 column 13:

16: use Symfony\Component\HttpKernel\Event\KernelEvent;
17: use Symfony\Component\HttpKernel\Event\RequestEvent;
18: use Symfony\Component\HttpKernel\Event\ResponseEvent;
19: use Symfony\Component\HttpKernel\KernelEvents;
20: 
21: /**
22:  * Sets the session in the request.
23:  */
24: final class SessionCookieEventListener implements EventSubscriberInterface
25: {
26:     private array $sessionCookieParameters;
                ^
27: 
28:     public function __construct(
29:         private RequestStack $requestStack,
30:         private EventDispatcherInterface $dispatcher,
31:         private StorageInterface $swooleStorage,
32:         array $sessionOptions = []
33:     ) {
34:         $this->sessionCookieParameters = $this->mergeCookieParams($sessionOptions);
35:     }
36: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/Session/SwooleSessionStorage.php
ERROR: Parse error at line 19 column 13:

 9: use K911\Swoole\Server\Session\Exception\RuntimeException;
10: use K911\Swoole\Server\Session\StorageInterface;
11: use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
12: use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag;
13: use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
14: 
15: final class SwooleSessionStorage implements SessionStorageInterface
16: {
17:     public const DEFAULT_SESSION_NAME = 'SWOOLESSID';
18: 
19:     private string $currentId;
                ^
20: 
21:     /**
22:      * @var SessionBagInterface[]
23:      */
24:     private array $bags;
25: 
26:     private array $data;
27: 
28:     private MetadataBag $metadataBag;
29: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpFoundation/Session/SwooleSessionStorageFactory.php
ERROR: Parse error at line 18 column 9:

 8: use K911\Swoole\Server\Session\StorageInterface;
 9: use Symfony\Component\EventDispatcher\EventDispatcherInterface;
10: use Symfony\Component\HttpFoundation\Request;
11: use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag;
12: use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface;
13: use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
14: 
15: final class SwooleSessionStorageFactory implements SessionStorageFactoryInterface
16: {
17:     public function __construct(
18:         private StorageInterface $storage,
            ^
19:         private EventDispatcherInterface $dispatcher,
20:         private ?MetadataBag $metadataBag = null,
21:         private int $lifetimeSeconds = 86400
22:     ) {
23:     }
24: 
25:     /**
26:      * {@inheritDoc}
27:      */
28:     public function createStorage(?Request $request): SessionStorageInterface

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/ServiceResettingTransportHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Messenger;
 6: 
 7: use K911\Swoole\Server\TaskHandler\TaskHandlerInterface;
 8: use Swoole\Server;
 9: use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter;
10: 
11: final class ServiceResettingTransportHandler implements TaskHandlerInterface
12: {
13:     public function __construct(
14:         private TaskHandlerInterface $decorated,
            ^
15:         private ServicesResetter $resetter
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      *
22:      * @throws \Exception
23:      */
24:     public function handle(Server $server, Server\Task $task): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/SwooleServerTaskTransportFactory.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Messenger;
 6: 
 7: use K911\Swoole\Server\HttpServer;
 8: use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
 9: use Symfony\Component\Messenger\Transport\TransportFactoryInterface;
10: use Symfony\Component\Messenger\Transport\TransportInterface;
11: 
12: final class SwooleServerTaskTransportFactory implements TransportFactoryInterface
13: {
14:     public function __construct(private HttpServer $server)
                                    ^
15:     {
16:     }
17: 
18:     public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
19:     {
20:         return new SwooleServerTaskTransport(
21:             new SwooleServerTaskReceiver(),
22:             new SwooleServerTaskSender($this->server)
23:         );
24:     }

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/SwooleServerTaskTransport.php
ERROR: Parse error at line 13 column 9:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Messenger;
 6: 
 7: use Symfony\Component\Messenger\Envelope;
 8: use Symfony\Component\Messenger\Transport\TransportInterface;
 9: 
10: final class SwooleServerTaskTransport implements TransportInterface
11: {
12:     public function __construct(
13:         private SwooleServerTaskReceiver $receiver,
            ^
14:         private SwooleServerTaskSender $sender
15:     ) {
16:     }
17: 
18:     /**
19:      * {@inheritdoc}
20:      */
21:     public function send(Envelope $envelope): Envelope
22:     {
23:         return $this->sender->send($envelope);

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/SwooleServerTaskTransportHandler.php
ERROR: Parse error at line 16 column 9:

 6: 
 7: use Assert\Assertion;
 8: use K911\Swoole\Server\TaskHandler\TaskHandlerInterface;
 9: use Swoole\Server;
10: use Symfony\Component\Messenger\Envelope;
11: use Symfony\Component\Messenger\MessageBusInterface;
12: 
13: final class SwooleServerTaskTransportHandler implements TaskHandlerInterface
14: {
15:     public function __construct(
16:         private MessageBusInterface $bus,
            ^
17:         private ?TaskHandlerInterface $decorated = null
18:     ) {
19:     }
20: 
21:     public function handle(Server $server, Server\Task $task): void
22:     {
23:         Assertion::isInstanceOf($task->data, Envelope::class);
24:         /* @var $data Envelope */
25:         $data = $task->data;
26:         $this->bus->dispatch($data);

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/ContextReleasingTransportHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Messenger;
 6: 
 7: use K911\Swoole\Bridge\Symfony\Container\CoWrapper;
 8: use K911\Swoole\Server\TaskHandler\TaskHandlerInterface;
 9: use Swoole\Server;
10: 
11: final class ContextReleasingTransportHandler implements TaskHandlerInterface
12: {
13:     public function __construct(
14:         private TaskHandlerInterface $decorated,
            ^
15:         private CoWrapper $coWrapper
16:     ) {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      *
22:      * @throws \Exception
23:      */
24:     public function handle(Server $server, Server\Task $task): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/ExceptionLoggingTransportHandler.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Messenger;
 6: 
 7: use K911\Swoole\Server\TaskHandler\TaskHandlerInterface;
 8: use Psr\Log\LoggerInterface;
 9: use Swoole\Server;
10: 
11: final class ExceptionLoggingTransportHandler implements TaskHandlerInterface
12: {
13:     public function __construct(
14:         private TaskHandlerInterface $decorated,
            ^
15:         private LoggerInterface $logger
16:     ) {
17:     }
18: 
19:     /**
20:      * @throws \Throwable
21:      */
22:     public function handle(Server $server, Server\Task $task): void
23:     {
24:         try {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Messenger/SwooleServerTaskSender.php
ERROR: Parse error at line 15 column 33:

 5: namespace K911\Swoole\Bridge\Symfony\Messenger;
 6: 
 7: use K911\Swoole\Server\HttpServer;
 8: use Symfony\Component\Messenger\Envelope;
 9: use Symfony\Component\Messenger\Stamp\ReceivedStamp;
10: use Symfony\Component\Messenger\Stamp\SentStamp;
11: use Symfony\Component\Messenger\Transport\Sender\SenderInterface;
12: 
13: final class SwooleServerTaskSender implements SenderInterface
14: {
15:     public function __construct(private HttpServer $httpServer)
                                    ^
16:     {
17:     }
18: 
19:     /**
20:      * {@inheritdoc}
21:      */
22:     public function send(Envelope $envelope): Envelope
23:     {
24:         /** @var null|SentStamp $sentStamp */
25:         $sentStamp = $envelope->last(SentStamp::class);

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Event/ServerStartedEvent.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Event;
 6: 
 7: use Swoole\Server;
 8: use Symfony\Contracts\EventDispatcher\Event;
 9: 
10: final class ServerStartedEvent extends Event
11: {
12:     public const NAME = 'swoole_bundle.server.started';
13: 
14:     public function __construct(private Server $server)
                                    ^
15:     {
16:     }
17: 
18:     public function getServer(): Server
19:     {
20:         return $this->server;
21:     }
22: }
23: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Event/RequestWithSessionFinishedEvent.php
ERROR: Parse error at line 13 column 33:

 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Event;
 6: 
 7: use Symfony\Contracts\EventDispatcher\Event;
 8: 
 9: final class RequestWithSessionFinishedEvent extends Event
10: {
11:     public const NAME = 'swoole_bundle.request.with.session.finished';
12: 
13:     public function __construct(private string $sessionId)
                                    ^
14:     {
15:     }
16: 
17:     public function getSessionId(): string
18:     {
19:         return $this->sessionId;
20:     }
21: }
22: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Event/WorkerStartedEvent.php
ERROR: Parse error at line 15 column 9:

 5: namespace K911\Swoole\Bridge\Symfony\Event;
 6: 
 7: use Swoole\Server;
 8: use Symfony\Contracts\EventDispatcher\Event;
 9: 
10: final class WorkerStartedEvent extends Event
11: {
12:     public const NAME = 'swoole_bundle.worker.started';
13: 
14:     public function __construct(
15:         private Server $server,
            ^
16:         private int $workerId
17:     ) {
18:     }
19: 
20:     public function getServer(): Server
21:     {
22:         return $this->server;
23:     }
24: 
25:     public function getWorkerId(): int

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/ServicePool/UnmanagedFactoryServicePool.php
ERROR: Parse error at line 20 column 13:

10: /**
11:  * @template T of object
12:  *
13:  * @template-extends BaseServicePool<T>
14:  */
15: final class UnmanagedFactoryServicePool extends BaseServicePool
16: {
17:     /**
18:      * @var \Closure(): T
19:      */
20:     private \Closure $instantiator;
                ^
21: 
22:     /**
23:      * @param \Closure(): T $instantiator
24:      */
25:     public function __construct(
26:         \Closure $instantiator,
27:         Mutex $mutex,
28:         int $instancesLimit = 50,
29:         ?Resetter $resetter = null
30:     ) {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/ServicePool/ServicePoolContainer.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container\ServicePool;
 6: 
 7: final class ServicePoolContainer
 8: {
 9:     /**
10:      * @param array<ServicePool<object>> $pools
11:      */
12:     public function __construct(private array $pools)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * @param ServicePool<object> $pool
18:      */
19:     public function addPool(ServicePool $pool): void
20:     {
21:         $this->pools[] = $pool;
22:     }

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/ServicePool/DiServicePool.php
ERROR: Parse error at line 20 column 9:

10: use Symfony\Component\DependencyInjection\Container;
11: 
12: /**
13:  * @template T of object
14:  *
15:  * @template-extends BaseServicePool<T>
16:  */
17: final class DiServicePool extends BaseServicePool
18: {
19:     public function __construct(
20:         private string $wrappedServiceId,
            ^
21:         private Container $container,
22:         Mutex $mutex,
23:         int $instancesLimit = 50,
24:         ?Resetter $resetter = null,
25:         ?StabilityChecker $stabilityChecker = null
26:     ) {
27:         parent::__construct($mutex, $instancesLimit, $resetter, $stabilityChecker);
28:     }
29: 
30:     /**

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/ServicePool/BaseServicePool.php
ERROR: Parse error at line 18 column 13:

 8: use K911\Swoole\Bridge\Symfony\Container\StabilityChecker;
 9: use K911\Swoole\Component\Locking\Mutex;
10: 
11: /**
12:  * @template T of object
13:  *
14:  * @template-implements ServicePool<T>
15:  */
16: abstract class BaseServicePool implements ServicePool
17: {
18:     private int $assignedCount = 0;
                ^
19: 
20:     /**
21:      * @var array<int, T>
22:      */
23:     private array $freePool = [];
24: 
25:     /**
26:      * @var array<int, T>
27:      */
28:     private array $assignedPool = [];

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/CoWrapper.php
ERROR: Parse error at line 12 column 20:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container;
 6: 
 7: use Co;
 8: use K911\Swoole\Bridge\Symfony\Container\ServicePool\ServicePoolContainer;
 9: 
10: final class CoWrapper
11: {
12:     private static ?self $instance;
                       ^
13: 
14:     public function __construct(private ServicePoolContainer $servicePoolContainer)
15:     {
16:         self::$instance = $this;
17:     }
18: 
19:     public function defer(): void
20:     {
21:         \Co::defer(function (): void {
22:             $this->servicePoolContainer->releaseFromCoroutine(\Co::getCid());

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/ContainerModifier.php
ERROR: Parse error at line 81 column 31:

71:             if (isset($ignoredMethods[$methodName]) || !str_starts_with($methodName, 'get')) {
72:                 continue;
73:             }
74: 
75:             $methodsCodes[] = self::generateOverriddenGetter($method, $codeExtractor);
76:         }
77: 
78:         $namespace = $reflContainer->getNamespaceName();
79:         $modifierClassToUse = __CLASS__;
80:         $methodsCode = implode(PHP_EOL.PHP_EOL, $methodsCodes);
81:         $newContainerSource = <<<EOF
                                  ^
82:             <?php
83: 
84:             namespace $namespace;
85: 
86:             use $modifierClassToUse;
87: 
88:             class $containerClass extends $overriddenClass
89:             {
90:                 protected \$lazyInitializedShared = [];
91: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/BlockingContainer.php
ERROR: Parse error at line 15 column 22:

 5: namespace K911\Swoole\Bridge\Symfony\Container;
 6: 
 7: use K911\Swoole\Component\Locking\Channel\ChannelMutexFactory;
 8: use K911\Swoole\Component\Locking\RecursiveOwner\RecursiveOwnerMutex;
 9: use K911\Swoole\Component\Locking\RecursiveOwner\RecursiveOwnerMutexFactory;
10: use Symfony\Component\DependencyInjection\Container;
11: use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
12: 
13: class BlockingContainer extends Container
14: {
15:     protected static RecursiveOwnerMutex $mutex;
                         ^
16: 
17:     protected static string $buildContainerNs = '';
18: 
19:     public function __construct(ParameterBagInterface $parameterBag = null)
20:     {
21:         self::$mutex = (new RecursiveOwnerMutexFactory(new ChannelMutexFactory()))->newMutex();
22: 
23:         parent::__construct($parameterBag);
24:     }
25: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/ContainerSourceCodeExtractor.php
ERROR: Parse error at line 11 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container;
 6: 
 7: use ZEngine\Reflection\ReflectionMethod;
 8: 
 9: final class ContainerSourceCodeExtractor
10: {
11:     private array $sourceCode;
                ^
12: 
13:     public function __construct(string $sourceCode)
14:     {
15:         $this->sourceCode = explode(PHP_EOL, $sourceCode);
16:     }
17: 
18:     public function getContainerInternalsForMethod(ReflectionMethod $method, bool $isExtension = false): array
19:     {
20:         $code = $this->getMethodCode($method);
21:         $variable = $isExtension ? 'container' : 'this';

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/SimpleResetter.php
ERROR: Parse error at line 9 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container;
 6: 
 7: final class SimpleResetter implements Resetter
 8: {
 9:     public function __construct(private string $resetFn)
                                    ^
10:     {
11:     }
12: 
13:     public function reset(object $service): void
14:     {
15:         $service->{$this->resetFn}();
16:     }
17: }
18: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/UnmanagedFactoryInstantiator.php
ERROR: Parse error at line 19 column 9:

 9: use K911\Swoole\Bridge\Symfony\Container\ServicePool\UnmanagedFactoryServicePool;
10: use K911\Swoole\Component\Locking\MutexFactory;
11: use ProxyManager\Factory\AccessInterceptorValueHolderFactory;
12: use ProxyManager\Proxy\AccessInterceptorInterface;
13: use ProxyManager\Proxy\AccessInterceptorValueHolderInterface;
14: use ProxyManager\Proxy\ValueHolderInterface;
15: 
16: final class UnmanagedFactoryInstantiator
17: {
18:     public function __construct(
19:         private AccessInterceptorValueHolderFactory $proxyFactory,
            ^
20:         private Instantiator $instantiator,
21:         private ServicePoolContainer $servicePoolContainer,
22:         private MutexFactory $limitLocking,
23:         private MutexFactory $newInstanceLocking
24:     ) {
25:     }
26: 
27:     /**
28:      * @template RealObjectType of object
29:      *

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/ProxyDirectoryHandler.php
ERROR: Parse error at line 11 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container\Proxy;
 6: 
 7: use Symfony\Component\Filesystem\Filesystem;
 8: 
 9: final class ProxyDirectoryHandler
10: {
11:     private bool $proxyDirExists = false;
                ^
12: 
13:     public function __construct(
14:         private Filesystem $fileSystem,
15:         private string $proxyDir
16:     ) {
17:     }
18: 
19:     public function ensureProxyDirExists(): void
20:     {
21:         if ($this->proxyDirExists) {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/Generation/ContextualAccessForwarderGenerator.php
ERROR: Parse error at line 28 column 33:

18: use ProxyManager\ProxyGenerator\PropertyGenerator\PublicPropertiesMap;
19: use ProxyManager\ProxyGenerator\ProxyGeneratorInterface;
20: use ProxyManager\ProxyGenerator\Util\Properties;
21: use ProxyManager\ProxyGenerator\Util\ProxiedMethodsFilter;
22: 
23: /**
24:  * Generator for proxies with service pool.
25:  */
26: class ContextualAccessForwarderGenerator implements ProxyGeneratorInterface
27: {
28:     public function __construct(private MethodForwarderBuilder $forwarderBuilder)
                                    ^
29:     {
30:     }
31: 
32:     /**
33:      * @template T of object
34:      *
35:      * @param \ReflectionClass<T> $originalClass
36:      *
37:      * @throws \InvalidArgumentException
38:      * @throws InvalidProxiedClassException

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/Generation/MethodGenerator/Util/MethodForwarderGenerator.php
ERROR: Parse error at line 15 column 30:

 5: namespace K911\Swoole\Bridge\Symfony\Container\Proxy\Generation\MethodGenerator\Util;
 6: 
 7: use Laminas\Code\Generator\PropertyGenerator;
 8: use ProxyManager\Generator\Util\ProxiedMethodReturnExpression;
 9: 
10: /**
11:  * Utility to service pool method interceptor.
12:  */
13: class MethodForwarderGenerator
14: {
15:     private const TEMPLATE = <<<'PHP'
                                 ^
16:                 $wrapped = $this->{{$servicePoolHolderName}}->get();
17:                 $returnValue = $wrapped->{{$forwardedMethodCall}};
18: 
19:                 {{$returnExpression}}
20:         PHP;
21: 
22:     /**
23:      * @param string $forwardedMethodCall the call to the proxied method
24:      */
25:     public static function createForwardedMethodBody(

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/Generation/PropertyGenerator/ServicePoolProperty.php
ERROR: Parse error at line 22 column 20:

12: use ProxyManager\Generator\Util\IdentifierSuffixer;
13: 
14: /**
15:  * Property that contains the wrapped Symfony container.
16:  */
17: class ServicePoolProperty extends PropertyGenerator
18: {
19:     /**
20:      * @var null|\ReflectionClass<ServicePool<object>>
21:      */
22:     private static ?\ReflectionClass $servicePoolReflection = null;
                       ^
23: 
24:     /**
25:      * Constructor.
26:      *
27:      * @throws InvalidArgumentException
28:      */
29:     public function __construct()
30:     {
31:         parent::__construct(IdentifierSuffixer::getIdentifier('servicePool'));
32: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/FileLocatorFactory.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container\Proxy;
 6: 
 7: use ProxyManager\FileLocator\FileLocator;
 8: use ProxyManager\FileLocator\FileLocatorInterface;
 9: 
10: final class FileLocatorFactory
11: {
12:     public function __construct(private ProxyDirectoryHandler $directoryHandler)
                                    ^
13:     {
14:     }
15: 
16:     public function createFileLocator(string $proxiesDirectory): FileLocatorInterface
17:     {
18:         $this->directoryHandler->ensureProxyDirExists();
19: 
20:         return new FileLocator($proxiesDirectory);
21:     }
22: }

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/Generator.php
ERROR: Parse error at line 18 column 13:

 8: use ProxyManager\Configuration;
 9: use ProxyManager\Version;
10: 
11: final class Generator extends ContextualAccessForwarderFactory
12: {
13:     /**
14:      * Cached checked class names.
15:      *
16:      * @var array<class-string<ContextualProxy<object>&object>>
17:      */
18:     private array $checkedClasses = [];
                ^
19: 
20:     public function __construct(Configuration $configuration)
21:     {
22:         parent::__construct($configuration);
23:     }
24: 
25:     /**
26:      * this override method activates the proxy manage class autoloader, which is kind of pain in the ass
27:      * to activate in Symfony, since Symfony relies directly on Composer and it would be needed to register this
28:      * autoloader with Composer autoloader initialization.

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Container/Proxy/Instantiator.php
ERROR: Parse error at line 11 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Container\Proxy;
 6: 
 7: use K911\Swoole\Bridge\Symfony\Container\ServicePool\ServicePool;
 8: 
 9: final class Instantiator
10: {
11:     public function __construct(private Generator $proxyGenerator)
                                    ^
12:     {
13:     }
14: 
15:     /**
16:      * @template RealObjectType of object
17:      *
18:      * @param ServicePool<RealObjectType>  $servicePool
19:      * @param class-string<RealObjectType> $wrappedSvcClass
20:      *
21:      * @return ContextualProxy<RealObjectType>&RealObjectType

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Bundle/Command/ServerStatusCommand.php
ERROR: Parse error at line 23 column 9:

13: use Symfony\Component\Console\Command\Command;
14: use Symfony\Component\Console\Input\InputInterface;
15: use Symfony\Component\Console\Input\InputOption;
16: use Symfony\Component\Console\Output\OutputInterface;
17: use Symfony\Component\Console\Style\SymfonyStyle;
18: use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
19: 
20: final class ServerStatusCommand extends Command
21: {
22:     public function __construct(
23:         private Sockets $sockets,
            ^
24:         private ApiServerClientFactory $apiServerClientFactory,
25:         private ParameterBagInterface $parameterBag
26:     ) {
27:         parent::__construct();
28:     }
29: 
30:     /**
31:      * {@inheritdoc}
32:      */
33:     protected function configure(): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Bundle/Command/ServerReloadCommand.php
ERROR: Parse error at line 22 column 9:

12: use Symfony\Component\Console\Input\InputOption;
13: use Symfony\Component\Console\Output\OutputInterface;
14: use Symfony\Component\Console\Style\SymfonyStyle;
15: use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
16: 
17: final class ServerReloadCommand extends Command
18: {
19:     use ParametersHelperTrait;
20: 
21:     public function __construct(
22:         private HttpServer $server,
            ^
23:         private HttpServerConfiguration $serverConfiguration,
24:         private ParameterBagInterface $parameterBag
25:     ) {
26:         parent::__construct();
27:     }
28: 
29:     /**
30:      * {@inheritdoc}
31:      */
32:     protected function configure(): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Bundle/Command/ServerStopCommand.php
ERROR: Parse error at line 22 column 9:

12: use Symfony\Component\Console\Input\InputOption;
13: use Symfony\Component\Console\Output\OutputInterface;
14: use Symfony\Component\Console\Style\SymfonyStyle;
15: use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
16: 
17: final class ServerStopCommand extends Command
18: {
19:     use ParametersHelperTrait;
20: 
21:     public function __construct(
22:         private HttpServer $server,
            ^
23:         private HttpServerConfiguration $serverConfiguration,
24:         private ParameterBagInterface $parameterBag
25:     ) {
26:         parent::__construct();
27:     }
28: 
29:     /**
30:      * {@inheritdoc}
31:      */
32:     protected function configure(): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Bundle/Command/AbstractServerStartCommand.php
ERROR: Parse error at line 33 column 13:

23: use Symfony\Component\Console\Input\InputOption;
24: use Symfony\Component\Console\Output\OutputInterface;
25: use Symfony\Component\Console\SignalRegistry\SignalRegistry;
26: use Symfony\Component\Console\Style\SymfonyStyle;
27: use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
28: 
29: abstract class AbstractServerStartCommand extends Command
30: {
31:     use ParametersHelperTrait;
32: 
33:     private bool $testing = false;
                ^
34: 
35:     public function __construct(
36:         private HttpServer $server,
37:         private HttpServerConfiguration $serverConfiguration,
38:         private ConfiguratorInterface $serverConfigurator,
39:         protected ParameterBagInterface $parameterBag,
40:         private BootableInterface $bootManager
41:     ) {
42:         parent::__construct();
43:     }

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Bundle/EventDispatcher/EventDispatchingWorkerStartHandler.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Bundle\EventDispatcher;
 6: 
 7: use K911\Swoole\Bridge\Symfony\Event\WorkerStartedEvent;
 8: use K911\Swoole\Server\WorkerHandler\WorkerStartHandlerInterface;
 9: use Swoole\Server;
10: use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
11: 
12: final class EventDispatchingWorkerStartHandler implements WorkerStartHandlerInterface
13: {
14:     public function __construct(private EventDispatcherInterface $eventDispatcher)
                                    ^
15:     {
16:     }
17: 
18:     public function handle(Server $server, int $workerId): void
19:     {
20:         $this->eventDispatcher->dispatch(new WorkerStartedEvent($server, $workerId), WorkerStartedEvent::NAME);
21:     }
22: }
23: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/Bundle/EventDispatcher/EventDispatchingServerStartHandler.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\Bundle\EventDispatcher;
 6: 
 7: use K911\Swoole\Bridge\Symfony\Event\ServerStartedEvent;
 8: use K911\Swoole\Server\LifecycleHandler\ServerStartHandlerInterface;
 9: use Swoole\Server;
10: use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
11: 
12: final class EventDispatchingServerStartHandler implements ServerStartHandlerInterface
13: {
14:     public function __construct(private EventDispatcherInterface $eventDispatcher)
                                    ^
15:     {
16:     }
17: 
18:     public function handle(Server $server): void
19:     {
20:         $this->eventDispatcher->dispatch(new ServerStartedEvent($server), ServerStartedEvent::NAME);
21:     }
22: }
23: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpKernel/HttpKernelRequestHandler.php
ERROR: Parse error at line 19 column 9:

 9: use K911\Swoole\Bridge\Symfony\HttpFoundation\ResponseProcessorInterface;
10: use K911\Swoole\Server\RequestHandler\RequestHandlerInterface;
11: use K911\Swoole\Server\Runtime\BootableInterface;
12: use Swoole\Http\Request as SwooleRequest;
13: use Swoole\Http\Response as SwooleResponse;
14: use Symfony\Component\HttpKernel\TerminableInterface;
15: 
16: final class HttpKernelRequestHandler implements RequestHandlerInterface, BootableInterface
17: {
18:     public function __construct(
19:         private KernelPoolInterface $kernelPool,
            ^
20:         private RequestFactoryInterface $requestFactory,
21:         private ResponseProcessorInjectorInterface $processorInjector,
22:         private ResponseProcessorInterface $responseProcessor
23:     ) {
24:     }
25: 
26:     /**
27:      * {@inheritdoc}
28:      */
29:     public function boot(array $runtimeConfiguration = []): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpKernel/ContextReleasingHttpKernelRequestHandler.php
ERROR: Parse error at line 15 column 9:

 5: namespace K911\Swoole\Bridge\Symfony\HttpKernel;
 6: 
 7: use K911\Swoole\Bridge\Symfony\Container\CoWrapper;
 8: use K911\Swoole\Server\RequestHandler\RequestHandlerInterface;
 9: use Swoole\Http\Request as SwooleRequest;
10: use Swoole\Http\Response as SwooleResponse;
11: 
12: final class ContextReleasingHttpKernelRequestHandler implements RequestHandlerInterface
13: {
14:     public function __construct(
15:         private RequestHandlerInterface $decorated,
            ^
16:         private CoWrapper $coWrapper
17:     ) {
18:     }
19: 
20:     /**
21:      * {@inheritdoc}
22:      *
23:      * @throws \Exception
24:      */
25:     public function handle(SwooleRequest $request, SwooleResponse $response): void

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpKernel/CoroutineKernelPool.php
ERROR: Parse error at line 14 column 13:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpKernel;
 6: 
 7: use Symfony\Component\HttpKernel\KernelInterface;
 8: 
 9: final class CoroutineKernelPool implements KernelPoolInterface
10: {
11:     /**
12:      * @var array<KernelInterface>
13:      */
14:     private array $kernels = [];
                ^
15: 
16:     public function __construct(private KernelInterface $kernel)
17:     {
18:     }
19: 
20:     public function boot(): void
21:     {
22:         $this->kernel->boot();
23:     }
24: 

ERROR: Unable to parse file: /code/src/Bridge/Symfony/HttpKernel/SimpleKernelPool.php
ERROR: Parse error at line 11 column 33:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Symfony\HttpKernel;
 6: 
 7: use Symfony\Component\HttpKernel\KernelInterface;
 8: 
 9: final class SimpleKernelPool implements KernelPoolInterface
10: {
11:     public function __construct(private KernelInterface $kernel)
                                    ^
12:     {
13:     }
14: 
15:     public function boot(): void
16:     {
17:         $this->kernel->boot();
18:     }
19: 
20:     public function get(): KernelInterface
21:     {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/ErrorHandler/SymfonyExceptionHandler.php
ERROR: Parse error at line 18 column 9:

 8: use K911\Swoole\Bridge\Symfony\HttpFoundation\ResponseProcessorInterface;
 9: use K911\Swoole\Server\RequestHandler\ExceptionHandler\ExceptionHandlerInterface;
10: use Swoole\Http\Request;
11: use Swoole\Http\Response;
12: use Symfony\Component\HttpKernel\HttpKernelInterface;
13: use Symfony\Component\HttpKernel\TerminableInterface;
14: 
15: final class SymfonyExceptionHandler implements ExceptionHandlerInterface
16: {
17:     public function __construct(
18:         private HttpKernelInterface $kernel,
            ^
19:         private RequestFactoryInterface $requestFactory,
20:         private ResponseProcessorInterface $responseProcessor,
21:         private ErrorResponder $errorResponder
22:     ) {
23:     }
24: 
25:     public function handle(Request $request, \Throwable $exception, Response $response): void
26:     {
27:         $httpFoundationRequest = $this->requestFactory->make($request);
28:         $httpFoundationResponse = $this->errorResponder->processErroredRequest($httpFoundationRequest, $exception);

ERROR: Unable to parse file: /code/src/Bridge/Symfony/ErrorHandler/ExceptionHandlerFactory.php
ERROR: Parse error at line 18 column 9:

 8: use Symfony\Component\HttpKernel\HttpKernelInterface;
 9: 
10: final class ExceptionHandlerFactory
11: {
12:     /**
13:      * @var bool
14:      */
15:     private $isSymfony4 = false;
16: 
17:     public function __construct(
18:         private HttpKernelInterface $kernel,
            ^
19:         private \ReflectionMethod $throwableHandler
20:     ) {
21:         if ('handleException' === $throwableHandler->getName()) {
22:             $this->isSymfony4 = true;
23:         }
24:     }
25: 
26:     public function newExceptionHandler(Request $request): callable
27:     {
28:         return function (\Throwable $e) use ($request) {

ERROR: Unable to parse file: /code/src/Bridge/Symfony/ErrorHandler/ErrorResponder.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Bridge\Symfony\ErrorHandler;
 6: 
 7: use Symfony\Component\ErrorHandler\ErrorHandler;
 8: use Symfony\Component\HttpFoundation\Request;
 9: use Symfony\Component\HttpFoundation\Response;
10: 
11: final class ErrorResponder
12: {
13:     public function __construct(
14:         private ErrorHandler $errorHandler,
            ^
15:         private ExceptionHandlerFactory $handlerFactory
16:     ) {
17:     }
18: 
19:     public function processErroredRequest(Request $request, \Throwable $throwable): Response
20:     {
21:         $exceptionHandler = $this->handlerFactory->newExceptionHandler($request);
22:         $this->errorHandler->setExceptionHandler($exceptionHandler);
23: 
24:         return $this->errorHandler->handleException($throwable);

ERROR: Unable to parse file: /code/src/Bridge/Doctrine/BlockingProxyFactoryOverridingManagerConfigurator.php
ERROR: Parse error at line 14 column 20:

 4: 
 5: namespace K911\Swoole\Bridge\Doctrine;
 6: 
 7: use Doctrine\Bundle\DoctrineBundle\ManagerConfigurator;
 8: use Doctrine\ORM\EntityManager;
 9: use Doctrine\ORM\EntityManagerInterface;
10: use K911\Swoole\Component\Locking\FirstTimeOnly\FirstTimeOnlyMutexFactory;
11: 
12: final class BlockingProxyFactoryOverridingManagerConfigurator
13: {
14:     private static ?\ReflectionProperty $emProxyFactoryPropRefl = null;
                       ^
15: 
16:     public function __construct(
17:         private ManagerConfigurator $wrapped,
18:         private FirstTimeOnlyMutexFactory $mutexFactory
19:     ) {
20:     }
21: 
22:     public function configure(EntityManagerInterface $entityManager): void
23:     {
24:         if (!$entityManager instanceof EntityManager) {

ERROR: Unable to parse file: /code/src/Bridge/Doctrine/ServicePooledRepositoryFactory.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Bridge\Doctrine;
 6: 
 7: use Doctrine\ORM\EntityManagerInterface;
 8: use Doctrine\ORM\Repository\RepositoryFactory;
 9: use Doctrine\Persistence\ObjectRepository;
10: 
11: final class ServicePooledRepositoryFactory implements RepositoryFactory
12: {
13:     public function __construct(
14:         private RepositoryFactory $decorated,
            ^
15:         private EntityManagerInterface $pooledEm
16:     ) {
17:     }
18: 
19:     public function getRepository(EntityManagerInterface $entityManager, $entityName): ObjectRepository
20:     {
21:         return $this->decorated->getRepository($this->pooledEm, $entityName);
22:     }
23: }
24: 

ERROR: Unable to parse file: /code/src/Bridge/Doctrine/DBAL/ConnectionKeepAliveResetter.php
ERROR: Parse error at line 14 column 9:

 4: 
 5: namespace K911\Swoole\Bridge\Doctrine\DBAL;
 6: 
 7: use Doctrine\DBAL\Connection;
 8: use K911\Swoole\Bridge\Symfony\Container\Resetter;
 9: use PixelFederation\DoctrineResettableEmBundle\DBAL\Connection\DBALAliveKeeper;
10: 
11: final class ConnectionKeepAliveResetter implements Resetter
12: {
13:     public function __construct(
14:         private DBALAliveKeeper $aliveKeeper,
            ^
15:         private string $connectionName
16:     ) {
17:     }
18: 
19:     public function reset(object $service): void
20:     {
21:         if (!$service instanceof Connection) {
22:             throw new \UnexpectedValueException(\sprintf('Unexpected class instance: %s ', $service::class));
23:         }
24: 

ERROR: Unable to parse file: /code/src/Bridge/Doctrine/BlockingProxyFactory.php
ERROR: Parse error at line 17 column 13:

 7: use Doctrine\Common\Proxy\Proxy;
 8: use Doctrine\ORM\Proxy\ProxyFactory;
 9: use K911\Swoole\Component\Locking\FirstTimeOnly\FirstTimeOnlyMutex;
10: use K911\Swoole\Component\Locking\FirstTimeOnly\FirstTimeOnlyMutexFactory;
11: 
12: final class BlockingProxyFactory extends ProxyFactory
13: {
14:     /**
15:      * @var array<string, FirstTimeOnlyMutex>
16:      */
17:     private array $mutexes = [];
                ^
18: 
19:     public function __construct(
20:         private ProxyFactory $wrapped,
21:         private FirstTimeOnlyMutexFactory $mutexFactory
22:     ) {
23:     }
24: 
25:     /**
26:      * @template T of object
27:      *

ERROR: Unable to parse file: /code/src/Bridge/Doctrine/DoctrineProcessor.php
ERROR: Parse error at line 23 column 33:

13: use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
14: use Symfony\Component\DependencyInjection\ContainerBuilder;
15: use Symfony\Component\DependencyInjection\Definition;
16: use Symfony\Component\DependencyInjection\Reference;
17: 
18: final class DoctrineProcessor implements CompileProcessor
19: {
20:     /**
21:      * @param array{global_limit?: int, limits?: array<string, int>} $config
22:      */
23:     public function __construct(private array $config = [])
                                    ^
24:     {
25:     }
26: 
27:     public function process(ContainerBuilder $container, Proxifier $proxifier): void
28:     {
29:         /** @var array<string,string> $bundles */
30:         $bundles = $container->getParameter('kernel.bundles');
31: 
32:         if (!isset($bundles['DoctrineBundle'])) {
33:             return;

ERROR: Unable to parse file: /code/src/Bridge/Upscale/Blackfire/ProfilerActivator.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace K911\Swoole\Bridge\Upscale\Blackfire;
 6: 
 7: use Swoole\Http\Server;
 8: use Upscale\Swoole\Blackfire\Profiler;
 9: use Upscale\Swoole\Blackfire\ProfilerDecorator;
10: use Upscale\Swoole\Reflection\Http\Server as UpscaleServer;
11: 
12: class ProfilerActivator
13: {
14:     public function __construct(private Profiler $profiler)
                                    ^
15:     {
16:     }
17: 
18:     public function activate(Server $server): void
19:     {
20:         $server = new UpscaleServer($server);
21:         $server->setMiddleware($this->wrap($server->getMiddleware(), $this->profiler));
22:     }
23: 
24:     /**

ERROR: Unable to parse file: /code/src/Bridge/Upscale/Blackfire/WithProfiler.php
ERROR: Parse error at line 12 column 33:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace K911\Swoole\Bridge\Upscale\Blackfire;
 6: 
 7: use K911\Swoole\Server\Configurator\ConfiguratorInterface;
 8: use Swoole\Http\Server;
 9: 
10: final class WithProfiler implements ConfiguratorInterface
11: {
12:     public function __construct(private ProfilerActivator $profilerActivator)
                                    ^
13:     {
14:     }
15: 
16:     /**
17:      * {@inheritdoc}
18:      */
19:     public function configure(Server $server): void
20:     {
21:         $this->profilerActivator->activate($server);
22:     }

ERROR: Unable to parse file: /code/src/Reflection/FinalClassModifier.php
ERROR: Parse error at line 15 column 20:

 5: namespace K911\Swoole\Reflection;
 6: 
 7: use K911\Swoole\Bridge\Symfony\Bundle\DependencyInjection\ContainerConstants;
 8: use Symfony\Component\Cache\Adapter\FilesystemAdapter;
 9: use ZEngine\Core;
10: use ZEngine\Reflection\ReflectionClass;
11: use ZEngine\Reflection\ReflectionMethod;
12: 
13: final class FinalClassModifier
14: {
15:     private static FilesystemAdapter $cache;
                       ^
16: 
17:     private static string $cacheDir = '';
18: 
19:     private static array $originalFinalClasses = [];
20: 
21:     public static function initialize(string $cacheDir): void
22:     {
23:         Core::init();
24:         self::initializeCache($cacheDir);
25:         self::modifyStoredClasses();

ERROR: Unable to parse file: /code/src/functions.php
ERROR: Parse error at line 30 column 39:

20: /**
21:  * Get object property (even by reference).
22:  * Property may not be public.
23:  *
24:  * @param null|string $scope class scope useful when property is inherited
25:  *
26:  * @return mixed
27:  */
28: function &get_object_property(object $obj, string $propertyName, ?string $scope = null)
29: {
30:     return \Closure::bind(fn &(string $propertyName) => $this->$propertyName, $obj, $scope ?? $obj)($propertyName);
                                          ^
31: }
32: 
33: /**
34:  * @return int bytes
35:  */
36: function get_max_memory(): int
37: {
38:     /** @var string $memoryLimit */
39:     $memoryLimit = \ini_get('memory_limit');
40: 

INFO: 184/184 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.815s
INFO: Final Memory: 11M/163M
INFO: ------------------------------------------------------------------------