Skip to content

Releases: oscarpalmer/numidium

0.19.0

26 Oct 21:24
Compare
Choose a tag to compare
0.19.0 Pre-release
Pre-release
  • A little refactoring of class names to be more specific, e.g., Resource -> ResourceController
  • Dependencies-class has been moved to routing items folder

0.18.0

26 Oct 20:48
Compare
Choose a tag to compare
0.18.0 Pre-release
Pre-release

Resources! A custom route, of sorts, allowing you to quickly add routes matching specific paths and http methods for managing data. Somewhat inspired by Rails' route building, but with standard-y HTTP methods and nicer URLs, in my opinion.

Using the code below:

$numidium->resources(function (oscarpalmer\Numidium\Routing\Items\Resources $resources) {
    $resources->add('users', UserController::class);
});

Will result in routes matching:

[GET, HEAD]  /users             A route for showing all users
[GET, HEAD]  /users/#id         A route for showing a user
[GET, HEAD]  /users/#id/edit    A route for showing a form for editing a user

[POST]       /users/create      A route for creating a new user
[POST]       /users/#id/remove  A route for removing a user
[POST]       /users/#id/update  A route for updating a user

While your class must inherit oscarpalmer\Numidium\Controllers\Resource to then properly respond to all these routes.

0.17.0

04 Apr 16:42
Compare
Choose a tag to compare
0.17.0 Pre-release
Pre-release
  • Minor refactoring
  • During controller matching:
    • Simple paths – /path – will try to match path::handle and default::path, in that order
    • Nested paths – /a/nested/path – will try to match a\nested::path and a\nested\path::handle, in that order

0.16.0

29 Nov 13:19
Compare
Choose a tag to compare
0.16.0 Pre-release
Pre-release

Tests added for just about everything…

0.15.0

05 Sep 16:42
Compare
Choose a tag to compare
0.15.0 Pre-release
Pre-release
  • Configuration split into manager and validator-classes
  • JSON response helper

0.14.0

04 Sep 17:06
Compare
Choose a tag to compare
0.14.0 Pre-release
Pre-release
  • Controller matching for routes
    • If there are no existing routes, Numidium will try to find a controller (and method) based on path:
      • e.g. a/nested/route will try to match (in order):
        • class A\Nested\Route and method handle (like a PSR request handler)
        • class A\Nested\Route and method index
        • class A\Nested and method route
    • Configuration options added for controllers:
      • controller_prefix for controller namespace
        • e.g. /a/nested/route should match ControllerPrefix\A\Nested\Route instead of A\Nested\Route
      • default_controller for defining a controller to handle root routes
        • e.g. /a matches class A and class DefaultController (with method a)
  • Error exception class added for creating error responses
  • Float values are now handled by parameters

0.13.0

01 Sep 17:14
Compare
Choose a tag to compare
0.13.0 Pre-release
Pre-release
  • Support for PSR-middleware
  • Removed support for outputting objects, i.e. encoding objects with JSON
  • Improved path handling
  • Added documentation (in code) for most public methods

0.12.0

29 Aug 20:11
Compare
Choose a tag to compare
0.12.0 Pre-release
Pre-release

Support for dependency injection for class-based route and error callbacks thanks to Container.

0.11.0

28 Aug 17:56
Compare
Choose a tag to compare
0.11.0 Pre-release
Pre-release
  • Route and Error now extend the RequestHandlerInterface
  • Improved handling of Route and Error callbacks

0.10.0

28 Aug 16:47
Compare
Choose a tag to compare
0.10.0 Pre-release
Pre-release
  • Callbacks for routes and error now only accept closures and strings
  • Default headers added as configuration item
  • Parameters object has been extended with url query values and url fragment