phoenix changelog


Welcome to another round of updates! We've been busy bees 🐝 making improvements, adding new features, and squashing bugs to make your experience better than ever. Check out what's new and exciting:

New Feature: Clustering Section Added We've introduced a brand new section on clustering in the deployment guides for Phoenix applications. This feature is especially handy for those deploying on platforms like Fly.io. The guide walks you through setting up your environment variables, helping your Elixir and Erlang VM nodes chat like old friends. Say hello to better scalability and performance in distributed environments! 🌐

Improvement: SSL Before Migration We've jazzed up the release process by ensuring that SSL is loaded before any database migrations kick-off. By starting the SSL application first, we're smoothing out potential hiccups with database connections, especially on platforms that insist on SSL. Your app's release process just got a whole lot more reliable! 🔐

Improvement: Conditional Subscriptions in LiveView We've made LiveView smarter by ensuring it only subscribes to topics when the socket is connected. This tweak helps improve performance and reduces unnecessary server load. Your real-time web applications will thank you for this boost in efficiency! ⚡

Bugfix: Server-Error CSS Selector We fixed a pesky CSS selector issue for server errors. Now, when things go sideways, the error messages will display correctly, ensuring a smoother user experience. No more hiding those server error messages under the wrong selector! 🚨

Improvement: Typo Fix and More We fixed a minor typo in the CHANGELOG.md file, but that's not all! We've also enhanced support for Tailwind CSS with daisyUI and introduced features like magic links for passwordless authentication. Plus, we've streamlined layout handling for new apps, making life easier for both newcomers and seasoned developers. ✨

That's a wrap for now! Dive into these updates and enjoy a smoother, more powerful Phoenix experience. Until next time, happy coding! 🎉

Included Commits

2025-04-19T10:10:23 See commit

This commit addresses a minor typographical error in the CHANGELOG.md file related to the simplification of core components and live generators. The original phrasing stated that the changes "lessened the amount of code newcomers need to get up to speed with," which has been corrected to "lessens the amount of code newcomers need to get up to speed with."

In addition to the typo fix, the commit outlines several significant updates in the release, including enhanced support for Tailwind CSS with daisyUI, a streamlined layout handling process for new applications, and the introduction of features like magic links for passwordless authentication and improved security practices in Phoenix generators. These changes aim to provide a better experience for both seasoned developers and newcomers by simplifying the codebase and enhancing functionality.

Files changed

  • CHANGELOG.md
2025-04-22T10:16:24 See commit

The commit addresses an issue with the CSS selector for the server error component by correcting the targeting from .phx-client-error #client-error to .phx-server-error #server-error. This change ensures that the server error message is properly displayed when a server error occurs, improving the user experience during such events.

In the modified file installer/templates/phx_web/components/layouts.ex, the commit includes two additions and two deletions, resulting in four changes overall. The adjustments involve updating the phx-disconnected and phx-connected attributes to accurately reflect the new selector for the server error, thereby enhancing the functionality of the error handling in the application.

Files changed

  • installer/templates/phx_web/components/layouts.ex
2025-04-22T12:24:49 See commit

The commit titled "Load SSL before migration" introduces changes to ensure that the SSL application is started prior to executing database migrations in the MyApp application. Specifically, it modifies the load_app function in both the MyApp.Release module and the template for generating releases. By adding the line Application.ensure_all_started(:ssl), the commit ensures that SSL is available, which is crucial for many platforms that require SSL when establishing database connections.

This update enhances the reliability of the application's release process by guaranteeing that SSL is initialized before any database operations occur, thereby preventing potential connection issues that could arise during migrations. The documentation within the code also highlights the importance of SSL in the context of database connectivity, emphasizing its necessity for compatibility with various deployment environments.

Files changed

  • guides/deployment/releases.md
  • priv/templates/phx.gen.release/release.ex
2025-04-22T18:44:40 See commit

This commit introduces a new section on clustering within the deployment guides for Phoenix applications, specifically focusing on configurations necessary for enabling clustering on platforms like Fly.io. The added content explains how Elixir and the Erlang VM can seamlessly communicate between nodes, emphasizing the importance of setting appropriate environment variables for successful clustering. It provides detailed instructions on configuring these variables, including ERL_AFLAGS, RELEASE_DISTRIBUTION, and DNS_CLUSTER_QUERY, which facilitate node communication and service discovery.

Additionally, the commit modifies other deployment guides (for Gigalixir, Heroku, and Releases) to streamline the language and remove redundant sections, ensuring clarity and conciseness. The overall goal remains to guide users through deploying their Phoenix applications effectively while incorporating the new clustering capabilities, which enhance the application's scalability and performance in distributed environments.

Files changed

  • guides/deployment/fly.md
  • guides/deployment/gigalixir.md
  • guides/deployment/heroku.md
  • guides/deployment/releases.md
  • guides/real_time/channels.md
2025-04-23T13:43:57 See commit

This commit introduces a modification to the Phoenix framework's LiveView functionality by ensuring that subscriptions to a specific topic only occur when the socket is connected. The changes were made in two files, index.ex and show.ex, both of which are part of the LiveView template generation process. The code now checks the connection status of the socket before executing the subscription, which is intended to enhance performance and prevent unnecessary subscriptions when the socket is not active.

By implementing this conditional subscription, the commit aims to improve the efficiency of the LiveView components, thereby optimizing resource usage and potentially reducing server load. Overall, this change reflects a thoughtful enhancement to the framework's handling of socket connections and subscriptions, promoting better practices in real-time web applications built with Phoenix.

Files changed

  • priv/templates/phx.gen.live/index.ex
  • priv/templates/phx.gen.live/show.ex