Skip to content

Commit

Permalink
Merge pull request #246 from collective/more_specific_zcml
Browse files Browse the repository at this point in the history
Make zcml conditions more specific
  • Loading branch information
pbauer authored Jul 17, 2024
2 parents 6f8834b + 012ab08 commit 2ffe4a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Changelog

- Add and run a black version, that is compatible with Python 2.
[pgrunewald]
- Make zcml conditions more specific so that migration aliases don't trigger them
[reinhardt]


1.12 (2024-03-08)
Expand Down
26 changes: 17 additions & 9 deletions src/collective/exportimport/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -101,30 +101,38 @@
/>

<!-- Serializers -->
<adapter zcml:condition="installed Products.Archetypes"
<!--
We check for a subpackage of Products.Archetypes to avoid false positives
due to code aliases in migration code
-->
<adapter zcml:condition="installed Products.Archetypes.atapi"
factory=".serializer.ATFileFieldSerializer" />
<adapter zcml:condition="installed Products.Archetypes"
<adapter zcml:condition="installed Products.Archetypes.atapi"
factory=".serializer.ATImageFieldSerializer" />
<adapter zcml:condition="installed Products.Archetypes"
<adapter zcml:condition="installed Products.Archetypes.atapi"
factory=".serializer.ATImageFieldSerializerForBlobPaths" />

<adapter zcml:condition="installed Products.TALESField"
factory=".serializer.ATTalesFieldSerializer" />

<adapter zcml:condition="installed Products.Archetypes"
<adapter zcml:condition="installed Products.Archetypes.atapi"
factory=".serializer.ATTextFieldSerializer" />
<configure zcml:condition="installed Products.Archetypes">
<configure zcml:condition="installed Products.Archetypes.atapi">
<adapter zcml:condition="installed plone.app.contenttypes"
factory=".serializer.SerializeTopicToJson" />
</configure>

<adapter zcml:condition="installed plone.app.blob"
<!--
We check for a subpackage of plone.app.blob to avoid false positives
due to code aliases in migration code
-->
<adapter zcml:condition="installed plone.app.blob.config"
factory=".serializer.ATFileFieldSerializerWithBlobs" />
<adapter zcml:condition="installed plone.app.blob"
<adapter zcml:condition="installed plone.app.blob.config"
factory=".serializer.ATImageFieldSerializerWithBlobs" />
<adapter zcml:condition="installed plone.app.blob"
<adapter zcml:condition="installed plone.app.blob.config"
factory=".serializer.ATFileFieldSerializerWithBlobPaths" />
<adapter zcml:condition="installed plone.app.blob"
<adapter zcml:condition="installed plone.app.blob.config"
factory=".serializer.ATImageFieldSerializerWithBlobPaths" />

<!-- Serializers -->
Expand Down

0 comments on commit 2ffe4a5

Please sign in to comment.