-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Closing API #1392
Closing API #1392
Conversation
55477c8
to
bb4344b
Compare
bf92787
to
23dcf4c
Compare
tests/Entity/SnapshotManagerTest.php
Outdated
$snapshot = $this->getMockBuilder(SnapshotInterface::class) | ||
->disableOriginalConstructor() | ||
->addMethods(['getId']) | ||
->getMockForAbstractClass(); | ||
// @phpstan-ignore-next-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we need this method, we should add it to the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible on the stable branch...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least @method
should be added https://github.com/sonata-project/SonataPageBundle/blob/3.x/src/Model/SnapshotInterface.php#L28
And a next major can be added in the test to update the code in the test.
But in this special case, I'm not sure we can consider that adding getId
to the interface is a BC-break.
It's called here: https://github.com/sonata-project/SonataPageBundle/blob/3.x/src/Entity/SnapshotManager.php#L91, so the method must be implemented anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the phpstan ignore is not needed anymore i think
Ping @sonata-project/contributors |
Can you take a look @jordisala1991 ? |
@@ -18,6 +18,7 @@ | |||
* | |||
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org> | |||
* | |||
* @method int|null getId() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be int
? or mixed
?
Based on PageInterface
SonataPageBundle/src/Model/PageInterface.php
Lines 27 to 32 in d102ce8
/** | |
* Returns the id. | |
* | |
* @return mixed | |
*/ | |
public function getId(); |
(I don't know if TargetId should be mixed
as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parentId
is a int type at the moment:
* @method void setParentId(?int $parentId) |
If we change this, we should change it everywhere.
Thanks |
Subject
I am targeting this branch, because this is BC.
Changelog