craue / CraueFormFlowBundle

Multi-step forms for your Symfony project.
MIT License
736 stars 118 forks source link

Update travis.yml with PHP 7.1 #290

Closed DonCallisto closed 7 years ago

DonCallisto commented 7 years ago

As PHP 7.1 is out since December (6 months) I think is useful to test the codebase against it.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.751% when pulling 3deb2c7ab679c6784e0f9509ac99acbb60d2427e on DonCallisto:patch-1 into 03bd5c81eedd0ce4168a8baca8d14f3597b46965 on craue:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.751% when pulling 3deb2c7ab679c6784e0f9509ac99acbb60d2427e on DonCallisto:patch-1 into 03bd5c81eedd0ce4168a8baca8d14f3597b46965 on craue:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.751% when pulling 3deb2c7ab679c6784e0f9509ac99acbb60d2427e on DonCallisto:patch-1 into 03bd5c81eedd0ce4168a8baca8d14f3597b46965 on craue:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.751% when pulling 3deb2c7ab679c6784e0f9509ac99acbb60d2427e on DonCallisto:patch-1 into 03bd5c81eedd0ce4168a8baca8d14f3597b46965 on craue:master.

DonCallisto commented 7 years ago

There are two issues

One related to ubuntu and HHVM

HHVM is no longer supported on Ubuntu Precise. Please consider using Trusty with dist: trusty.

And the second about a warning that was suppressed in PHP < 7.1 and now is not. We can silence that notice (I don't like it) or modify php.ini to make test pass.

Let me know how should I move on, if you're interested in 7.1

craue commented 7 years ago

I've just fixed the Travis config for HHVM in the 2.1.x branch.

Would you target this PR at 2.1.x as well (with a proper commit message)?

The notice raised by the tempnam call would be a separate issue for the master branch then. How to handle only this notice to not make the test fail? Silencing indeed wouldn't be nice.

DonCallisto commented 7 years ago

I'll do it in next hours (or during the week end)

craue commented 7 years ago

How about just silencing the call in the test?

diff --git a/Tests/Storage/SerializableFileTest.php b/Tests/Storage/SerializableFileTest.php
index 524abbe..934028b 100644
--- a/Tests/Storage/SerializableFileTest.php
+++ b/Tests/Storage/SerializableFileTest.php
@@ -74,7 +74,7 @@

    public function testSerialization_customTempDir_nonexistent() {
        $serializableFile = new SerializableFile(new UploadedFile(__FILE__, 'my.txt', null, null, null, true));
-       $processedUploadedFile = $serializableFile->getAsFile('xyz:/');
+       $processedUploadedFile = @$serializableFile->getAsFile('xyz:/');

        $this->assertEquals(realpath(sys_get_temp_dir()), realpath($processedUploadedFile->getPath()));
    }

I could do that after merging 2.1.x (including your PHP 7.1 PR) into master.

DonCallisto commented 7 years ago

That's a way of doing it. Other way would be to put (dynamically through travis file) something in php.ini to set the folder and explicitly write it down in CHANGELOG. Don't know what's the best. Any thoughts?

craue commented 7 years ago

That test is explicitly about using a nonexistent directory, so I'll just silence the test call.

DonCallisto commented 7 years ago

@craue sorry I didn't noticed you'll showing test code. Yes, that's the right way.

DonCallisto commented 7 years ago

This is new PR https://github.com/craue/CraueFormFlowBundle/pull/291

craue commented 7 years ago

For reference, I've just changed the base branch to master again.