Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Version 18.3.1

## Bugfixes

* Fix `AttributeObserverTrait::mergeEntity()`: columns with a default value (`default-values`) were never emptied by `clean-up-empty-columns`, because the attribute code was looked up in the list of header positions
* Fix fatal error on `symfony/dependency-injection` 6.4 (e.g. Magento 2.4.7) since 18.2.0: `XmlFileLoader` is now an alias for the loader shipped with Symfony (6.4 to 7.x) and only falls back to the copy of the Symfony 7 loader, now named `Symfony7XmlFileLoader`, where Symfony does not ship one (Symfony 8)

# Version 18.3.0

## Features
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"league/event": "^2.2",
"ramsey/uuid": "^4.2|^4.7",
"symfony/mailer": "^5.4|^6.4|^7.4",
"symfony/dependency-injection": "^6.4|^7.0|^8.0",
"laminas/laminas-filter": "^2.31",
"techdivision/import-dbal": "^2.1",
"techdivision/import-dbal-collection": "^2.2",
Expand Down
6 changes: 4 additions & 2 deletions src/Observers/AttributeObserverTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,11 @@ protected function mergeEntity(array $entity, array $attr, $changeSetName = null
// if the value is empty AND it is IN the array with default column values
// BUT it is NOT in the array with columns we want to clean-up the default
// column value has to be removed, because we do NOT want to override the
// value existing in the database
// value existing in the database. The clean-up column keys are the header
// positions of the columns, so the attribute code has to be translated first
if (array_key_exists($this->attributeCode, $this->getDefaultColumnValues()) &&
array_key_exists($this->attributeCode, $this->getCleanUpEmptyColumnKeys()) === false
!($this->hasHeader($this->attributeCode) &&
in_array($this->getHeader($this->attributeCode), $this->getCleanUpEmptyColumnKeys() ?? [], true))
) {
// remove the value from the array with the column values, because
// this is the default value from the database and it should NOT
Expand Down
Loading
Loading