Skip to content

Fix tests on travis #460

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 2 commits into from
Jul 29, 2019
Merged

Fix tests on travis #460

merged 2 commits into from
Jul 29, 2019

Conversation

andrerom
Copy link
Contributor

@andrerom andrerom commented Jul 29, 2019

Found so far:

  • xenial is now default on travis, this does not seems to work with Varnish 3, stick to trusty for now
    • Bump back to xenial once we can remove Varnish3
  • New version of guzzlehttp/psr7/src/MessageTrait is a bit more strict, and detects invalid parameters used in UserContextTestCase.php

@andrerom
Copy link
Contributor Author

andrerom commented Jul 29, 2019

Unsure why this one fails:

2) FOS\HttpCache\Tests\Unit\SymfonyCache\EventDispatchingHttpCacheTest::testAddListener
Undefined index: trace_level
/home/travis/build/FriendsOfSymfony/FOSHttpCache/vendor/symfony/http-kernel/HttpCache/HttpCache.php:130
/home/travis/build/FriendsOfSymfony/FOSHttpCache/vendor/symfony/http-kernel/HttpCache/HttpCache.php:228
/home/travis/build/FriendsOfSymfony/FOSHttpCache/src/SymfonyCache/EventDispatchingHttpCache.php:98
/home/travis/build/FriendsOfSymfony/FOSHttpCache/src/Test/EventDispatchingHttpCacheTestCase.php:318

trace_level seems to be set, or?

        $this->options = array_merge([
            'debug' => false,
            'default_ttl' => 0,
            'private_headers' => ['Authorization', 'Cookie'],
            'allow_reload' => false,
            'allow_revalidate' => false,
            'stale_while_revalidate' => 2,
            'stale_if_error' => 60,
            'trace_level' => 'none',
            'trace_header' => 'X-Symfony-Cache',
        ], $options);

        if (!isset($options['trace_level']) && $this->options['debug']) {
            $this->options['trace_level'] = 'full';
        }

@dbu
Copy link
Contributor

dbu commented Jul 29, 2019

unless debug is false. i think when it is false the addTraces can still be called and will then fail in this way. it only happens with newer php versions, maybe its a recent regression that does not pop up because people are either in debug mode or ignore the undefined index in production?

@dbu
Copy link
Contributor

dbu commented Jul 29, 2019

@dbu
Copy link
Contributor

dbu commented Jul 29, 2019

symfony/symfony#32801

@dbu
Copy link
Contributor

dbu commented Jul 29, 2019

i will merge anyways, its much better than the current state 👍

thanks @andrerom !

@dbu dbu merged commit 01d87fa into FriendsOfSymfony:master Jul 29, 2019
@dbu
Copy link
Contributor

dbu commented Jul 29, 2019

i went ahead and did a pull request to have it fixed in symfony symfony/symfony#32802

@andrerom andrerom deleted the fix_tests branch July 29, 2019 19:28
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