Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Forward port error handling to 2.0.0 #79

Merged

Commits on Nov 7, 2016

  1. Added support for raiseThrowables flag in Dispatch

    When enabled, any middleware dispatch is no longer wrapped in try/catch
    blocks, allowing for exceptions/throwables to bubble out.
    weierophinney committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    0d8d50a View commit details
    Browse the repository at this point in the history
  2. Added "raise throwables" flag to Next implementation

    Added `$raiseThrowables` property and `raiseThrowables()` method, with
    the former defaulting to `false` for backwards compatibility.
    
    Has the following behavior:
    
    - Enables the same flag in the `Dispatch` instance composed.
    - If enabled and `$err` is passed to `__invoke()`:
      - Throwable/Exception values are simply thrown.
      - String arguments are used as the message for a new `MiddlewareException`.
      - Scalar values are reported in a new `MiddlewareException`
      - Array value *types* are reported in a new `MiddlewareException`
      - Object *types* are reported in a new `MiddlewareException`
      - Non-throwable/exception types trigger the deprecation notice
    weierophinney committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    dd82b23 View commit details
    Browse the repository at this point in the history
  3. Added "raise throwables" flag to MiddlewarePipe

    - Disabled by default
    - `raiseThrowables()` enables it
    - When enabled, calls same method on `Next` instance after creating it
    weierophinney committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    2ed65c0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c258193 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'feature/error-handling-poka-yoke' into feature/error-ha…

    …ndling-v2
    
    Forward-ports zendframework#78 to dev-2.0.0.
    
    Conflicts:
    	src/Dispatch.php
    	src/MiddlewarePipe.php
    	src/Next.php
    	test/DispatchTest.php
    	test/NextTest.php
    weierophinney committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    3f2b02e View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2016

  1. Updated __invoke docblock to cover $delegate argument

    Removed section on $out, and replaced with detail on $delegate.
    weierophinney committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    f4539eb View commit details
    Browse the repository at this point in the history
  2. Added tests requested by @xtreamwayz

    Ensure all paths in Dispatch are covered.
    weierophinney committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    d8f38eb View commit details
    Browse the repository at this point in the history
  3. Merge branch 'feature/error-handling-poka-yoke' into feature/error-ha…

    …ndling-v2
    
    Forward port changes made for zendframework#78 (in this case, tests that are no
    longer applicable).
    
    Conflicts:
    	test/DispatchTest.php
    weierophinney committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    be21c25 View commit details
    Browse the repository at this point in the history
  4. Remove unused import

    weierophinney committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    01b9fb3 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'feature/error-handling-poka-yoke' into feature/error-ha…

    …ndling-v2
    
    Forward port changes from zendframework#78.
    
    Conflicts:
    	src/Dispatch.php
    weierophinney committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    69989e3 View commit details
    Browse the repository at this point in the history