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

PHP_CONFIG env var not honored by build script #208

Closed
ju1ius opened this issue Nov 30, 2022 · 0 comments · Fixed by #210
Closed

PHP_CONFIG env var not honored by build script #208

ju1ius opened this issue Nov 30, 2022 · 0 comments · Fixed by #210

Comments

@ju1ius
Copy link
Contributor

ju1ius commented Nov 30, 2022

Hi,

cargo php install supports reading the location of php-config from the PHP_CONFIG environment variable.

However, the build script does not honour this variable and always search for php-config in the PATH.

This can result in build conflicts when the php-config binary does not match the php binary.

ptondereau pushed a commit that referenced this issue Dec 11, 2022
Closes #208
Closes #209

## Summary of the changes

### Build scripts
* the `unix_build.rs` script now honors the `PHP_CONFIG` environment variable, like `cargo php install`
* use `cargo:rerun-if-env-changed` for the `PHP`, `PHP_CONFIG` and `PATH` environment variables, to avoid needless recompilation of the whole dependency tree.

### Documentation
While trying to document the aforementioned changes, I realized that there was no chapter about installing and setting up a PHP environment to develop PHP extensions. So, I refactored the first chapters of the book into a `Getting Started` section, including instructions on how to quickly set up a PHP environment.
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 a pull request may close this issue.

1 participant