Re: PHP buildpack looking for composer.json file recursively leads to detecting ASP.Net projects as PHP projects


Daniel Mikusa
 

OK. Sorry, I was thinking about code in a different spot. I would agree
that recursively searching is probably unnecessary.

This has probably not come up before because I don't think most users rely
on the detect behavior. If you set `-b` with `cf push` and pick a specific
build pack you can workaround this behavior.

Dan

On Fri, Mar 25, 2016 at 4:58 PM, Daniel E Grim <degrim(a)us.ibm.com> wrote:

This issue is with the latest PHP build pack code at
https://github.com/cloudfoundry/php-buildpack/blob/master/scripts/detect.py#L26
.

-Dan

----- Forwarded by Daniel E Grim/Raleigh/IBM on 03/25/2016 04:54 PM -----

From: Daniel Mikusa <dmikusa(a)pivotal.io>
To: "Discussions about Cloud Foundry projects and the system overall." <
cf-dev(a)lists.cloudfoundry.org>
Date: 03/25/2016 04:52 PM
Subject: [cf-dev] Re: PHP buildpack looking for composer.json file
recursively leads to detecting ASP.Net projects as PHP projects
------------------------------



What version of the PHP build pack are you using? I know this has come up
before and I thought the build pack was changed to look in specific
locations.

Dan

On Fri, Mar 25, 2016 at 3:55 PM, Daniel E Grim <*degrim(a)us.ibm.com*
<degrim(a)us.ibm.com>> wrote:

Hi all,

The PHP buildpack is currently looking recursively for a composer.json
file within the project as part of it's detect script. This is causing an
issue for users trying to push an ASP.Net project which contains bower
packages that have a composer.json file within their directory structure
because their project gets detected by the PHP buildpack. Does anyone know
if there is a need for the PHP buildpack to search for this file
recursively, or would detecting it in the project root be enough? If the
file could be detected only in the project root, that would stop the PHP
buildpack from detecting ASP.Net projects because those composer.json files
are never in the main folder of the project but in the wwwroot/scripts/lib
folder instead.

Thanks,
Dan



Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.