phoenix changelog


Hey there, fellow developers! Here’s the latest scoop on what’s been cooking in our codebase. We’ve got some nifty improvements and bug fixes that are sure to make your life a tad easier. Check out the deets below! 🚀

New Features & Improvements

  • Improvement: Fix phx.gen.socket moduledoc grammar and example path
    We’ve polished up the phx.gen.socket module documentation by fixing grammar and punctuation errors. Plus, we corrected an example path for umbrella apps to ensure your sockets land in the right spot. Big shoutout to Juan P Barrios for the assist! 🎉

  • Improvement: Clarify Token secrecy in docs
    We’ve made the Phoenix.Token documentation clearer about how secrecy works. Now it’s easier to understand the difference between signed and encrypted tokens, and we’ve included examples for using encrypt/4 and decrypt/4. Keep your secrets safe, folks! 🕵️‍♂️

  • Improvement: Replace deprecated live_flash for Phoenix.Flash.get in phx.gen.auth
    Out with the old, in with the new! We’ve swapped out the deprecated live_flash with Phoenix.Flash.get in the phx.gen.auth template. This will keep your login_live module running smoothly and up-to-date with the latest Phoenix practices. 🌟

Keep coding and stay awesome! 💻🚀

Included Commits

2024-04-01T08:30:25 See commit

The commit clarifies the level of secrecy provided by the Phoenix.Token module in the documentation. It explains that the data stored in the token is signed to prevent tampering and can optionally be encrypted. If the token is encrypted, the data will be kept secret from the client, but it is still recommended to encode as little secret information as possible to minimize the impact of key leakage. The commit also updates the documentation to include information on how to use the encrypt/4 and decrypt/4 functions in addition to the existing sign/4 and verify/4 functions, providing examples and options for each.

Overall, the commit aims to provide a clearer understanding of how token secrecy works in Phoenix and emphasizes the importance of handling sensitive information securely when using tokens for authentication or data transmission. It also highlights the key considerations for developers to keep in mind when using the Phoenix.Token module to ensure the integrity and confidentiality of the data stored in tokens.

Files changed

  • lib/phoenix/token.ex
2024-04-02T15:59:40 See commit

This commit addresses grammar and punctuation errors in the phx.gen.socket module documentation. It also corrects an example path for an umbrella application, fixing the path for where a socket is generated. The example path was updated from apps/my_app_web/lib/app_name_web/channels to apps/my_app_web/lib/my_app_web/channels. Additionally, the commit includes a co-authorship credit to Juan P Barrios for the contribution.

Overall, this commit improves the clarity and correctness of the phx.gen.socket documentation by fixing grammar, punctuation, and example paths. It ensures that the generated files will be in the correct location for an umbrella application, and also provides a more accurate command for generating channels.

Files changed

  • lib/mix/tasks/phx.gen.socket.ex
2024-04-05T18:01:52 See commit

This commit replaces the deprecated live_flash function with Phoenix.Flash.get in the phx.gen.auth template for the login_live module. The changes include modifying the login_live.ex file by replacing live_flash with Phoenix.Flash.get in the mount function. This change ensures that the code is updated to use the recommended Phoenix.Flash.get function instead of the deprecated live_flash function.

By making this change, the code in the phx.gen.auth template is updated to adhere to best practices and avoid using deprecated functions. This update ensures that the login_live module continues to function correctly and is compatible with the latest version of Phoenix. The use of Phoenix.Flash.get improves the efficiency and maintainability of the code by using the recommended method for accessing flash messages in Phoenix applications.

Files changed

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