snicco / snicco

Taking the pain out of enterprise WordPress development
https://snicco.io
Other
125 stars 17 forks source link

[BUG]: Exception transformer cant be loaded from DI container #132

Closed calvinalkan closed 2 years ago

calvinalkan commented 2 years ago

Thanks for taking the time to fill out this bug report!"

Which @snicco/* package(s) are the source of the bug?

http-routing-bundle

Is this a regression?

No

Composer dependencies

filp/whoops                       2.14.5     php error handling for cool kids
laminas/laminas-httphandlerrunner 2.1.0      Execute PSR-15 RequestHandlerInterface instances and emit responses...
league/tactician                  v1.1.0     A small, flexible command bus. Handy for building service layers.
league/tactician-logger           v0.11.0    Adds PSR-3 logging support to the Tactician command bus
middlewares/negotiation           v2.1.0     Middleware to implement content negotiation
middlewares/utils                 v3.3.0     Common utils for PSR-15 middleware packages
nikic/fast-route                  v1.3.0     Fast request router for PHP
nyholm/psr7                       1.5.0      A fast PHP7 implementation of PSR-7
nyholm/psr7-server                1.0.2      Helper classes to handle PSR-7 server requests
paragonie/random_compat           v9.99.100  PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
php-http/message-factory          v1.0.2     Factory interfaces for PSR-7 HTTP Message
pimple/pimple                     v3.5.0     Pimple, a simple Dependency Injection Container
psr/container                     1.1.2      Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher              1.0.0      Standard interfaces for event handling.
psr/http-factory                  1.0.1      Common interfaces for PSR-7 HTTP message factories
psr/http-message                  1.0.1      Common interface for HTTP messages
psr/http-server-handler           1.0.1      Common interface for HTTP server-side request handler
psr/http-server-middleware        1.0.1      Common interface for HTTP server-side middleware
psr/log                           1.1.4      Common interface for logging libraries
ramsey/uuid                       3.9.6      Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 v...
snicco/application-layer-bundle   dev-master An application layer bundle for building large, enterprise WordPres...
snicco/better-wp-api              v1.0.1     This small package tries to solve the pain point of not being able ...
snicco/better-wp-hooks            v1.0.1    
snicco/better-wp-hooks-bundle     v1.0.1    
snicco/better-wpdb                v1.0.1     Keeps you safe and sane when working with custom tables in WordPress.
snicco/better-wpdb-bundle         v1.0.1    
snicco/debug-bundle               v1.0.1    
snicco/event-dispatcher           v1.0.1    
snicco/http-routing               v1.0.1     The HTTP and routing component of the snicco framework
snicco/http-routing-bundle        v1.0.1    
snicco/kernel                     v1.0.1     The core of the snicco framework
snicco/method-override-middleware v1.0.1    
snicco/pimple-bridge              v1.0.1     Provides an adapter for the pimple DI container for snicco/kernel
snicco/psr7-error-handler         v1.0.1     A powerful and customizable error handler for psr7 apps.
snicco/str-arr                    v1.0.1     A standalone implementation of Laravel's Str and Arr classes.
snicco/templating                 v1.0.1     Provides a unified API for various templating engines.
snicco/templating-bundle          v1.0.1    
symfony/polyfill-ctype            v1.25.0    Symfony polyfill for ctype functions
webimpress/safe-writer            2.2.0      Tool to write files safely, to avoid race conditions
webmozart/assert                  1.10.0     Assertions to validate method input/output with nice error messages.
willdurand/negotiation            3.1.0      Content Negotiation tools for PHP provided as a standalone library.

Current behaviour

It's not possible to load a custom ExceptionTransformer from the DI container.

A check for existence in the container is missing here

Assuming a "newable" class should be done only as a fallback.

Expected behaviour

//

How to reproduce

//

Possible solution

No response

Relevant log output

No response

Additional Context

No response

snicco-bot commented 2 years ago

:tada: This issue has been resolved in version 1.0.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: