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:
parent
732c552821
commit
df2563fd20
2 changed files with 12 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue