Skip to content

Commit

Permalink
Merge pull request #114 from paketo-buildpacks/php-fix
Browse files Browse the repository at this point in the history
Supports more specific plan combinations for PHP + web servers
  • Loading branch information
dmikusa authored Jun 21, 2024
2 parents 0bec80e + 3536c4d commit b6a3a5b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dt/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error
return libcnb.DetectResult{
Pass: true,
Plans: []libcnb.BuildPlan{
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "httpd"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "nginx"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-apache"},
Expand Down
20 changes: 20 additions & 0 deletions dt/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ import (
var expectedResult = libcnb.DetectResult{
Pass: true,
Plans: []libcnb.BuildPlan{
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "httpd"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "nginx"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-apache"},
Expand Down

0 comments on commit b6a3a5b

Please sign in to comment.