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.3.12
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.0
Choose a head ref
  • 12 commits
  • 4 files changed
  • 4 contributors

Commits on May 20, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ac00bc9 View commit details

Commits on May 23, 2023

  1. [6.4] Allow 7.0 deps

    nicolas-grekas committed May 23, 2023
    Copy the full SHA
    aacdb39 View commit details

Commits on Jun 3, 2023

  1. minor #50297 Remove unnecessary usages of DateTime (nicolas-grekas)

    This PR was merged into the 6.4 branch.
    
    Discussion
    ----------
    
    Remove unnecessary usages of DateTime
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | Part of #47580
    | License       | MIT
    | Doc PR        | -
    
    Together with #50290, this PR removes `DateTime` everywhere possible.
    
    What remains is:
    - test cases that test both DateTime and DateTimeImmutable - legit to keep
    - date/time form-types and transformers in the Form component - we'd need a separate effort for them, related to #50295
    - `PersistentTokenInterface::getLastUsed(): \DateTime` - separate effort also
    
    Commits
    -------
    
    8b08294b63 Remove unnecessary usages of DateTime
    fabpot committed Jun 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7a0d207 View commit details

Commits on Jul 25, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    686a2f5 View commit details

Commits on Jul 31, 2023

  1. Merge branch '6.3' into 6.4

    * 6.3:
      Fix symfony/deprecation-contracts require
      Remove 6.2 from the list of potential branch targets
      Bump Symfony version to 6.3.3
      Update VERSION for 6.3.2
      Update CHANGELOG for 6.3.2
      Bump Symfony version to 5.4.27
      Update VERSION for 5.4.26
      Update CONTRIBUTORS for 5.4.26
      Update CHANGELOG for 5.4.26
      Fix update slack messages documentation
      Fix symfony/deprecation-contracts require
      [Scheduler] Postpone schedule creation
    nicolas-grekas committed Jul 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fd86341 View commit details

Commits on Sep 25, 2023

  1. Minor CS fixes

    nicolas-grekas committed Sep 25, 2023
    Copy the full SHA
    63b478d View commit details

Commits on Oct 27, 2023

  1. Copy the full SHA
    4dcbd69 View commit details

Commits on Oct 28, 2023

  1. Merge branch '6.3' into 6.4

    * 6.3:
      Fix passing null to trim()
    fabpot committed Oct 28, 2023
    Copy the full SHA
    245813a View commit details
  2. minor #52334 [Yaml]  Inline::parse(null) not allowed (GromNaN)

    This PR was merged into the 6.4 branch.
    
    Discussion
    ----------
    
    [Yaml]  `Inline::parse(null)` not allowed
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.4
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Issues        | Fix #52326
    | License       | MIT
    
    It's only called with string values in the Yaml component.
    
    This class is internal. It allows to change the arg type.
    The arg type was documented as `string`.
    symfony/symfony@7b1715b#diff-1d97fcfb29e99f0200c3952e9a1a11c4b9f825c0f5ad4d4515b9b1805f8c988eR47
    
    Commits
    -------
    
    834e0ab6e2 Passing null to Inline::parse is not allowed
    fabpot committed Oct 28, 2023
    Copy the full SHA
    fa5302a View commit details
  3. [Yaml] Remove dead code

    fabpot committed Oct 28, 2023
    Copy the full SHA
    9610b8b View commit details

Commits on Oct 29, 2023

  1. Fix wrong yaml parse null test

    Incomplete revert in eaff34a following b2e372d and bb5d49c
    GromNaN committed Oct 29, 2023
    Copy the full SHA
    96d3ed6 View commit details

Commits on Nov 6, 2023

  1. Merge branch '6.3' into 6.4

    * 6.3:
      fix tests
      Remove full DSNs from exception messages
      [Yaml] Fix uid binary parsing
      Disable the "Copy as cURL" button when the debug info are disabled
      [HttpClient] Replace `escapeshellarg` to prevent overpassing `ARG_MAX`
      [HttpKernel] Preventing error 500 when function putenv is disabled
      [PasswordHasher][Tests] Do not invoke methods with additional arguments in tests
      remove invalid group
      Fix block scalar array parsing
    xabbuh committed Nov 6, 2023
    Copy the full SHA
    4f9237a View commit details
Showing with 7 additions and 12 deletions.
  1. +2 −6 Inline.php
  2. +1 −1 Tests/Command/LintCommandTest.php
  3. +3 −4 Tests/InlineTest.php
  4. +1 −1 composer.json
8 changes: 2 additions & 6 deletions Inline.php
Original file line number Diff line number Diff line change
@@ -55,12 +55,8 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
*
* @throws ParseException
*/
public static function parse(string $value = null, int $flags = 0, array &$references = []): mixed
public static function parse(string $value, int $flags = 0, array &$references = []): mixed
{
if (null === $value) {
return '';
}

self::initialize($flags);

$value = trim($value);
@@ -161,7 +157,7 @@ public static function dump(mixed $value, int $flags = 0): string
} elseif (floor($value) == $value && $repr == $value) {
// Preserve float data type since storing a whole number will result in integer value.
if (!str_contains($repr, 'E')) {
$repr = $repr.'.0';
$repr .= '.0';
}
}
} else {
2 changes: 1 addition & 1 deletion Tests/Command/LintCommandTest.php
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
*/
class LintCommandTest extends TestCase
{
private $files;
private array $files;

public function testLintCorrectFile()
{
7 changes: 3 additions & 4 deletions Tests/InlineTest.php
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ protected function setUp(): void
/**
* @dataProvider getTestsForParse
*/
public function testParse($yaml, $value, $flags = 0)
public function testParse(string $yaml, $value, $flags = 0)
{
$this->assertSame($value, Inline::parse($yaml, $flags), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml));
}
@@ -318,7 +318,6 @@ public static function getTestsForParse()
{
return [
['', ''],
[null, ''],
['null', null],
['false', false],
['true', true],
@@ -578,7 +577,7 @@ public function testParseTimestampAsUnixTimestampByDefault(string $yaml, int $ye
*/
public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int $month, int $day, int $hour, int $minute, int $second, int $microsecond, string $timezone)
{
$expected = (new \DateTime($yaml))
$expected = (new \DateTimeImmutable($yaml))
->setTimeZone(new \DateTimeZone('UTC'))
->setDate($year, $month, $day)
->setTime($hour, $minute, $second, $microsecond);
@@ -603,7 +602,7 @@ public static function getTimestampTests(): array
*/
public function testParseNestedTimestampListAsDateTimeObject(string $yaml, int $year, int $month, int $day, int $hour, int $minute, int $second, int $microsecond)
{
$expected = (new \DateTime($yaml))
$expected = (new \DateTimeImmutable($yaml))
->setTimeZone(new \DateTimeZone('UTC'))
->setDate($year, $month, $day)
->setTime($hour, $minute, $second, $microsecond);
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
"symfony/console": "^5.4|^6.0"
"symfony/console": "^5.4|^6.0|^7.0"
},
"conflict": {
"symfony/console": "<5.4"