Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make zcml conditions more specific #246

Merged
merged 1 commit into from
Jul 17, 2024
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
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
Loading