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

OP-320: Add possibility to select section type and fill up collection of items of this type #500

Merged
merged 25 commits into from
Jun 25, 2024

Conversation

jkindly
Copy link

@jkindly jkindly commented Jun 19, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets OP-320, OP-312
License MIT

spec/Assigner/CollectionsAssignerSpec.php Show resolved Hide resolved
spec/Assigner/CollectionsAssignerSpec.php Outdated Show resolved Hide resolved
spec/Importer/BlockImporterSpec.php Outdated Show resolved Hide resolved
spec/Resolver/ImporterCollectionsResolverSpec.php Outdated Show resolved Hide resolved
src/Entity/Block.php Outdated Show resolved Hide resolved
src/Entity/MediableTrait.php Outdated Show resolved Hide resolved
src/Entity/PageableInterface.php Outdated Show resolved Hide resolved
src/Entity/PageableTrait.php Outdated Show resolved Hide resolved
@@ -25,7 +25,7 @@

<field name="publishAt" column="publish_at" type="datetime_immutable" nullable="true"/>

<many-to-many field="sections" target-entity="BitBag\SyliusCmsPlugin\Entity\SectionInterface">
<many-to-many field="collections" target-entity="BitBag\SyliusCmsPlugin\Entity\CollectionInterface">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How doctrine would behave with changing the field name, when we have a table with data? Isn't it safer to use the "sections" column name in all mapping places? The field can stay then as "collections".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't change anything in the database. It is only related to the $collections field in entity, but in the database we have join-column-name: section_id

tests/Integration/Repository/CollectionRepositoryTest.php Outdated Show resolved Hide resolved
Copy link
Member

@senghe senghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some unresolved comments 🖖

@senghe senghe merged commit 9344235 into feature/OP-312-redesign-cms-plugin Jun 25, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants