Rename load_from_system_env to init_on_start

As of Phoenix 1.3, there’s a load_from_system_env option which triggers Phoenix.Endpoint.init/2 callback when Phoenix server starts. And in config/prod.exs, load_from_system_env: true is added to enable init/2 callback.

But the problem is it won’t triggered when updated via hot code loading since Phoenix server is live and init/2 callback isn’t called. Therefore system env won’t be refreshed. To resolve confusion, how about rename option load_from_system_env with init_on_start or remove the option then make default true to call init/2?

Alternatively, it’d be useful to create another callback like on_load/2 which is called whenever the app version is changed.

:wave:

Sorry for being off-topic, but I thought init callback is called on every phoenix app start up, not just when load_from_system_env: true

You’re right. Thanks for correction.