Giter Club home page Giter Club logo

Comments (8)

minthemiddle avatar minthemiddle commented on June 15, 2024 1

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.

from build-image.

sugizo avatar sugizo commented on June 15, 2024

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
the build script that i've tested:
netlify.toml
[build]
command = "composer require tightenco/jigsaw && ./vendor/bin/jigsaw build"
publish = "/build_local"

return an error in build log:
/opt/build/build.sh: line 468: composer: command not found

tried another way
netlify.toml
[build]
command = "sudo apt update && sudo apt install -y composer php && composer require tightenco/jigsaw && ./vendor/bin/jigsaw build"
publish = "/build_local"

return an error in build log:
sudo: no tty present and no askpass program specified

forgot to tell, the same source (jigsaw) works in another cicd hosted
is there a way to make php static generator work in netlify?

from build-image.

fool avatar fool commented on June 15, 2024

@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 ;)

from build-image.

fool avatar fool commented on June 15, 2024

@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 :)

from build-image.

minthemiddle avatar minthemiddle commented on June 15, 2024

@fool Thanks for clarification. Will look into how to possibly tweak the build image and might be able to contribute…

from build-image.

sugizo avatar sugizo commented on June 15, 2024

pardon, forgot to replied gerald's advice last time, the status of jigsaw's built is published right now, after follow chris advice with:
netlify.toml
[build]
command = "source /opt/buildhome/.phpbrew/bashrc && phpbrew switch 5.6.32 && /opt/buildhome/.phpbrew/bin/composer require tightenco/jigsaw && ./vendor/bin/jigsaw build"
publish = "/build_local"

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

from build-image.

fool avatar fool commented on June 15, 2024

@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

from build-image.

minthemiddle avatar minthemiddle commented on June 15, 2024

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 PHP5 and does not use PHP72 via apt:

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)

PHP7 is largely downward compatible and a lot safer and faster than PHP56.

from build-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.