Skip to content

Conversation

baspeeters
Copy link
Contributor

@baspeeters baspeeters commented Aug 9, 2019

Problem

  1. Tests for GenerateTypeCommand were failing
  2. Cause was a space missing after the comma between @ORM\Column parameters:

Actual:

* @ORM\Column(type="text",nullable=true)

Expected:

* @ORM\Column(type="text", nullable=true)

Research

  1. I had wrongly only adapted the test to this (never a good idea) in Remove an expected annotation space in test #169 (closed)
  2. @soyuka pointed out correctly that the fixtures in core did have the space
  3. Started digging through the the git log....
  4. Turns out the space was had actually been removed in the ORM annotations generator fc74945 making the produced files not in line with the core anymore

Solution

  1. Re-added the space to the annotations generator, just like how it worked before. This way I didn't "fix" by adapting the tests, and it should be an actual fix now.
  2. Added the space in expected e2e entities file which means these are now in line with the fixtures in core, so imho they should be with the space.

@baspeeters baspeeters changed the title ORM Column annotation: space+comma between params Fix tests: Put space back after comma between ORM annotation properties Aug 9, 2019
@dunglas dunglas merged commit 2cbd448 into api-platform:master Oct 4, 2019
@dunglas
Copy link
Member

dunglas commented Oct 4, 2019

Thanks @baspeeters!!

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

Successfully merging this pull request may close these issues.

2 participants