Skip to content

Add block visitors for new content storage #7877

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

Merged
merged 4 commits into from
May 16, 2025

Conversation

draconivis
Copy link
Member

Q A
Bug fix? no yes
New feature? no yes
BC breaks? no yes
Deprecations? no yes
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Why?

Example Usage

To Do

  • Create a documentation PR
  • Add breaking changes to UPGRADE.md

@draconivis draconivis self-assigned this Apr 4, 2025
@draconivis draconivis force-pushed the feature/add-BlockVisitor branch from 3c90555 to 32fbd42 Compare April 4, 2025 11:42
@draconivis draconivis force-pushed the feature/add-BlockVisitor branch 3 times, most recently from 8e8f0c0 to 4dec2aa Compare April 16, 2025 14:17
@draconivis draconivis force-pushed the feature/add-BlockVisitor branch from 4dec2aa to 4a57c85 Compare April 17, 2025 08:01
@draconivis draconivis marked this pull request as ready for review April 17, 2025 08:02
@draconivis draconivis force-pushed the feature/add-BlockVisitor branch from 4a57c85 to 06587be Compare April 23, 2025 14:59
@alexander-schranz alexander-schranz changed the title Feature/add block visitor Add block visitors for new content storage May 8, 2025
@alexander-schranz alexander-schranz added the Feature New functionality not yet included in Sulu label May 8, 2025
inject blockvisitors to resolver; configure the visitors correctly

remove some files

Rename HiddenBlockVisitory.php to HiddenBlockVisitor.php

move target block visitor

rename old target block visitor and adjust service definition

rename old block visitors; linter fixes

fix TargetGroupBlockVisitorTest

add tests

linter fixes
@draconivis draconivis force-pushed the feature/add-BlockVisitor branch from 6062063 to b5df70d Compare May 15, 2025 06:37
Copy link
Member

@alexander-schranz alexander-schranz left a comment

Choose a reason for hiding this comment

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

We just need the new once which are used in the new block property resolver. The old aslong as the PHPCR content types are still there need to stay untouched (or atleast renamed to Deprecated if you have naming conflicts) as they are stilled used by the content types currently. We will remove them in an own PR when removing the content type interface.

@@ -9,20 +9,23 @@
* with this source code in the file LICENSE.
*/

namespace Sulu\Component\Content\Types\Block;
Copy link
Member

@alexander-schranz alexander-schranz May 15, 2025

Choose a reason for hiding this comment

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

this should stay based on the old interface as used by the old block content type. So this are 2 seperated services. if you have service name conflicts prefix this old one with sulu_page.deprecated_segement_block_visitor

Copy link
Member Author

@draconivis draconivis May 15, 2025

Choose a reason for hiding this comment

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

i have kept both versions, just that i used Old instead of Deprecated for most of them. I can change that, but else i am not sure if i follow correctly on what the problem is, since old and new visitors are there

Copy link
Member

@alexander-schranz alexander-schranz May 15, 2025

Choose a reason for hiding this comment

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

@draconivis looks like they are not longer injected into the block content type correctly because are not longer tagged. add the tag with the old prefix. PS: would only rename the class if they are in the same namespace else keep the old name

Copy link
Member Author

Choose a reason for hiding this comment

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

@alexander-schranz i reverted some of the changes and added a tag to the deprecated visitors again.

@draconivis draconivis force-pushed the feature/add-BlockVisitor branch from 94f1148 to 005bb01 Compare May 16, 2025 06:33
@alexander-schranz alexander-schranz merged commit ecd881f into sulu:3.0 May 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants