matthiku / cSpot

c-SPOT - the church-Services Planning Online Tool
5 stars 4 forks source link

Integrate ci to laravael 6.0 #209

Closed chris24walsh closed 4 years ago

chris24walsh commented 4 years ago

Opening PR to address the incompatibility between the current CI workflow and laravel 6.0.

chris24walsh commented 4 years ago

@matthiku you can see here more clearly, that the docker build performed in the workflow fails on the laravel-version-6.0 branch, which of course is branched from your commit d9165c6, 'upgrading to Laravel 6.0'. So, how do we resolve the dependency issue in composer? Perhaps you can tell me how composer dependencies are upgraded....

chris24walsh commented 4 years ago

Basically the only dependency clash highlighted in the build log is: phpdocumentor/reflection-docblock 5.1.0 requires ext-filter ^7.1 -> the requested PHP extension filter has the wrong version (7.2.29-1+ubuntu16.04.1+deb.sury.org+1) installed. Can we just upgrade this in the composer.lock file to ^7.2?

matthiku commented 4 years ago

I think you need a newer PHP version (7.2) plus certain PHP extensions installed: mbstring, dom and curl

chris24walsh commented 4 years ago

@matthiku If you check the failed build on e.g. 7a395d4, as you can see above - checking the Dockerfile for that commit, php7.2 is the version installed, and the only extension that is not installed by apt is dom; curl and mbstring are. Can you tell me how your project dependencies are installed on your machine?

chris24walsh commented 4 years ago

Success! I found the issues in the end. You were right about the ext-dom php extension, but it was obfuscated by the fact that the version of composer installed from ubuntu apt was quite out-of-date. I've cleaned up the unnecessary extensions too, to keep the Dockerfile clean. In the future, it would also be good to optimize and reduce the number of Dockerfile stages, so the image will be smaller, since each separate stage adds overhead to the final image. However, we still want to provide decoupling between fundamental stages e.g. apt-get install -y update, and stages that will be updated/rerun often e.g. composer install.