-
Notifications
You must be signed in to change notification settings - Fork 194
better php support in build image #124
Comments
Just a question: How do you know you have few PHP users? There are many static page generators (and some even somewhat influential, like Sculpin and Jigsaw), and people have to build locally and will only deploy static pages. I use Jigsaw which is popular in the Laravel world, and though it might be possible to use continuous deployment with php5.5 it would be so much easier and fast with php7.0+. This is why I think there are virtually no PHP users right now, because noone still uses 5.5. |
did you manage to make it work for jigsaw? several days ago tested it, recevie an error in build log, send an email to netlify support, they just told that the composer installed in their dockerfile, but can't be used return an error in build log: tried another way return an error in build log: forgot to tell, the same source (jigsaw) works in another cicd hosted |
@minthemiddle this thread will be a great way to tell if I'm wrong :) I am already surprised by the amount of engagement! However I have done some formal surveys of build commands our customers use and the php-based frameworks and commands are very rare, is why I made the statement - it is objectively true. Do I want to support php less? absolutely not! Will there be substantial engineering effort spent on it by Netlify staff vs ruby/node? Probably not in the immediate future - hence my request for PR's ;) |
@sugizo what you reported is not what our team said in that support ticket - they just said you can't use sudo, and composer is already supposed to be there - but I am not sure it is. I've reopened your case and we'll take another shot. Since you didn't respond to our last suggestion in that thread, we assumed you got something working. A "try this to see if you can figure it out" is always open to a response of "I couldn't" if you need more help :) |
@fool Thanks for clarification. Will look into how to possibly tweak the build image and might be able to contribute… |
pardon, forgot to replied gerald's advice last time, the status of jigsaw's built is published right now, after follow chris advice with: the different with my previous posted is, i didn't know the full path of composer so that the status is command not found, but now is work well, thx 4 quick respond |
@depadiernos could you write this up as a FAQ? It's not really "frequent" but I'd like to get it doc'd somewhere and we talked through this together. Issue will stay open until we improve support but right now it's impossible for someone who doesn't find this thread or ask support how to get composer or php version selection working |
Here is my write-up of how to use continuous deployment with Jigsaw (Laravel based): https://github.com/minthemiddle/netlify-php-cdci-jigsaw Studying the build image, I really wonder why Netlify installs sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-cli (Source: https://www.colinodell.com/blog/201711/installing-php-72)
|
Remove php 5.5, add 7.2.2 Automatically install composer dependencies and cache them. Fixes #124 Fixes #102 Co-Authored-By: Arnaud Ligny <[email protected]>
Ported from the feature requests listing, seems to belong here instead:
Summary
We should support more php version the way we support node versions (with an easy config flag) and probably also some PHP dependency manager.
Details
We currently support an ancient (but stock for our ubuntu release) php version, 5.5. Via phpbrew we kiiind of support php 5.6. It's not something anyone would figure out how to use without some guidance, but it is at least possible
The current version of PHP is 7.2 and while this is a fairly recent release, it's also a major change (there was no production-quality php 6 release).
We should also support a dependency manager like Composer (think Ruby bundler for php)
Note: there are very few PHP users on our platform, so we are unlikely to pursue this - great opportunity for a contribution if it's something you need!
The text was updated successfully, but these errors were encountered: