Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix wrong type in phpdoc of Doctrine\ORM\Id\AbstractIdGenerator#generate()#7190

Merged
Ocramius merged 2 commits into
doctrine:2.6from
Tobion:patch-1
Apr 13, 2018
Merged

Fix wrong type in phpdoc of Doctrine\ORM\Id\AbstractIdGenerator#generate()#7190
Ocramius merged 2 commits into
doctrine:2.6from
Tobion:patch-1

Conversation

@Tobion
Copy link
Copy Markdown
Contributor

@Tobion Tobion commented Apr 10, 2018

\Doctrine\ORM\Mapping\Entity is the annotation class which is not correct. The entity object itself is meant here as tests also assume see https://github.com/doctrine/doctrine2/blob/2.6/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php#L28

Found this when running phpstan on our code that used a custom generator.

\Doctrine\ORM\Mapping\Entity is the annotation class which is not correct. The entity object itself is meant here as tests also assume see https://github.com/doctrine/doctrine2/blob/2.6/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php#L28

Found this when running phpstan on our code that used a custom generator.
@Ocramius
Copy link
Copy Markdown
Member

@Tobion is this still occurring in master?

@Tobion
Copy link
Copy Markdown
Contributor Author

Tobion commented Apr 10, 2018

I don't find the ID generators in master. Did they get extracted somewhere?

@Tobion
Copy link
Copy Markdown
Contributor Author

Tobion commented Apr 10, 2018

It's fixed in master https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Sequencing/Generator.php#L16

The namespace got changed. This breaking change seems to be missing in the uprade file.

@Ocramius Ocramius added this to the 2.6.2 milestone Apr 13, 2018
@Ocramius Ocramius self-assigned this Apr 13, 2018
Copy link
Copy Markdown
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.

LGTM! Thanks @Tobion

@Ocramius Ocramius merged commit 01f89a8 into doctrine:2.6 Apr 13, 2018
@Ocramius Ocramius changed the title Fix wrong type in phpdoc of AbstractIdGenerator Fix wrong type in phpdoc of Doctrine\ORM\Id\AbstractIdGenerator#generate() Apr 13, 2018
@Tobion Tobion deleted the patch-1 branch April 13, 2018 16:15
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