Skip to content

Adds Doctrine's mapping validation on Travis. #718

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

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Adds Doctrine's mapping validation on Travis. #718

merged 1 commit into from
Dec 4, 2017

Conversation

phpeek
Copy link
Contributor

@phpeek phpeek commented Dec 4, 2017

Runs doctrine:schema:validate command with database sync skipping and
no interaction flags.

This is what I usually setup in CI for my projects to avoid common Doctrine's mapping errors e.g. missing inversedBy properties.

Runs `doctrine:schema:validate` command with database sync skipping and
no interaction flags.
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

I like this a lot! Really useful. Thanks for contributing it.

@stof
Copy link
Member

stof commented Dec 4, 2017

Note that for my work project, I even remove the --skip-sync option, so that forgetting to generate a DB migration (or making a mistake in it) also makes it red.

@javiereguiluz
Copy link
Member

@stof would you recommend to remove --skip-sync here too? Thanks!

@stof
Copy link
Member

stof commented Dec 4, 2017

it depends how you handle schema updates in the project.
Looking at the Travis config, it does not seem to be creating the schema from scratch itself with doctrine:schema:create or doctrine:schema:update, so it might make sense to ensure the sync too, if the update of the schema requires an action by the contributor.

@javiereguiluz
Copy link
Member

OK. Let's merge this one as is, and when we start working with migrations, we can tweak the command. Thanks!

@javiereguiluz javiereguiluz merged commit 2faf341 into symfony:master Dec 4, 2017
javiereguiluz added a commit that referenced this pull request Dec 4, 2017
This PR was merged into the master branch.

Discussion
----------

Adds Doctrine's mapping validation on Travis.

Runs `doctrine:schema:validate` command with database sync skipping and
no interaction flags.

This is what I usually setup in CI for my projects to avoid common Doctrine's mapping errors e.g. missing `inversedBy` properties.

Commits
-------

2faf341 Adds Doctrine's mapping validation on Travis.
@phpeek phpeek deleted the validating-doctrine-mapping-in-travis branch December 5, 2017 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants