Skip to content

Releases: brick/app

0.3.2

25 Mar 10:27
Compare
Choose a tag to compare

New feature

After compile() has been run, AnnotationRouteCompiler::getRoutes() returns an array of arrays containing:

  • path : string
  • HTTP methods : string[]
  • controller class : string
  • controller method : string

This can be used to print a human-readable list of routes.

0.3.1

24 Mar 22:23
Compare
Choose a tag to compare

Bug fix

@Secure and @Transactional annotations were wrongly requiring their first attribute.
These attributes are now optional again.

0.3.0

22 Mar 18:12
Compare
Choose a tag to compare

New features

  • Support for HTTP methods in @Route annotations
  • Support for custom regexp patterns in @Route annotations

Breaking changes

  • The structure of the arrays returned by AnnotationRouteCompiler, and used by AnnotationRoute, has changed; AnnotationRouteCompiler::compile() must be run again
  • The "options" attribute in @QueryParam and @PostParam annotations has been removed
  • Annotations are now final and use a new, stricter validation method; they now throw a LogicException instead of a RuntimeException on error

0.2.2

22 Mar 11:21
Compare
Choose a tag to compare

New methods

  • RouteMatch::withClassParameters()
  • RouteMatch::withFunctionParameters()

These methods allow to create a copy of a RouteMatch, with additional class/function parameters.

New annotation-based routing

Workflow:

  • Add @Route annotations to controllers
  • Compile routes using AnnotationRouteCompiler
  • Cache the compiled routes and use them as input to AnnotationRoute

Controllers support @Route annotations on both classes & methods. @Route annotations on classes are used as a prefix for @Route annotations on methods.

Controllers support parameters, such as @Route("/book/{id}").

Parameters from @Route on the controller class will be passed as parameters to the class constructor, and parameters from @Route on the controller method will be passed as parameters to the method itself.

0.2.1

31 Jul 11:18
Compare
Choose a tag to compare

ConcatView now supports any number of views.

0.2.0

30 Jul 10:23
Compare
Choose a tag to compare

New feature: support for IP sessions.

Breaking changes:

  • Session is now CookieSession
  • Session::setGcProbability() now returns void
  • Session::setLifetime() now returns void
  • Session::clear() now returns void
  • CookieSession::setCookieParams() now returns void
  • CookieSession::setIdLength() now returns void
  • CookieSession::regenerateId() now returns bool: whether or not the storage supports ID regeneration

0.1.3

19 Jul 21:22
Compare
Choose a tag to compare

Session GC now uses random_int() instead of rand().

0.1.2

14 Feb 12:35
Compare
Choose a tag to compare
  • New plugin: OnBeforeAfterPlugin, replacing:
  • Deprecated plugin: OnRequestResponsePlugin, and related interfaces:
    • OnRequestInterface
    • OnResponseInterface

0.1.1

08 Nov 10:50
Compare
Choose a tag to compare

Now based on brick/http version 0.2

0.1.0

03 Nov 08:17
Compare
Choose a tag to compare

First beta release.