Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure rfc #267

Merged
merged 13 commits into from
Feb 5, 2021
Merged

Restructure rfc #267

merged 13 commits into from
Feb 5, 2021

Conversation

arjun024
Copy link
Member

@arjun024 arjun024 force-pushed the restructure-rfc branch 3 times, most recently from b5c6cb7 to 6c44e78 Compare October 19, 2020 22:16
@arjun024 arjun024 added the rfcs label Oct 20, 2020
@arjun024 arjun024 marked this pull request as ready for review October 20, 2020 16:20
@arjun024 arjun024 requested a review from a team as a code owner October 20, 2020 16:20
@arjun024 arjun024 requested review from a team, fg-j and kvedurmu October 20, 2020 21:47

## Environment Variables

* `php-dist` buildpack must expose the location of the `php.ini` file through
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we can drop this env variable. If we properly install PHP, the cli should be on the path. You'll also get php-config which is an exec you can use to locate things like the INI file, extensions dir, etc.. so I don't think there's a reason for the buildpacks to create a non-standard way of finding similar info.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the ini file will be dropped on to the php layer by the dependency. How would the php-config binary or the php-installation know where this file is? Wouldn't it be in a custom named directory in the layer directory?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, the buildpacks will assume that PHP is installed and available on the path (which php-dist-cnb does). Part of what's installed is php-config, which you can use to query information like this. You can shell out and run php-config and ask about the locations of these files.

The only env variables we should set are the standard ones that tell PHP where to find the INI files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We basically just need to delete this line item. The php-dist cnb doesn't need to do this because other cnb's can use php-config to locate the php.ini file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmikusa-pivotal In the current design, downstream buildpacks do not require php at build. For them to use php-config, php has to be required at build. I can make them require php at build as well so they can call php-config and other binaries that come with php. Does that sound good?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'm tempted to say yes, let's make it available at build so other cnb's can use php-config. Do you see any downside to that? Is there a performance penalty for making it required at build by more cnbs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe there's a penalty. Updated

rfcs/0001-restructure.md Outdated Show resolved Hide resolved
rfcs/0001-restructure.md Outdated Show resolved Hide resolved
rfcs/0001-restructure.md Outdated Show resolved Hide resolved
@arjun024 arjun024 added the rfc label Jan 4, 2021
@ryanmoran ryanmoran removed the rfcs label Jan 26, 2021
rfcs/0001-restructure.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dmikusa dmikusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@arjun024 arjun024 merged commit ffa17b0 into main Feb 5, 2021
@arjun024 arjun024 deleted the restructure-rfc branch February 5, 2021 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants