contao / manager-plugin

Contao Manager Plugin
GNU Lesser General Public License v3.0
4 stars 9 forks source link

Add compatibility with Symfony 5 #26

Closed aschempp closed 4 years ago

aschempp commented 4 years ago

This requires https://github.com/contao/contao/pull/1891 before the build passes. I assume https://github.com/contao/contao/pull/1891 will be merged into Contao 4.9.4, therefore the conflict rule in composer.json.

Road to Symfony 5: https://github.com/contao/contao/issues/1889

leofeyer commented 4 years ago

I don't understand why we have to add a conflict. The Kernel::getProjectDir() method exists as of Symfony 3.4, so this should be fine?

leofeyer commented 4 years ago

The unit tests now fail, because Contao <4.9.4 does not handle $projectDir:

There was 1 error:

1) Contao\ManagerPlugin\Tests\Bundle\Config\ConfigTest::testReturnsTheBundlePathWithProjectDir
LogicException: The module folder "system/modules/foobar" does not exist.

/home/runner/work/manager-plugin/manager-plugin/vendor/contao/core-bundle/src/HttpKernel/Bundle/ContaoModuleBundle.php:33
/home/runner/work/manager-plugin/manager-plugin/src/Bundle/Config/ModuleConfig.php:34
/home/runner/work/manager-plugin/manager-plugin/tests/Bundle/Config/ConfigTest.php:110

We could fix this by changing

"require-dev": {
    "contao/core-bundle": "^4.5"
}

to

"require-dev": {
    "contao/core-bundle": "^4.9.4"
}

or by somehow allowing the PR to fail.