phoenix changelog


Hey there, fellow coders! We've been hard at work sprucing things up, and we have some exciting updates to share with you. Dive into the latest changes below and see how they can supercharge your development journey with Phoenix. πŸš€

  • New Feature: πŸŽ‰ You can now forward requests to the same Plug multiple times, as long as it’s not a router! This change grants you more flexibility in routing configurations, allowing for more creative and dynamic setups. We've updated the Phoenix.Router and Phoenix.Router.Route modules to make this happen, ensuring that your app can handle multiple forwards like a champ. Just remember, dynamic segments in paths are still a no-go to keep everything neat and tidy.

  • Improvement: We've streamlined our project setup by using a single package.json file. This tidy-up not only makes dependency management a breeze but also comes with a new ESLint configuration to keep your code looking sharp. Plus, we’ve tweaked the jest.config.js for better test file detection. This change keeps everything organized and resolves issue #6001, making life easier for developers everywhere. 🌟

  • Improvement: No more accidentally using reserved app names! We've introduced a validation mechanism that raises an error if you try to use names like "server" or "table" for your app. This ensures smoother sailing when creating new Phoenix projects. We've also added tests to make sure this feature works perfectly, keeping your app-naming process conflict-free. 🚫

  • Bugfix: We’ve squashed some pesky typos in our documentation. A missing word in up_and_running.md and a typo in request_lifecycle.md have been fixed, making our docs clearer and more professional. Now, you can focus on building amazing apps without tripping over confusing instructions. πŸ“šβœ¨

Thanks for being awesome and happy coding! πŸ˜„

Included Commits

2025-01-11T15:24:18 See commit

This commit introduces a validation mechanism to prevent the use of reserved application names in the Phoenix framework. Specifically, it raises an error when users attempt to create a new application with names that are deemed reserved, such as "server" and "table." The implementation involves adding a new private function, validate_not_reserved, which checks the provided application name against a predefined list of reserved names. If a match is found, an error is raised, informing the user that the chosen name cannot be used.

Additionally, the commit includes corresponding tests to ensure that the validation works as intended. These tests confirm that attempting to create a new Phoenix project with either of the reserved names results in the appropriate error message being raised. Overall, this enhancement improves the robustness of the application creation process by preventing conflicts with reserved names.

Files changed

  • installer/lib/mix/tasks/phx.new.ex
  • installer/test/phx_new_test.exs
2025-01-11T15:48:13 See commit

This commit consolidates the project's configuration into a single package.json file, streamlining dependency management and project structure. The version of the project has been updated to "1.8.0-dev," and several development dependencies have been added, including ESLint and Jest, along with their respective plugins. The commit also introduces a new ESLint configuration file (eslint.config.mjs) to enforce consistent coding styles and rules across the codebase. Additionally, it modifies the jest.config.js to adjust the test file detection pattern.

Changes to the code include a minor update in the ajax.js file to simplify error handling when parsing JSON responses. The overall aim of these modifications is to enhance code maintainability and testing capabilities, while also improving the developer experience by providing a more organized configuration structure. The commit resolves issue #6001, contributing to the ongoing development and refinement of the project.

Files changed

  • assets/js/phoenix/ajax.js
  • babel.config.json
  • eslint.config.mjs
  • jest.config.js
  • package-lock.json
  • package.json
2025-01-11T22:12:08 See commit

This commit includes minor grammar and typo corrections in the documentation of the Phoenix framework, specifically in the files up_and_running.md and request_lifecycle.md. In up_and_running.md, a missing word was added to clarify that the command completes its execution before opening a new Phoenix application. This enhances the readability and comprehension of the installation instructions.

Additionally, in request_lifecycle.md, a typo in the word "interpolating" was corrected, ensuring that the documentation accurately describes the use of HEEx tags for executing Elixir expressions. Overall, these updates contribute to a more polished and professional presentation of the documentation, improving the user experience for developers working with the Phoenix framework.

Files changed

  • guides/introduction/up_and_running.md
  • guides/request_lifecycle.md
2025-01-15T10:28:15 See commit

This commit introduces a significant change to the Phoenix framework's routing functionality, allowing developers to forward requests to the same Plug multiple times, provided that the Plug in question is not a router. Previously, a Plug could only be forwarded once to prevent potential errors from duplicate invocations of application-defined plugs. The modifications made in this commit include updates to the Phoenix.Router and Phoenix.Router.Route modules, where the handling of forwards has been adjusted to accommodate multiple forwards to the same Plug. The changes also involve the removal of the limitation that restricted the forwarding of a Plug to only once.

In addition to enabling multiple forwards, the commit refines the internal structure of the routing system, enhancing how routes are defined and verified. The forward macro has been updated to ensure that dynamic segments in paths are still disallowed, maintaining the integrity of route definitions. The commit also includes changes to related tests to reflect the new behavior, confirming that the framework correctly handles multiple forwards while ensuring that other constraints remain intact. Overall, this enhancement aims to provide greater flexibility in routing configurations within Phoenix applications.

Files changed

  • lib/phoenix/router.ex
  • lib/phoenix/router/route.ex
  • lib/phoenix/router/scope.ex
  • lib/phoenix/verified_routes.ex
  • test/phoenix/router/forward_test.exs
  • test/phoenix/router/route_test.exs