lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
422 stars 259 forks source link

Added mysql service for travis and only build for Symfony 4.0 for now… #377

Closed bartmcleod closed 3 years ago

bartmcleod commented 3 years ago

Should add 5 when deprecation warnings have been taken care of.

This PR is basically a try-out to see if adding the mysql service to the travis config will fix the tests on master. If so, it may be merged.

It only builds for Symfony 4.0 for now.

I had to fix composer dependencies.

I also had to fix a test that relies on a specific order in which items come back from the database, which might be a bad idea, but the code is ancient (2011), so it is strange it had to be changed. The translation were done fine in these test cases, just the order was different.

To be able to build for PHP 7.4 and 8.0, it is required that we update the unit tests and use a more compatible version of PHPUnit, preferably the latest. How are we with support for older version of php on master? We have the 3.4 branch for ancient versions, but how far back do we want to support PHP 7? I would have to investigate if we need another branch for symfony 4, so that we can leave older PHP 7 versions behind for Symfony 5.

bartmcleod commented 3 years ago

Ok, so it also has composer issues. I will try to sort those out locally.

bartmcleod commented 3 years ago

@spike31 I think this is an improvement, as the tests now pass. I will be happy to upgrade the tests in a separate PR so that we can build for PHP 7.4 and 8.0. I would advise to separate out a branch for Symfony 4 from here and do this new PR against master, leaving behind PHP 7 versions that are too old for the latest and greatest PHPUnit. [Edit] I will try to make things work starting from PHP 7.1, that should allow a new enough version of PHPUnit to build against PHP 7.4 at least.[Edit]This is possible for PHP 7.1-7.4 with PHPUnit 7.5.2. That version of PHPUnit is too old for PHP 8, so for PHP to be included in the builds, we would need to park this version in a 4.4 branch and move on.