Skip to content

Commit

Permalink
Merge branch '4.2'
Browse files Browse the repository at this point in the history
* 4.2: (27 commits)
  [VarExporter] dont call userland code with uninitialized objects
  Fix typos in doc blocks
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [Messenger] Restore message handlers laziness
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  Optimize perf by replacing call_user_func with dynamic vars
  [Cache] Fix dsn parsing
  [Routing] fix dumping same-path routes with placeholders
  [WebProfilerBundle][TwigBundle] CSS fixes
  Add a docblock for FormFactoryInterface
  [Security] defer log message in guard authenticator
  [Validator] Added IBAN format for Vatican City State
  merge conflicts
  ...
  • Loading branch information
nicolas-grekas committed Dec 13, 2018
2 parents d1cea0b + f9718fc commit 7dac0f8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Command/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function run(InputInterface $input, OutputInterface $output)
$input->validate();

if ($this->code) {
$statusCode = \call_user_func($this->code, $input, $output);
$statusCode = ($this->code)($input, $output);
} else {
$statusCode = $this->execute($input, $output);
}
Expand Down
2 changes: 1 addition & 1 deletion Helper/ProcessHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function wrapCallback(OutputInterface $output, Process $process, callable
$output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type));

if (null !== $callback) {
\call_user_func($callback, $type, $buffer);
$callback($type, $buffer);
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion Helper/ProgressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ private function buildLine(): string
$regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i";
$callback = function ($matches) {
if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
$text = \call_user_func($formatter, $this, $this->output);
$text = $formatter($this, $this->output);
} elseif (isset($this->messages[$matches[1]])) {
$text = $this->messages[$matches[1]];
} else {
Expand Down
2 changes: 1 addition & 1 deletion Helper/ProgressIndicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private function display()

$this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) {
if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) {
return \call_user_func($formatter, $self);
return $formatter($self);
}

return $matches[0];
Expand Down
2 changes: 1 addition & 1 deletion Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private function validateAttempts(callable $interviewer, OutputInterface $output
}

try {
return \call_user_func($question->getValidator(), $interviewer());
return $question->getValidator()($interviewer());
} catch (RuntimeException $e) {
throw $e;
} catch (\Exception $error) {
Expand Down

0 comments on commit 7dac0f8

Please sign in to comment.