The bundle was locked to a version which contains a security bug.
Jumping to the most recent fix the issue.
But we'll have the `ListenerInterface` issue, again.
So, downgrading sentry-symfony instead.
See 0cf743f6fb
- v4.6.0 introduce a fix for "deprecated listener for Symfony < 4.3"
- but sentry-symfony 3.3.0 introduce a bug in the workaround previous fix
- which was fixed in sentry-symfony 3.4.2
- we can't upgrade to that version because it requires sentry/sdk 2.1 which use `php-http/guzzle6-adapter` instead of curl
- as we are using guzzle5, we can't upgrade and fix the listerner issue
- Clean Travis config file
- Only cache deps from composer (avoiding metadata to invalid Travis cache)
- Update config file to match future version from Travis
- Remove useless (not so working) `travis_fold`
- Remove `SensioGeneratorBundle` and use `MakerBundle`
```
Package sensio/generator-bundle is abandoned, you should avoid using it. Use symfony/maker-bundle instead.
```
- Sort packages in `composer.json`
- Use `laminas/*` package to remove deprecated `zendframework/*` ones:
```
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
```
Version 4.4.0 & 5.0.0 will install PHPUnit 8.3.x by default which required PHP > 7.1.
We could lock the PHPUnit version using `SYMFONY_PHPUNIT_VERSION` env variable but we'll have an issue with PHP 5 then because there is no PHPUnit version compatible with both PHP 5 & PHP 7.
Also update deps:
- Updating ocramius/package-versions (1.4.0 => 1.4.2)
- Updating j0k3r/graby-site-config (1.0.94 => 1.0.95)
- Updating php-http/client-common (2.0.0 => 2.1.0)
- Updating symfony/mime (v4.3.8 => v4.4.0)
- Updating white-october/pagerfanta-bundle (v1.2.4 => v1.3.1)
- Installing phpseclib/phpseclib (2.0.23)
- Updating php-amqplib/php-amqplib (v2.10.1 => v2.11.0)
- Updating nette/php-generator (v3.2.3 => v3.3.1)
- Updating zendframework/zend-diactoros (2.2.0 => 2.2.1)
Because the 2.9.3 seems to break test.
Like a conflict with `DoctrineTestBundle` I guess (which can't be updated because we are still allowing PHP 7.1 and is not).
The generated error usually appear when we update data using a service during test (like changing the craue config).
Here is the error:
```
Testing tests/Wallabag/CoreBundle/Controller/
PHP Fatal error: Uncaught PDOException: There is no active transaction in /Users/jeremy/Sites/github/wallabag/vendor/dama/doctrine-test-bundle/src/DAMA/DoctrineTestBundle/Doctrine/DBAL/StaticDriver.php:142
Stack trace:
#0 /Users/jeremy/Sites/github/wallabag/vendor/dama/doctrine-test-bundle/src/DAMA/DoctrineTestBundle/Doctrine/DBAL/StaticDriver.php(142): PDO->rollBack()
#1 /Users/jeremy/Sites/github/wallabag/vendor/dama/doctrine-test-bundle/src/DAMA/DoctrineTestBundle/PHPUnit/PHPUnitListener.php(39): DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver::rollBack()
#2 /Users/jeremy/Sites/github/wallabag/vendor/bin/.phpunit/phpunit-7.4/src/Framework/TestResult.php(412): DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener->endTest(Object(Tests\Wallabag\CoreBundle\Controller\ConfigControllerTest), 3.3917479515076)
#3 /Users/jeremy/Sites/github/wallabag/vendor/bin/.phpunit/phpunit-7.4/src/Framework/TestResult.php(893): PHPUnit\Framework\TestResult->endTest(Object(Tests\Wallabag\CoreBundle\Controller\ConfigControllerTest), 3.3917479515076 in /Users/jeremy/Sites/github/wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php on line 91
Fatal error: Uncaught PDOException: There is no active transaction in /Users/jeremy/Sites/github/wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php on line 91
InvalidArgumentException: The controller for URI "/config" is not callable. The "kernel" service is synthetic, it needs to be set at boot time before it can be used. in /Users/jeremy/Sites/github/wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php on line 91
Call Stack:
3.4732 57305872 1. Symfony\Component\Debug\ErrorHandler->handleException() /Users/jeremy/Sites/github/wallabag/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:0
3.5000 58014320 2. Symfony\Component\Debug\ErrorHandler->handleException() /Users/jeremy/Sites/github/wallabag/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:613
```
In fact it's not _just_ a rename.
We are now able to use our own entity with the CraueConfigBundle which allow us to enforce a custom length on string field and avoid error with utf8mb4 on MySQL.
To fix that issue before we were in need to fork CraueConfigBundle to hard apply these length changes.
The recent 2.3.0 release fix that issue. That's why we are in need to rename the table (getting rid of the bundle name from it)
Also updating deps:
- Updating symfony/polyfill-mbstring (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-ctype (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-php70 (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-util (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-php56 (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-intl-icu (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-apcu (v1.11.0 => v1.12.0)
- Updating j0k3r/graby-site-config (1.0.88 => 1.0.89)
- Updating php-http/message (1.7.2 => 1.8.0)
- Updating symfony/polyfill-php73 (v1.11.0 => v1.12.0)
- Updating symfony/http-client (v4.3.2 => v4.3.3)
- Updating symfony/polyfill-php72 (v1.11.0 => v1.12.0)
- Updating symfony/polyfill-intl-idn (v1.11.0 => v1.12.0)
- Updating symfony/mime (v4.3.2 => v4.3.3)
- Updating craue/config-bundle (dev-utf8mb4 46cfd37 => 2.3.0)
- Updating masterminds/html5 (2.6.0 => 2.7.0)
- Updating nette/di (v3.0.0 => v3.0.1)
- Updating symfony/polyfill-iconv (v1.11.0 => v1.12.0)
- Updating wallabag/php-mobi (1.0.1 => 1.1.0)
It was only used to make an absolute url when downloading images.
The deps is still there (in the `composer.lock`) because Graby use it (not for absolute but for encoding).
- Update SchebTwoFactorBundle to version 3
- Enable Google 2fa on the bundle
- Disallow ability to use both email and google as 2fa
- Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7)
- use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add`
- update admin to be able to create/reset the 2fa
Thanks to the BC compatibility, almost nothing have to be changed.
All changes are related to new bundle version of:
- SensioFrameworkExtraBundle
- DoctrineFixturesBundle
Because:
PHP Fatal error: Class 'PHPUnit_Framework_BaseTestListener' not found in /home/travis/build/wallabag/wallabag/vendor/dama/doctrine-test-bundle/src/DAMA/DoctrineTestBundle/PHPUnit/LegacyPHPUnitListener.php on line 7