FOSMessageBundle icon indicating copy to clipboard operation
FOSMessageBundle copied to clipboard

LTS support, Travis and PHPunit issues

Open hex333ham opened this issue 5 years ago • 10 comments

Travis check, seeing if we have failures

hex333ham avatar Jan 27 '20 10:01 hex333ham

latest failed with

                                            

  [Composer\Downloader\TransportException]  

  Peer fingerprint did not match            

                                            

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

The command "composer update $COMPOSER_FLAGS" failed and exited with 1 during .

hex333ham avatar Jan 27 '20 10:01 hex333ham

could be a number of things, this SO answer has some relevant ideas:

https://stackoverflow.com/questions/43996782/how-to-correct-the-composer-downloader-transportexception-error-for-composer

hex333ham avatar Jan 27 '20 10:01 hex333ham

@encreinformatique failing again with the same message I'm afraid, my hunch is on the http/https bit as this project has been around for years

hex333ham avatar Jan 28 '20 10:01 hex333ham

attempts

  1. change dist to trusty from xenial to support PHP 5 - some effect, tests actually run
  2. add composer self-update to update composer when ran - no effect on PHP 5, doesn't hurt to have though
  3. added the following to composer.json to attempt to force packagist to use https - resolved PHP 5, created PHP 7 issues with phpunit (see below):
"repositories": [
    {
         "type": "composer", 
         "url": "https://packagist.org"
    },
    { "packagist": false }
]

hex333ham avatar Jan 28 '20 10:01 hex333ham

we're getting somewhere with that last one (number 3 on attempts), it's now getting past PHP 5.5 and onto PHP 7, might be that we deprecate 5 as this one is compatibility issues for phpunit:

PHP Fatal error:  Declaration of FOS\MessageBundle\Document\ThreadDenormalizerTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /home/travis/build/FriendsOfSymfony/FOSMessageBundle/Tests/Document/ThreadDenormalizerTest.php on line 11

Fatal error: Declaration of FOS\MessageBundle\Document\ThreadDenormalizerTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /home/travis/build/FriendsOfSymfony/FOSMessageBundle/Tests/Document/ThreadDenormalizerTest.php on line 11

hex333ham avatar Jan 28 '20 11:01 hex333ham

we're getting somewhere with that last one (number 3 on attempts), it's now getting past PHP 5.5 and onto PHP 7, might be that we deprecate 5 as this one is compatibility issues for phpunit:

PHP Fatal error:  Declaration of FOS\MessageBundle\Document\ThreadDenormalizerTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /home/travis/build/FriendsOfSymfony/FOSMessageBundle/Tests/Document/ThreadDenormalizerTest.php on line 11

Fatal error: Declaration of FOS\MessageBundle\Document\ThreadDenormalizerTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /home/travis/build/FriendsOfSymfony/FOSMessageBundle/Tests/Document/ThreadDenormalizerTest.php on line 11

This particular one is linked to the PHPUnit version 8. (If I remember well) The test with the hinting (:void) will not be recognized by PHP 5.5.

You could either drop PHP 5 support with a major new version or keep PHPUnit 7 for PHP7. I would suggest the former one as PHP5.5 is unmaintained and the other problem : (with 7.2)

Class 'Twig_Extension' not found

encreinformatique avatar Jan 28 '20 12:01 encreinformatique

@encreinformatique agreed, the more I go down this rabbit hole with fixing that (Twig_Extension) the more issues it creates, the biggest issue at the moment is that this project relies on so much legacy code to work

hex333ham avatar Jan 28 '20 12:01 hex333ham

Then you might have version 3 coming then. I think it is totally justified.

encreinformatique avatar Jan 28 '20 12:01 encreinformatique

Then you might have version 3 coming then. I think it is totally justified.

agreed, this might push it back some more due to my commitments at the moment, looking like a majority rewrite for some parts

hex333ham avatar Jan 28 '20 12:01 hex333ham

@hex333ham I opened a new PR with Github Actions. All jobs succeeded as you can see there : https://github.com/encreinformatique/FOSMessageBundle/actions/runs/639031698

I suppose it does not launch as I do not have rights on this repo. It would make sense.

encreinformatique avatar Mar 10 '21 11:03 encreinformatique