phoenix changelog


Here's a delightful rundown of the latest updates to the Phoenix framework. From new features to crucial bug fixes, this release is packed with goodies for developers. Let's dive in! ๐Ÿš€

New feature: Tailwind CSS with daisyUI
Say hello to extended Tailwind CSS support featuring daisyUI! This update brings light/dark/system mode options, giving your app a stylish makeover with ease. ๐ŸŒˆ

New feature: Simplified Layout Structure
We've streamlined the layout structure for new applications, consolidating everything into a single root.html.heex file. Less clutter, more clarity! ๐Ÿงน

New feature: Passwordless Authentication
Introducing passwordless authentication via Magic Links! Say goodbye to forgotten passwords and hello to seamless user experiences. ๐Ÿ”ฎโœจ

New feature: Scopes Pattern
Secure data access just got easier with the introduction of the Scopes pattern. Keep your data safe and sound with this nifty enhancement. ๐Ÿ”’

New feature: Navigation Support for Buttons
Buttons just got a whole lot smarter! With added navigation support, they can now function as clickable links. Talk about versatility! ๐Ÿ–ฑ๏ธ

Improvement: LiveView Guide
A comprehensive guide to Phoenix LiveView is now available, making it easier than ever to create interactive, real-time apps. Learn the ropes and get your app buzzing with life! โšก

Improvement: Inline Theme Switcher
We've inlined the theme switcher script, making it easier to manage and understand. Switch themes with style and simplicity! ๐ŸŽจ

Bugfix: Schema Name Flexibility
Fixed issues when using a schema name other than User. The authentication module now adapts smoothly to different schema configurations. Flexibility FTW! ๐Ÿคธ

Bugfix: Compile Alias Conflict
Removed the pesky compile alias to avoid conflicts with archives at runtime. Enjoy a smoother build and execution process. ๐Ÿ› ๏ธ

Bugfix: Integration Tests
Integration tests are now more reliable, thanks to updates in authentication-related files and dependency management. Test away with confidence! ๐Ÿงช

These updates are just the beginning. Dive in, explore, and enjoy the enhanced Phoenix experience! ๐ŸŒŸ

Included Commits

2025-04-01T19:32:07 See commit

This commit focuses on fixing integration tests by making several modifications to various files related to authentication in a Phoenix application. Key changes include updates to the mix.lock file, which is crucial for managing dependencies, ensuring that the integration tests run smoothly with the correct versions of libraries.

Additionally, the commit modifies several template files associated with user authentication, including confirmation_live.ex, registration_live.ex, registration_new.html.heex, and session_confirm.html.heex. These adjustments likely aim to enhance the functionality or fix issues within the user registration and confirmation processes, contributing to more reliable integration test outcomes.

Files changed

  • integration_test/mix.lock
  • priv/templates/phx.gen.auth/confirmation_live.ex
  • priv/templates/phx.gen.auth/registration_live.ex
  • priv/templates/phx.gen.auth/registration_new.html.heex
  • priv/templates/phx.gen.auth/session_confirm.html.heex
2025-04-01T19:32:47 See commit

The commit marks the release of version 1.8.0-rc.0 for the Phoenix framework, introducing several enhancements and modifications aimed at improving developer experience and application functionality. Notable updates include extended Tailwind CSS support with daisyUI for light/dark/system mode, a simplified layout structure for new applications that consolidates to a single root.html.heex, and adjustments to core components and live generators to align more closely with the basic phx.gen.html CRUD structure. Additionally, the release introduces passwordless authentication via Magic Links and implements the Scopes pattern to enhance secure data access.

The changes also involve updates to various project files, reflecting the new version number and modifications in dependencies. The CHANGELOG has been updated to include these enhancements and to provide a clearer overview of the deprecations and improvements made in this release candidate. This commit sets the stage for further testing and refinement before the final release, signaling a significant step forward for the Phoenix framework.

Files changed

  • CHANGELOG.md
  • installer/lib/phx_new/generator.ex
  • installer/mix.exs
  • installer/mix.lock
  • mix.exs
  • mix.lock
  • package-lock.json
  • package.json
2025-04-01T19:45:06 See commit

This commit removes the compile alias from the Mix project configuration in the installer/mix.exs file. The decision to eliminate this alias stems from a conflict it causes with the archive at runtime, potentially leading to issues during the build or execution process.

