phoenix changelog


Welcome to the latest updates! We've been busy making things smoother, faster, and just generally more awesome for you. Here's a rundown of what's new and improved:

New Feature: Disable Watchers 🕵️‍♂️

  • You can now set watchers to false in your Phoenix configuration to disable them entirely. This gives you more control over your development environment, especially useful when you want to override the default behavior.
  • Changes were made to lib/phoenix/endpoint.ex and lib/phoenix/endpoint/supervisor.ex to support this, along with a new test case to ensure everything works smoothly.

Improvement: Req as Default Swoosh Client 🚀

  • We've swapped Finch for Req as the default HTTP client in the Swoosh installer. Req, being more "batteries included," means no more manual HTTP client initialization.
  • This change spans various files like prod.exs, runtime.exs, and mix.exs, ensuring a seamless transition.

Bugfix: Dockerfile Warnings 🐳

  • Resolved several Docker warnings by tweaking the Dockerfile syntax and environment variable declarations.
  • These minor changes make the Docker setup cleaner and more efficient, improving the overall build process.

Improvement: VerifiedRoutes Documentation 📚

  • Updated the documentation for the Phoenix.VerifiedRoutes module. Fixed links to static_url and static_path callbacks and removed an unnecessary reference to "URI" in the static_integrity/2 function.
  • These tweaks make the documentation clearer and more user-friendly.

Bugfix: Typo Correction ✏️

  • Fixed a tiny typo in guides/contexts.md, changing "responsability" to "responsibility".
  • This small change helps maintain the professionalism and clarity of the documentation.

We hope these updates make your development experience even better! 🌟

Included Commits

2024-08-03T19:06:46 See commit

The commit replaces Finch with Req as the default HTTP client in the Swoosh installer, reflecting Swoosh's support for Req since version 1.14.1. Req offers a more user-friendly experience by eliminating the need to manually initialize an HTTP client, which was a requirement when using Finch. This change aims to simplify the setup process for developers.

The commit includes modifications across various files in the installer templates and tests, such as configuration files (prod.exs, runtime.exs), application files (application.ex), and mix files (mix.exs). These updates ensure that the new default client is properly integrated and tested within both single and umbrella project structures. Additionally, adjustments were made to the integration test files to accommodate the transition to Req.

Files changed

  • installer/templates/phx_single/config/prod.exs
  • installer/templates/phx_single/config/runtime.exs
  • installer/templates/phx_single/lib/app_name/application.ex
  • installer/templates/phx_single/mix.exs
  • installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex
  • installer/templates/phx_umbrella/apps/app_name/mix.exs
  • installer/templates/phx_umbrella/apps/app_name_web/config/runtime.exs
  • installer/templates/phx_umbrella/config/prod.exs
  • installer/test/phx_new_test.exs
  • installer/test/phx_new_umbrella_test.exs
  • integration_test/mix.exs
  • integration_test/mix.lock
2024-08-07T18:10:16 See commit

This commit addresses a minor typo in the documentation file guides/contexts.md of a Phoenix project. Specifically, it corrects the word "responsibility" by changing "responsability" to the correct spelling. The commit involved a total of two changes: one addition and one deletion, ensuring that the text is now grammatically accurate.

The revised text emphasizes the role of contexts within the Phoenix framework, highlighting their function in delineating boundaries and organizing functionality within an Elixir application. This correction contributes to the overall clarity and professionalism of the documentation, making it easier for developers to understand the importance of contexts in application design.

Files changed

  • guides/contexts.md
2024-08-07T18:10:32 See commit

This commit addresses several documentation issues within the Phoenix.VerifiedRoutes module. It corrects references to the static_url and static_path callbacks, changing them from plain text links to formatted code references for better clarity. Additionally, it removes a reference to "URI" from the static_integrity/2 function documentation, simplifying the parameters description to focus on the relevant types.

Overall, the changes enhance the readability and accuracy of the documentation, ensuring that users can easily find and understand the functions related to generating URLs and integrity hashes for static assets. The commit includes minor modifications, with an equal number of additions and deletions, reflecting a careful refinement of the existing documentation.

Files changed

  • lib/phoenix/verified_routes.ex
2024-08-07T18:12:36 See commit

The commit addresses and resolves several Docker warnings by making minor modifications to the Dockerfile and related documentation. Key changes include the adjustment of the syntax in the FROM instruction to use uppercase "AS" for the builder stage, which enhances readability and adheres to best practices. Additionally, the environment variable declarations have been reformatted to eliminate unnecessary spaces, ensuring consistency and clarity in the Docker configuration.

These updates were applied in both the main Dockerfile and a template file used for generating Dockerfiles, contributing to a cleaner and more efficient build process. Overall, the changes aim to improve the structure and readability of the Docker setup while addressing warnings that could potentially affect deployment.

Files changed

  • guides/deployment/releases.md
  • priv/templates/phx.gen.release/Dockerfile.eex
2024-08-07T18:14:26 See commit

This commit introduces a new feature that allows the disabling of watchers in the Phoenix framework by setting the watchers configuration option to false. This enhancement is beneficial for cases where developers need to override the default behavior of watchers, providing greater control over the application's behavior during development or testing. The changes affect the lib/phoenix/endpoint.ex and lib/phoenix/endpoint/supervisor.ex files, ensuring that when watchers is set to false, the system does not attempt to start any watcher processes, even if the :server option is enabled.

Additionally, the commit includes a corresponding test case in test/phoenix/endpoint/supervisor_test.exs to verify that when the :server configuration is set to true and :watchers is set to false, no watcher processes are initiated. This ensures that the new functionality works as intended and maintains the stability of the Phoenix framework's endpoint supervision behavior.

Files changed

  • lib/phoenix/endpoint.ex
  • lib/phoenix/endpoint/supervisor.ex
  • test/phoenix/endpoint/supervisor_test.exs