Skip to content

[PropertyAccess] Allow different prefixes than "add" and "remove" #9336

Closed
@webmozart

Description

@webmozart

Currently, adders and removers must be prefixed with "add" and "remove". When applying DDD, this sometimes doesn't make sense, for example:

class Contact
{
    public function addGroup(ContactGroup $group) { }
    public function removeGroup(ContactGroup $group) { }
}

Here it would make much more sense to prefix the methods with "join" and "leave":

class Contact
{
    public function joinGroup(ContactGroup $group) { }
    public function leaveGroup(ContactGroup $group) { }
}

The PropertyAccessor should provide a way to use these methods.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions