Skip to content

Commit f554b84

Browse files
authored
Merge branch refs/heads/2.1.x into 2.2.x
2 parents c476b60 + cee7127 commit f554b84

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

stubs/core.stub

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,12 @@ function register_tick_function(callable $callback, mixed ...$args): bool {}
377377
* @return resource|false
378378
*/
379379
function proc_open($command, array $descriptor_spec, &$pipes, ?string $cwd = null, ?array $env_vars = null, ?array $options = null) {}
380+
381+
/**
382+
* @param mixed &$hosts
383+
* @param mixed &$weights
384+
*
385+
* @param-out list<string> $hosts
386+
* @param-out list<int> $weights
387+
*/
388+
function getmxrr(string $hostname, &$hosts, &$weights = null): bool {}

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,6 +2663,13 @@ public function testBug10612(): void
26632663
$this->analyse([__DIR__ . '/data/bug-10612.php'], []);
26642664
}
26652665

2666+
public function testBug10704(): void
2667+
{
2668+
$this->checkExplicitMixed = true;
2669+
$this->checkImplicitMixed = true;
2670+
$this->analyse([__DIR__ . '/data/bug-10704.php'], []);
2671+
}
2672+
26662673
#[RequiresPhp('>= 8.1')]
26672674
public function testBug9652(): void
26682675
{
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug10704;
4+
5+
$hosts = [];
6+
$weights = [];
7+
$success = getmxrr('', $hosts, $weights);
8+
echo count($hosts);

0 commit comments

Comments
 (0)