Skip to content

BUGFIX: Simplify UpdateWorkspaceInfo - #4136

Merged
kitsunet merged 1 commit into
8.3from
bugfix/update-workspace-info-edge-cases
Jun 10, 2026
Merged

kitsunet merged 1 commit into
8.3from
bugfix/update-workspace-info-edge-cases

Conversation

@kitsunet

@kitsunet kitsunet commented Jun 9, 2026

Copy link
Copy Markdown
Member

Refactor UpdateWorkspaceInfo to accept the workspace via constructor instead of a setter, eliminating the possibility of using the class without a workspace set.

Extract the user workspace name directly from context paths on publish and discard, avoiding an unnecessary node lookup that could fail when the node no longer exists in context.

Add a guard to prevent accidentally passing a base workspace to UpdateWorkspaceInfo.

@github-actions github-actions Bot added Bug Label to mark the change as bugfix 8.3 labels Jun 9, 2026
@kitsunet
kitsunet requested a review from kdambekalns June 9, 2026 09:05
Comment thread Classes/Domain/Model/Feedback/Operations/UpdateWorkspaceInfo.php
Refactor `UpdateWorkspaceInfo` to accept the workspace via
constructor instead of a setter, eliminating the possibility
of using the class without a workspace set.

Extract the user workspace name directly from context paths
on publish and discard, avoiding an unnecessary node lookup
that could fail when the node no longer exists in context.

Add a guard to prevent accidentally passing a base workspace
to `UpdateWorkspaceInfo`.
@kitsunet
kitsunet force-pushed the bugfix/update-workspace-info-edge-cases branch from 599055a to 9b59554 Compare June 9, 2026 09:46
*
* @param array<int,string> $contextPaths
*/
protected function extractUserWorkspaceNameFromContextPaths(array $contextPaths): string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

because its a bugfix its oke i think^^ this will find no application in Neos 9 because we dont have user- anymore and also i hope that we dont need it? Can you please also take care of upmerging this? The workspace in constructor makes also sense for 9.0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

exactly!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will see on upmerge how this is handled in 9, but hopefully better already :D

@kitsunet
kitsunet merged commit dee1c2d into 8.3 Jun 10, 2026
8 of 9 checks passed
@kitsunet
kitsunet deleted the bugfix/update-workspace-info-edge-cases branch June 10, 2026 07:39
@dlubitz

dlubitz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

FYI: This is a breaking change (for 8.3+) with adding a mandatory parameter to UpdateWorkspaceInfo constructor.
dee1c2d#r198391330

@mhsdesign

Copy link
Copy Markdown
Member

The whole PHP codebase of the Neos Ui is internal. It was unfortunately never declared before Neos 9.0 and #3704

What was your usecase?

@dlubitz

dlubitz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Notify the UI about changes made during translation of nodes.

@dlubitz

dlubitz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Same issue was here: sitegeist/Sitegeist.LostInTranslation#104

@kitsunet

Copy link
Copy Markdown
Member Author

Right, I think that is unfortunate. That said, our rule originally was if it's not marked api, it is not meant for public consumption and could change, with narrow exceptions due to long time "habits/customs".

I think as soon as someone starts using stuff externally, it makes sense to request changes in core to make it API or suggest a sensible API. This code was always brittle.

SORRY for breaking <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.3 Bug Label to mark the change as bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants