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

TASK: Mark Node constructor internal #4318

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

bwaidelich
Copy link
Member

@bwaidelich bwaidelich commented Jun 9, 2023

No description provided.

@bwaidelich bwaidelich merged commit 4aab3e3 into 9.0 Jun 16, 2023
@bwaidelich bwaidelich deleted the task/4317-mark-node-constructor-internal branch June 16, 2023 14:31
@mhsdesign
Copy link
Member

Copied originally from #4317

While discussing how to stub nodes in unit test in slack: https://neos-project.slack.com/archives/C3MCBK6S2/p1686294507655429

@bwaidelich wrote in slack

Also this way the test is dependent on the internal constructor of the Node which is most likely to change in the future

Which got me thinking, that the constructor is actually not @internal and seems to be @api due to the class wide declaration above.

* @api
*/
final class Node
{
public function __construct(

Also it is true that the constructor is changed over time last change was with: #4102 (which was not considered breaking api wise, even if the constructor changed)

bwaidelich added a commit that referenced this pull request Oct 31, 2023
This is a follow-up to #4318 that makes the constructor
of the `Node` read model private in favor of a new static
`create` constructor.

Background:

Adding the `@internal` annotation to the constructor marked all
promoted properties internal, too.
Additionally, a named constructor gives us more options to adjust
this class without breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants