Skip to content

Conversation

baspeeters
Copy link
Contributor

This PR fixes the failing Travis CI build stage. Running builds that have succeeded in the past cause them to fail when ran again. The problem consisted of 2 parts (kept 2 commits because different tickets, but same purpose of fixing build 🤷‍♂️).

Problem 1: A namespacing error (#166)

Example build: https://travis-ci.org/api-platform/schema-generator/jobs/541147735

The dependencies aren't locked down very strict and a composer update was done before this travis stage was ran. This caused the dependencies for this stage to be updated beyond the lock file. Changing the command from update to install solved this.

Problem 2: Whitespace in e2e test files (#167)

Because of problem 1, the compile script never reached the point where it tests to diff against the produced files in tests/e2e/. Because the tests had been failing for some time, something changed which makes the files not match with the produced files anymore (but it's only a space):

[warning] The property "address" (type "Person") has several types. Using the first one ("PostalAddress") or possible options("PostalAddress", "Text").
+ diff tests/e2e/src/AppBundle/Entity/Person.php tmp/AppBundle/Entity/Person.php
34c34
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
42c42
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
50c50
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
58c58
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
74c74
<      * @ORM\Column(type="date", nullable=true)
---
>      * @ORM\Column(type="date",nullable=true)
83c83
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
91c91
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
100c100
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
109c109
<      * @ORM\Column(type="text", nullable=true)
---
>      * @ORM\Column(type="text",nullable=true)
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #166, #167
License MIT
Doc PR

Travis CI build for php 7.2 with `coverage=1 lint=1` was failing when executing
`./bin/compile` at the end of the script stage.

Before this command, `composer update` is called which updates the lock
file with dependencies in way which causes namespace errors.
Builds were still failing after 0411921
because since they started failing a while back, the class files for the
2e2 tests stopped matching the produced classes:

The CI process never reached the point where they were tested.  This commit
adapts the files accordingly.
@baspeeters
Copy link
Contributor Author

🔔 @dunglas, @sroze, @theofidry, @soyuka

@dunglas dunglas merged commit ce35add into api-platform:master Jul 21, 2019
@dunglas
Copy link
Member

dunglas commented Jul 21, 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