make sure StdioTransport does not break BC for 0.2.1 (#201)

* make sure StdioTransport does not break BC for 0.2.1

* fix phpstan baseline
This commit is contained in:
Tobias Nyholm 2025-12-27 16:05:06 +01:00 • committed by GitHub
commit df2563fd20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View file

@ -5,3 +5,9 @@ parameters:
identifier: return.type
count: 1
path: src/Schema/Result/ReadResourceResult.php
-
message: '#^PHPDoc tag @param references unknown parameter\: \$runnerControl$#'
identifier: parameter.notFound
count: 1
path: src/Server/Transport/StdioTransport.php

View file

@ -27,16 +27,18 @@ class StdioTransport extends BaseTransport
private RunnerControlInterface $runnerControl;
/**
* @param resource $input
* @param resource $output
* @param resource $input
* @param resource $output
* @param ?RunnerControlInterface $runnerControl
*/
public function __construct(
private $input = \STDIN,
private $output = \STDOUT,
?LoggerInterface $logger = null,
?RunnerControlInterface $runnerControl = null,
/* ?RunnerControlInterface $runnerControl = null, */
) {
$this->runnerControl = $runnerControl ?? new RunnerControl();
// $runnerControl parameter was added in 0.2.1 and will be default in 0.3.0
$this->runnerControl = \func_get_args()[3] ?? new RunnerControl();
parent::__construct($logger);
}