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

Custom mapping types confuse Doctrine identifying schema changes #6077

Closed
Aerendir opened this issue Oct 7, 2016 · 5 comments
Closed

Custom mapping types confuse Doctrine identifying schema changes #6077

Aerendir opened this issue Oct 7, 2016 · 5 comments
Assignees
Labels

Comments

@Aerendir
Copy link

Aerendir commented Oct 7, 2016

As told in the title, I've created two custom mapping types.

Now, each time I run the schema validation, Doctrine thinks the field that use those custom types have to be updated.

I've described the problem in full details on StackOverflow.

I don't know if this is a fault of mine or a Doctrine's one, so I'm writing this issue.

Thank you.

@Aerendir
Copy link
Author

Aerendir commented Oct 7, 2016

This solved the problem.

Simply by adding this function:

    /**
     * {@inheritdoc}
     */
    public function requiresSQLCommentHint(AbstractPlatform $platform)
    {
        return !parent::requiresSQLCommentHint($platform);
    }

@Aerendir Aerendir closed this as completed Oct 7, 2016
@Ocramius
Copy link
Member

Ocramius commented Oct 7, 2016

Sufficient:

    /**
     * {@inheritdoc}
     */
    public function requiresSQLCommentHint(AbstractPlatform $platform)
    {
        return true;
    }

@Ocramius Ocramius self-assigned this Oct 7, 2016
@Aerendir
Copy link
Author

Aerendir commented Oct 8, 2016

@Ocramius , yes, sufficient... But the editor told me I were not calling the parent method and I don't like alerts. The result is the same.

@Ocramius
Copy link
Member

Ocramius commented Oct 8, 2016

That's a false positive - don't blindly trust the editor.

On 8 Oct 2016 1:16 p.m., "Adamo Crespi" notifications@github.com wrote:

@Ocramius https://github.com/Ocramius , yes, sufficient... But the
editor told me I were not calling the parent method and I don't like
alerts. The result is the same.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#6077 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakCb8L63Qfj2OrnS0jFD2TbynuAkoks5qx3uOgaJpZM4KRN8z
.

@Aerendir
Copy link
Author

Aerendir commented Oct 10, 2016

Eh eh, yes, I know, but anyway it alerts me and, as told, I don't like have superflous alerts. So, if I can"solve" them, I do, so I know what really has to have attention reserved...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants