phoenix changelog


Hey there, awesome devs! We've got some exciting updates for you! 🚀

### New feature: Support for `:mfa` Field in Router Metadata
We've introduced support for the `:mfa` field in router metadata, making your routing even more powerful and flexible! 🎉

- **Router Enhancements**: The `lib/mix/tasks/phx.routes.ex` file now handles the `:mfa` field when determining module and function names.
- **Logging Improvements**: The `lib/phoenix/logger.ex` file now includes the `:mfa` field in log messages for better traceability.
- **Console Formatting**: Log messages are now formatted based on the `:mfa` field in the `lib/phoenix/router/console_formatter.ex` file.
- **Compile-time Checks**: Adjustments in the `lib/phoenix/router.ex` file ensure the `:mfa` field is used effectively during compile-time checks.

And of course, we've updated our tests to make sure everything runs smoothly. The `test/phoenix/router/routing_test.exs` file now tests the behavior of overriding the plug name using the `:mfa` field. 

Enjoy the enhanced functionality and happy coding! 💻✨

Included Commits

2024-06-30T15:39:46 See commit

This commit adds support for the :mfa field in router metadata. In the lib/mix/tasks/phx.routes.ex file, changes were made to handle the :mfa field when determining the module and function name. The lib/phoenix/logger.ex file was modified to include the :mfa field in the log messages. Additionally, changes were made in the lib/phoenix/router/console_formatter.ex file to format the log messages based on the :mfa field. In the lib/phoenix/router.ex file, adjustments were made to use the :mfa field for compile-time checks.

Tests were also updated to include the :mfa field in the metadata for routes, and the test/phoenix/router/routing_test.exs file was modified to test the behavior of overriding the plug name using the :mfa field in the metadata. Overall, this commit enhances the functionality of the router by introducing and utilizing the :mfa field in router metadata.

Files changed

  • lib/mix/tasks/phx.routes.ex
  • lib/phoenix/logger.ex
  • lib/phoenix/router.ex
  • lib/phoenix/router/console_formatter.ex
  • test/mix/tasks/phx.routes_test.exs
  • test/phoenix/router/routing_test.exs