phoenix changelog


Here's the latest scoop on the updates and tweaks we've made to the Phoenix framework. Get ready to dive into the details of our recent enhancements and fixes! 🚀

New Feature: Configurable Scope's Assign Key in phx.gen.auth
We've added the ability to configure the scope's assign key in the phx.gen.auth module. This change brings more flexibility to your authentication setup, allowing you to tailor it to your app's specific needs. We've also updated the documentation and test files to make sure everything runs smoothly. 🎉

Improvement: Respect User-Defined Themes
No more theme override drama! If you've set a theme explicitly, our changes ensure it stays that way. The theme now respects your choice, thanks to a nifty conditional check. It listens for changes via local storage and custom events, making your user experience seamless and personalized. 🌈

Improvement: Elixir and OTP Options in Dockerfile Generator
Calling all Docker enthusiasts! You can now specify Elixir and OTP versions directly in the Dockerfile generator. Use the --elixir and --otp options to match your development system's versions. This makes managing dependencies a breeze and keeps your environments consistent. 🐳

Bugfix: Corrected Date in CHANGELOG
Oops, we had a little time-travel mishap! The release date for version 1.8.0-rc.2 in the CHANGELOG was corrected from May 29, 2025, to April 29, 2025. Just keeping our timeline neat and tidy for you! 📅

Included Commits

2025-05-02T13:49:05 See commit

This commit modifies the root.html.heex file in the installer/templates/phx_web/components/layouts directory to prevent the theme from being overridden if it has been explicitly set. The change introduces a conditional check that ensures the theme is only set based on local storage or defaults to "system" if the data-theme attribute is not already defined on the document's root element.

As a result, this update enhances the theme management functionality by respecting user-defined themes, thereby improving the overall user experience. The code now listens for changes in the theme settings through local storage and a custom event, allowing for dynamic updates while maintaining the integrity of any explicitly set themes.

Files changed

  • installer/templates/phx_web/components/layouts/root.html.heex
2025-05-06T09:35:47 See commit

This commit addresses a correction in the CHANGELOG for the Phoenix framework, specifically updating the release date for version 1.8.0-rc.2 from May 29, 2025, to April 29, 2025. The change helps ensure that the documentation accurately reflects the timeline of the release.

The modification involved updating the date entry in the CHANGELOG.md file, with one line added and one deleted, alongside two changes to the existing content. This adjustment is part of a broader effort to maintain accurate records of release notes and deprecation warnings, which include changes to layout specifications and the deprecation of the :trailing_slash option in favor of Phoenix.VerifiedRoutes. The commit also references the associated issue on GitHub that prompted this correction.

Files changed

  • CHANGELOG.md
2025-05-06T10:18:17 See commit

This commit enhances the Dockerfile generator in the Elixir Phoenix framework by introducing options to specify the Elixir and OTP (Open Telecom Platform) versions directly. It modifies the phx.gen.release task to allow users to override the default base image that corresponds to their development system's active versions at the time of generation. The new options can be specified as --elixir and --otp, providing greater flexibility for developers who need to ensure compatibility with specific versions of Elixir and OTP during the deployment process.

Additionally, the commit updates the argument parsing logic to accommodate these new options and adjusts the internal gen_docker function to utilize the provided values or fallback to the system defaults if not specified. This improvement aims to streamline the process of generating Docker configurations for Elixir applications, making it easier for developers to manage dependencies and ensure consistent environments across different setups.

Files changed

  • lib/mix/tasks/phx.gen.release.ex
2025-05-06T15:52:52 See commit

The recent commit to the Phoenix framework allows developers to configure the scope's assign key within the phx.gen.auth module. This enhancement addresses a request related to issue #6226 on GitHub, thereby improving the flexibility of authentication setup in Phoenix applications. The changes span multiple files, including modifications to the main generator task, various templates for authentication-related views, and updates to documentation to reflect this new configurability.

In addition to the core changes, the commit includes updates to several test files, ensuring that the new feature is properly validated within the existing test suite. By enabling customization of the assign key, this commit enhances the usability of the authentication generator, making it easier for developers to tailor their authentication logic to better fit specific application requirements.

Files changed

  • lib/mix/tasks/phx.gen.auth.ex
  • lib/mix/tasks/phx.gen.auth/injector.ex
  • priv/templates/phx.gen.auth/auth.ex
  • priv/templates/phx.gen.auth/auth_test.exs
  • priv/templates/phx.gen.auth/confirmation_live.ex
  • priv/templates/phx.gen.auth/login_live.ex
  • priv/templates/phx.gen.auth/registration_live.ex
  • priv/templates/phx.gen.auth/routes.ex
  • priv/templates/phx.gen.auth/session_confirm.html.heex
  • priv/templates/phx.gen.auth/session_controller.ex
  • priv/templates/phx.gen.auth/session_new.html.heex
  • priv/templates/phx.gen.auth/settings_controller.ex
  • priv/templates/phx.gen.auth/settings_live.ex
  • test/mix/tasks/phx.gen.auth/injector_test.exs
  • test/mix/tasks/phx.gen.auth_test.exs