Skip to content

Nexus - Immutability, RFC 3986

Choose a tag to compare

@devosc devosc released this 24 May 22:29
· 157 commits to master since this release

The route, request, response, headers and view models are now immutable by default. This has introduced the ability for Models to be either immutable, a configuration or an overloaded class and in some cases can be used interchangeably.

The url route generator now RFC 3986 encodes urls but keeps some characters unchanged for readability, e.g square brackets for php query strings. The url generator can also create urls without a route configuration by prefixing the path with a forward slash. Child routes of the current parent route can now have the parent parameters automatically injected.

The view template renderer function can now render templates without a view model service configuration by prefixing the template path with a directory separator. Because the layout model is now immutable, polymorphism can be used to create a shared layout class that overrides the immutable with and without methods to prevent the class from being cloned; an example is in the demo application.

Request headers now keeps the host header first on the list and names are converted to lowercase to support case-insensitive usage.

The model set, remove, with and without methods now accepts an array of key values. This allows the with and without methods to only require a single clone operation.

The documentation has also been updated https://mvc5.github.io.