The modification involved deleting a single line of code that defined the compile alias, which previously included a function call to copy_core_components/1 followed by the standard "compile" task. The change streamlines the alias configuration by retaining only the "hex.publish" alias, ensuring smoother operation without runtime conflicts.

Files changed

  • installer/mix.exs
2025-04-01T20:47:08 See commit

The recent update to the CHANGELOG.md outlines significant enhancements and structural changes in the upcoming release candidate for version 1.8.0 of the Phoenix framework. Key improvements include the extension of Tailwind CSS support with daisyUI for better theme management, a streamlined layout system that simplifies the creation of new applications by consolidating layout files, and modifications to core components and live generators to align more closely with basic CRUD operations. Additionally, the update introduces features such as passwordless authentication through magic links and a new scopes pattern aimed at ensuring secure data access becomes the default practice for developers.

Furthermore, the update emphasizes security enhancements, particularly with the put_secure_browser_headers function, which now adheres to the latest security practices by implementing a stricter content-security-policy header. The commit also notes the deprecation of certain features, such as specifying layouts without modules and the :trailing_slash option in Phoenix.Router, indicating a shift towards more secure and efficient coding practices in future versions. Overall, these changes aim to provide a more robust, user-friendly experience for both seasoned developers and newcomers.

Files changed

  • CHANGELOG.md
2025-04-02T15:00:30 See commit

The commit introduces a comprehensive guide to Phoenix LiveView, aimed at enhancing the clarity and consistency of the existing documentation. LiveView enables developers to create interactive, real-time applications by maintaining all state on the server while rendering HTML dynamically, reducing the need for extensive client-side JavaScript. The guide outlines the fundamental concepts of LiveView, including its lifecycle, the role of sockets in state management, and the differences between traditional controller-view patterns and the LiveView approach.

The documentation also provides a practical example of a simple LiveView implementation, demonstrating how to set up a basic thermostat feature. It highlights key components such as the mount, handle_event, and render functions, while also explaining how to connect the LiveView to the client using WebSockets. Additionally, the commit updates the mix.exs file to include the LiveView guide in the project documentation, ensuring that users have access to this valuable resource when working with Phoenix applications.

Files changed

  • guides/live_view.md
  • mix.exs
2025-03-28T13:38:16 See commit

The recent commit introduces navigation support to the core component button in a web application. The modifications primarily involve updating the button rendering logic to accommodate navigation features, allowing the button to function as a clickable link when specified. The changes include the addition of the navigate attribute and the ability to handle various link-related attributes such as href and patch.

In the updated implementation, the button component can now render as either a standard button or a link, depending on the presence of navigation attributes. This enhancement provides developers with greater flexibility in creating interactive elements within the application, as illustrated by the modified documentation examples that demonstrate how to use the button with navigation support. Overall, the commit streamlines the button component while enhancing its functionality to better meet user needs.

Files changed

  • priv/templates/phx.gen.live/core_components.ex
2025-03-28T17:21:15 See commit

The commit titled "Inline theme switcher script" focuses on modifying the implementation of a theme switcher feature within the application's layout components. Specifically, it updates the Layouts module in the layouts.ex file by removing a separate private function for the theme switcher script and instead inlining the JavaScript directly into the root.html.heex template. This change simplifies the structure by consolidating the theme switching functionality into a single location, making it easier to manage and understand.

In addition to the structural changes, the commit also includes minor updates to the theme options available for selection. The inlined script retains the same functionality, allowing users to switch between various themes and storing their preferences in local storage. Overall, these modifications enhance the readability and maintainability of the code while ensuring that the theme switcher operates effectively within the user interface.

Files changed

  • installer/templates/phx_web/components/layouts.ex
  • installer/templates/phx_web/components/layouts/root.html.heex
2025-03-30T18:17:01 See commit

This commit addresses issues related to the generated authentication scope when a user specifies a schema name other than the default User. Specifically, it modifies the signed_in_path function in the auth.ex file to ensure it correctly references the user object based on the provided schema name, enhancing the flexibility and correctness of the authentication module.

Additionally, the scope.ex file has been updated to reflect the change in naming conventions. The defstruct definition now uses the specified schema's singular name instead of the hardcoded user, and the documentation has been adjusted accordingly to clarify that it returns nil if no corresponding schema instance is provided. These changes improve the code's adaptability to different schema configurations, ensuring a more robust implementation of the authentication system.

Files changed

  • priv/templates/phx.gen.auth/auth.ex
  • priv/templates/phx.gen.auth/scope.ex