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

Add NotifyPropertyChanged, PropertyChangedListener #18

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

olvlvl
Copy link
Contributor

@olvlvl olvlvl commented Oct 13, 2018

@Majkl578
Copy link
Contributor

Hi,
thanks for working on this! I restarted the crashed build, can you please see & address the CS issues? Thanks.

@Majkl578
Copy link
Contributor

Also please bump the conflict here:

"doctrine/common": "<2.9@dev"

to <2.10@dev.

@Majkl578 Majkl578 added this to the 1.1.0 milestone Oct 13, 2018
@Majkl578 Majkl578 assigned Majkl578 and olvlvl and unassigned Majkl578 Oct 13, 2018
@olvlvl
Copy link
Contributor Author

olvlvl commented Oct 13, 2018

@Majkl578 This time, I ran ./vendor/bin/phpcs before committing :)

@Majkl578
Copy link
Contributor

Nice, thanks. 👍
Do you also want to prepare the reverse operation in doctrine/common (removal + doctrine/persistence bump)? 😎

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

Mostly documentation wording improvements needed. These classes are tricky to describe, so we should be careful about what we're writing in here.

lib/Doctrine/Common/NotifyPropertyChanged.php Outdated Show resolved Hide resolved
namespace Doctrine\Common;

/**
* Contract for classes that are potential listeners of a <tt>NotifyPropertyChanged</tt>
Copy link
Member

Choose a reason for hiding this comment

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

Please use {@see MyClass}

Copy link
Member

Choose a reason for hiding this comment

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

The cyclical dependency of these classes is a bit hard to grasp: can we add another sentence or two that don't involve explaining this with NotifyPropertyChanged in mind?

interface PropertyChangedListener
{
/**
* Notifies the listener of a property change.
Copy link
Member

Choose a reason for hiding this comment

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

"Collect information about a property change"

@Majkl578
Copy link
Contributor

@Ocramius I'd personally prefer doing such changes in separate PR, leaving this only a move stuff from X to Y.

@olvlvl
Copy link
Contributor Author

olvlvl commented Oct 15, 2018

I second that :)

@Ocramius
Copy link
Member

If it's got to be committed, and it counts as an addition, let's use the chance to improve that.

We all know very well that otherwise it just lands in the endless wastelands of "I wish we did also X".

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

I agree with @Majkl578 here. Wording improvements are one thing, but this feature needs comprehensive documentation anyways. This can be copied from the "Change tracking policies" sections of the ORM and MongoDB ODM docs and adapted to be generic, but this functionality isn't something we can easily explain in the docblock of an interface. As such, I'm 👍 merging it as is.

@olvlvl
Copy link
Contributor Author

olvlvl commented Oct 16, 2018

I updated the dock-block with @alcaeus suggestion.

Copy link
Contributor

@Majkl578 Majkl578 left a comment

Choose a reason for hiding this comment

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

LGTM, changes suggested by @Ocramius were addressed, as for the documentation itself let's do it in separate PR (extracting it from ORM/ODM docs).

@olvlvl olvlvl deleted the olvlvl-fix-855 branch October 30, 2018 14:21
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.

4 participants