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

Calling initDefaults breaks data retrieving in develop branch #85

Open
janedbal opened this Issue Apr 13, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@janedbal

janedbal commented Apr 13, 2015

/**
 * @property null|string $firstname
 * @property string $surname
 */
class User extends LeanMapper\Entity {
    protected function initDefaults() {
        $this->firstname = NULL;
    }
}

////////

$user = new User([
    'firstname' => 'Vojtěch',
    'surname' => 'Kohout',
]);

echo $user->firstname; // returns NULL
echo $user->surname;

Tested on a9d83b5, master branch is ok.

@janedbal

This comment has been minimized.

Show comment
Hide comment
@janedbal

janedbal Jul 15, 2015

Commit e4abdef caused this, any chance this will be reverted? Should I send PR?

janedbal commented Jul 15, 2015

Commit e4abdef caused this, any chance this will be reverted? Should I send PR?

@janedbal

This comment has been minimized.

Show comment
Hide comment
@janedbal

janedbal Feb 15, 2016

@Tharos Develop branch is now merged in stable, did you miss this issue?

janedbal commented Feb 15, 2016

@Tharos Develop branch is now merged in stable, did you miss this issue?

@Tharos

This comment has been minimized.

Show comment
Hide comment
@Tharos

Tharos Feb 15, 2016

Owner

Ou, I've missed this…

I'll fix it. But I will have to take a look at changes that broke code since I suppose they had some reason…

Thank you for your notice!

Owner

Tharos commented Feb 15, 2016

Ou, I've missed this…

I'll fix it. But I will have to take a look at changes that broke code since I suppose they had some reason…

Thank you for your notice!

@castamir castamir added the Bug label Feb 15, 2016

@castamir castamir added this to the v3.0 milestone Feb 15, 2016

@castamir castamir self-assigned this Feb 17, 2016

@castamir

This comment has been minimized.

Show comment
Hide comment
@castamir

castamir Feb 26, 2016

Collaborator

@Tharos ping

Collaborator

castamir commented Feb 26, 2016

@Tharos ping

@castamir castamir assigned Tharos and unassigned castamir Feb 29, 2016

@castamir castamir removed this from the v3.0 milestone Feb 29, 2016

@janedbal

This comment has been minimized.

Show comment
Hide comment
@janedbal

janedbal Mar 8, 2016

@castamir So this behaviour has changed in 3.0 and will not be reverted in future releases of 3.x (but there should be big warning about this BC break in release notes) or did you release new stable with this bug intentionally? Anyway, this should be fixed at least in 2.x version.

janedbal commented Mar 8, 2016

@castamir So this behaviour has changed in 3.0 and will not be reverted in future releases of 3.x (but there should be big warning about this BC break in release notes) or did you release new stable with this bug intentionally? Anyway, this should be fixed at least in 2.x version.

@castamir

This comment has been minimized.

Show comment
Hide comment
@castamir

castamir Mar 8, 2016

Collaborator

@janedbal I can revert that commit but without any guarantee, that it won't have any side effect.

I'm not sure if @Tharos will fix this or not, so at least I can revert that change and write a test for your case and then hope that something else won't break as @Tharos mentioned

Collaborator

castamir commented Mar 8, 2016

@janedbal I can revert that commit but without any guarantee, that it won't have any side effect.

I'm not sure if @Tharos will fix this or not, so at least I can revert that change and write a test for your case and then hope that something else won't break as @Tharos mentioned

@Tharos

This comment has been minimized.

Show comment
Hide comment
@Tharos

Tharos Mar 8, 2016

Owner

I keep in mind this issue.

I'm in the middle of leaving my job in Dáme Jídlo (see this post) and I'm really overloaded right now since I have to transfer all my responsibilities…

But after that, this issue is going to be one of the very first things I'll deal with. :)

Owner

Tharos commented Mar 8, 2016

I keep in mind this issue.

I'm in the middle of leaving my job in Dáme Jídlo (see this post) and I'm really overloaded right now since I have to transfer all my responsibilities…

But after that, this issue is going to be one of the very first things I'll deal with. :)

@castamir castamir added this to the Version 3.1 milestone Mar 13, 2016

@castamir

This comment has been minimized.

Show comment
Hide comment
@castamir

castamir May 9, 2016

Collaborator

ping @Tharos

Collaborator

castamir commented May 9, 2016

ping @Tharos

@castamir castamir modified the milestones: Stable 3.2.0, Version 3.1 Jul 13, 2016

@janpecha janpecha removed this from the Version 3.2.0 milestone May 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment