Skip to content

Releases: gigili/PHP-routing

v2.0.6

01 Oct 12:24
Compare
Choose a tag to compare

Add new method wrappers:

  • Add a wrapper for adding get endpoint
  • Add a wrapper for adding post endpoint
  • Add a wrapper for adding put endpoint
  • Add a wrapper for adding patch endpoint
  • Add a wrapper for adding delete endpoint

Sample:

$routes
    ->prefix("/test")
    ->middleware(['decode_token'])
    ->route("/t0", function(Request $request){})
    ->get("/t1", function (){})
    ->post("/t2", function (){})
    ->put("/t3", function (){})
    ->patch("/t4", function (){})
    ->delete("/t5", function (){})
    ->save();

Which is equivalent to doing:

$routes
    ->prefix("/test")
    ->middleware(['decode_token'])
    ->route("/t0", function(Request $request){})
    ->route("/t1", function (){}, [Routes::GET])
    ->route("/t2", function (){}, [Routes::POST])
    ->route("/t3", function (){}, [Routes::PATCH])
    ->route("/t4", function (){}, [Routes::PUT])
    ->route("/t5", function (){}, [Routes::DELETE])
    ->save();

v2.0.5.2

17 Sep 20:50
Compare
Choose a tag to compare
  • Fix error thrown when json decode gives an object back

v2.0.5.1

17 Sep 19:29
Compare
Choose a tag to compare
  • Fix PUT and PATCH body data not being parsed correctly
  • Fix not getting request body for PATCH and PUT when using form-data or x-www-form-urlencoded
  • Fix $_FILES being empty when using PATCH or PUT request to upload files

v2.0.5

15 Sep 21:57
Compare
Choose a tag to compare
  • Fix not getting request body for PATCH and PUT when using form-data or x-www-form-urlencoded

v2.0.4.2

24 Aug 07:47
Compare
Choose a tag to compare

Fixed an issue #9

  • when using the ->add method in chained calls that routes doesn't get added if there are multiple ->route calls first

v2.0.4.1

25 Jul 19:37
Compare
Choose a tag to compare
  • Fixed failing tests

v2.0.4

25 Jul 19:31
Compare
Choose a tag to compare
  • Fixed getting the parameters from a PATCH request
    • When the PATCH request was being sent, the body of the request was being put within a sub array so all the calls to $request->get('param_name') where returning NULL

v2.0.3

09 Jul 19:28
db05b80
Compare
Choose a tag to compare

Fix the ability to detect heavily nested dynamic routes with similar paths:

/test/route/{param1}/{param2}
/test/route/{param1}/{param2}/extra

Now these will be detected properly

v2.0.2

30 Apr 20:00
Compare
Choose a tag to compare
  • Add support for custom parameter ordering in callback arguments
  • Fix code formatting
  • Improve code documentation

v2.0.1

09 Apr 21:16
645c31e
Compare
Choose a tag to compare
  • Fixed a bug where prefix and/or middlewares weren't being set properly when using chained methods