Closed azjezz closed 3 years ago
Sorry, we're not able to review this until we are able to review request data as a whole: query strings, environment variables, POST data, headers, ... . We're not just looking for a good solution for environment variables or 'the environment', but want a consistent solution regardless of request type (http/CLI/thrift/xbox/...) and we also want to be sure we've found the right definition of 'the environment'.
Some implications there:
👋
I wanted to bootstrap the work on
HH\Lib\Env
, so this is PR is more of a "meta PR" to keep the discussion going.This API is borrowed as-is from PSL, and it was initially inspired by the
std::env
crate from Rust.The component contains common functions that are needed for day-to-day operations especially when writing CLI applications, such as dealing with process environment variables, retrieving
args
, and retrieving the current directory/script.I'm not sure if this is the API we want in Hack, but so far, it has served it's purpose really well in both PHP and Rust.