Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4: (22 commits)
  fix merge
  [AssetMapper] Check asset/vendor directory is writable
  detect wrong e-mail validation modes
  detect wrong usages of minMessage/maxMessage in options
  [Security] Remove workflow from empty folder
  read form values using the chain data accessor
  [Validator] Review Bulgarian (bg) translation
  Reviewed italian translation
  Fix french translation
  call substr() with integer offsets
  [Finder] Also consider .git inside the basedir of in() directory
  review: FR translation
  [Serializer] Add AbstractNormalizerContextBuilder::defaultConstructorArguments()
  Update spanish and catalan translations
  Update AbstractSchemaListener.php to adjust more database params
  Updated id=113 Arabic translation.
  #53771 Updated validator Lithuanian translations
  review: translation RU
  [PropertyInfo] Fix PHPStan properties type in trait
  explicitly cast boolean SSL stream options
  ...
  • Loading branch information
xabbuh committed Apr 28, 2024
2 parents e21b77e + 73820ab commit 08f0c51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions Context/Normalizer/AbstractNormalizerContextBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,25 @@ public function withAllowExtraAttributes(?bool $allowExtraAttributes): static
}

/**
* Configures an hashmap of classes containing hashmaps of constructor argument => default value.
* Configures a hashmap of classes containing hashmaps of constructor argument => default value.
*
* The names need to match the parameter names in the constructor arguments.
*
* Eg: [Foo::class => ['foo' => true, 'bar' => 0]]
*
* @param array<class-string, array<string, mixed>>|null $defaultContructorArguments
* @param array<class-string, array<string, mixed>>|null $defaultConstructorArguments
*/
public function withDefaultConstructorArguments(?array $defaultConstructorArguments): static
{
return $this->with(AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS, $defaultConstructorArguments);
}

/**
* Deprecated in Symfony 7.1, use withDefaultConstructorArguments() instead.
*/
public function withDefaultContructorArguments(?array $defaultContructorArguments): static
{
return $this->with(AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS, $defaultContructorArguments);
return self::withDefaultConstructorArguments($defaultContructorArguments);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testWithers(array $values)
->withGroups($values[AbstractNormalizer::GROUPS])
->withAttributes($values[AbstractNormalizer::ATTRIBUTES])
->withAllowExtraAttributes($values[AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES])
->withDefaultContructorArguments($values[AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS])
->withDefaultConstructorArguments($values[AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS])
->withCallbacks($values[AbstractNormalizer::CALLBACKS])
->withCircularReferenceHandler($values[AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER])
->withIgnoredAttributes($values[AbstractNormalizer::IGNORED_ATTRIBUTES])
Expand Down

0 comments on commit 08f0c51

Please sign in to comment.