Skip to content

Deduplicate model properties and Field/Join from entity#912

Merged
mvorisek merged 47 commits intodevelopfrom
stricter_model_vs_entity
Nov 11, 2021
Merged

Deduplicate model properties and Field/Join from entity#912
mvorisek merged 47 commits intodevelopfrom
stricter_model_vs_entity

Conversation

@mvorisek
Copy link
Copy Markdown
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 from baf5c58 to 4ba849c Compare November 6, 2021 10:34
@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
@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch from 9f185d5 to 6943787 Compare November 9, 2021 15:55
@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch from dc7f6d8 to a38bd52 Compare November 9, 2021 17:37
@mvorisek mvorisek mentioned this pull request Nov 9, 2021
public function toString($value = null): string
public function toString($value): string
{
$value = ($value === null /* why not func_num_args() === 1 */ ? $this->get() : $this->normalize($value));
Copy link
Copy Markdown
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...

@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch from 8180871 to 92694db Compare November 10, 2021 12:28
@atk4 atk4 deleted a comment from DarkSide666 Nov 10, 2021
@mvorisek mvorisek force-pushed the stricter_model_vs_entity branch from b367fe8 to b155701 Compare November 10, 2021 17:15
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

2 participants