Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/yaml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.4.0
Choose a base ref
...
head repository: symfony/yaml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.4.3
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 23, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    antfu Anthony Fu
    Copy the full SHA
    e78db7f View commit details
  2. Merge branch '5.4' into 6.3

    * 5.4:
      Fix implicitly-required parameters
      List CS fix in .git-blame-ignore-revs
      Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
      [Messenger][AmazonSqs] Allow async-aws/sqs version 2
    nicolas-grekas committed Jan 23, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    antfu Anthony Fu
    Copy the full SHA
    8ab9bb6 View commit details
  3. Merge branch '6.3' into 6.4

    * 6.3:
      minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
      Fix bad merge
      List CS fix in .git-blame-ignore-revs
      Fix implicitly-required parameters
      List CS fix in .git-blame-ignore-revs
      Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
    nicolas-grekas committed Jan 23, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    antfu Anthony Fu
    Copy the full SHA
    d757159 View commit details
Showing with 8 additions and 8 deletions.
  1. +2 −2 Command/LintCommand.php
  2. +1 −1 Exception/ParseException.php
  3. +3 −3 Inline.php
  4. +2 −2 Parser.php
4 changes: 2 additions & 2 deletions Command/LintCommand.php
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ class LintCommand extends Command
private ?\Closure $directoryIteratorProvider;
private ?\Closure $isReadableProvider;

public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null)
public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null)
{
parent::__construct($name);

@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return $this->display($io, $filesInfo);
}

private function validate(string $content, int $flags, string $file = null): array
private function validate(string $content, int $flags, ?string $file = null): array
{
$prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
if (\E_USER_DEPRECATED === $level) {
2 changes: 1 addition & 1 deletion Exception/ParseException.php
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ class ParseException extends RuntimeException
* @param string|null $snippet The snippet of code near the problem
* @param string|null $parsedFile The file name where the error occurred
*/
public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null)
{
$this->parsedFile = $parsedFile;
$this->parsedLine = $parsedLine;
6 changes: 3 additions & 3 deletions Inline.php
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ class Inline
private static bool $objectForMap = false;
private static bool $constantSupport = false;

public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null): void
public static function initialize(int $flags, ?int $parsedLineNumber = null, ?string $parsedFilename = null): void
{
self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags);
self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags);
@@ -267,7 +267,7 @@ private static function dumpNull(int $flags): string
*
* @throws ParseException When malformed inline YAML string is parsed
*/
public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null): mixed
public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], ?bool &$isQuoted = null): mixed
{
if (\in_array($scalar[$i], ['"', "'"], true)) {
// quoted scalar
@@ -556,7 +556,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
*
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
*/
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null): mixed
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], ?bool &$isQuotedString = null): mixed
{
$isQuotedString = false;
$scalar = trim($scalar);
4 changes: 2 additions & 2 deletions Parser.php
Original file line number Diff line number Diff line change
@@ -561,7 +561,7 @@ private function getCurrentLineIndentation(): int
*
* @throws ParseException When indentation problem are detected
*/
private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string
private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = false): string
{
$oldLineIndentation = $this->getCurrentLineIndentation();

@@ -1043,7 +1043,7 @@ private function isStringUnIndentedCollectionItem(): bool
*
* @internal
*/
public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int
public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
throw new ParseException(preg_last_error_msg());