Skip to content

Commit 37ddf98

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Fix more quotes in exception messages Fix more quotes in exception messages [3.4] Minor fixes [PropertyAccess] Improved errors when reading uninitialized properties
2 parents 9d42cfe + 6c53bfb commit 37ddf98

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

InputStream.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function write($input)
4545
return;
4646
}
4747
if ($this->isClosed()) {
48-
throw new RuntimeException(sprintf('%s is closed.', static::class));
48+
throw new RuntimeException(sprintf('"%s" is closed.', static::class));
4949
}
5050
$this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
5151
}

Pipes/AbstractPipes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function write(): ?array
103103
} elseif (!isset($this->inputBuffer[0])) {
104104
if (!\is_string($input)) {
105105
if (!is_scalar($input)) {
106-
throw new InvalidArgumentException(sprintf('%s yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input)));
106+
throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input)));
107107
}
108108
$input = (string) $input;
109109
}

ProcessUtils.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function validateInput(string $caller, $input)
6161
return new \IteratorIterator($input);
6262
}
6363

64-
throw new InvalidArgumentException(sprintf('%s only accepts strings, Traversable objects or stream resources.', $caller));
64+
throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller));
6565
}
6666

6767
return $input;

Tests/ProcessTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public function testSetInputWhileRunningThrowsAnException()
293293
public function testInvalidInput($value)
294294
{
295295
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
296-
$this->expectExceptionMessage('Symfony\Component\Process\Process::setInput only accepts strings, Traversable objects or stream resources.');
296+
$this->expectExceptionMessage('"Symfony\Component\Process\Process::setInput" only accepts strings, Traversable objects or stream resources.');
297297
$process = $this->getProcess('foo');
298298
$process->setInput($value);
299299
}

0 commit comments

Comments
 (0)