Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnert committed Feb 1, 2021
1 parent 1421973 commit c6770ba
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 41 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

## Bugfixes

* Fixed import-cli-simple#258
* Fixed techdivision/import#209
* Fixed techdivision/import-cli-simple#258
* Fixed #PAC-318: Serialization exception when using a custom database configuration
* Fixed #PAC-320: Children of deleted category are not removed
* Fixed #PAC-335: Properly support slashes in category names

## Features

Expand Down
59 changes: 59 additions & 0 deletions UPGRADE-4.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,65 @@

Up from version `4.0.0-alpha8` the default import path has been changed from `var/importexport` to `var/pacemaker/import`.

## Symfony DI Configuration

### techdivision/import-category

Up from version `4.0.0-alpha8` a new observer with the DI ID `import_category.observer.normalize.path` has been introduced
that is necessary to take care that the category paths are normalized according to the CSV standard. For example, a
valid category path can look like `"Default Category/Example Path"`. For several purpses, it is necessary that the path
internally will be converted to `"""Default Category""/""Excample Path"""` which this observer takes care for.

The following composite observer has been customized

* `import_category.observer.composite.base.delete`
* `import_category.observer.composite.create.replace`
* `import_category.observer.composite.add_update`
* `import_category.observer.composite.base.validate`

For example have a look at the file `symfony/Resources/config/services.xml` where the composite observer for deleting
categories has been exendend from

```
<service id="import_category.observer.composite.base.delete" class="TechDivision\Import\Observers\GenericCompositeObserver">
<call method="addObserver">
<argument id="import_category.observer.clear.url.rewrite" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.category" type="service"/>
</call>
</service>
```

to

```
<service id="import_category.observer.composite.base.delete" class="TechDivision\Import\Observers\GenericCompositeObserver">
<call method="addObserver">
<argument id="import_category.observer.normalize.path" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.url.rewrite" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.category" type="service"/>
</call>
</service>
```

> So do *NOT* forget, if you've a custom Symfony DI configuration in your project, to prepend the observer to your
> configuration. Also keep in mind, that we/you heavily use the composite observers which also needs to be customized.
### techdivision/import-category-ee

Up from version `4.0.0-alpha8` and according to the changes in the `techdivision/import-category` library,
additionally the Symfony DI configuration of the following composite observers has been extendend with
the observer `import_category.observer.normalize.path`.

* `import_category_ee.observer.composite.base.delete`
* `import_category_ee.observer.composite.create.replace`
* `import_category_ee.observer.composite.add_update`

## New Functionality

### Interface for Hook aware Observers
Expand Down
80 changes: 40 additions & 40 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c6770ba

Please sign in to comment.