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

Deduplicate model properties and Field/Join from entity #912

Merged
merged 47 commits into from
Nov 11, 2021

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented Nov 6, 2021

BC break

Field is no longer bound to an entity, thus methods like Field::get, Field::set requires entity provided as the 1st argument like $field->get($entity)

BC/magic mapping for model properties and methods on entity is provided

@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch 4 times, most recently from 6edde23 to aeaf907 Compare November 6, 2021 14:53
@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch 8 times, most recently from 5da6d19 to 6c98cf4 Compare November 7, 2021 10:54
@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch 5 times, most recently from 4aae31e to d35b8d0 Compare November 7, 2021 15:14
{
$value = ($value === null /* why not func_num_args() === 1 */ ? $this->get() : $this->normalize($value));
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI called in typecast too, no need to call twice...

@atk4 atk4 deleted a comment from DarkSide666 Nov 10, 2021
Copy link
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

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

OK let's go for it in 3.1

@mvorisek mvorisek merged commit 322a232 into develop Nov 11, 2021
@mvorisek mvorisek deleted the stricter_model_vs_entity branch November 11, 2021 21:27
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