Skip to content

Commit

Permalink
Fix getSetMethodNormalizer to correctly ignore the attributes specifi…
Browse files Browse the repository at this point in the history
…ed in "ignored_attributes"
  • Loading branch information
Emmanuel BORGES committed Mar 6, 2019
1 parent e74e0f9 commit 24f77a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions UPGRADE-4.2.md
Expand Up @@ -179,6 +179,7 @@ FrameworkBundle
* The `Templating\Helper\TranslatorHelper::transChoice()` method has been deprecated, use the `trans()` one instead with a `%count%` parameter.
* Deprecated support for legacy translations directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/`, use `translations/` instead.
* Support for the legacy directory structure in `translation:update` and `debug:translation` commands has been deprecated.
* The `GetSetMethodNormalizer` class correctly ignores the attributes specified in "ignored_attributes".

HttpFoundation
--------------
Expand Down
Expand Up @@ -110,7 +110,7 @@ protected function extractAttributes($object, $format = null, array $context = [

$attributeName = lcfirst(substr($method->name, 0 === strpos($method->name, 'is') ? 2 : 3));

if ($this->isAllowedAttribute($object, $attributeName)) {
if ($this->isAllowedAttribute($object, $attributeName, null, $context)) {
$attributes[] = $attributeName;
}
}
Expand Down

0 comments on commit 24f77a0

Please sign in to comment.