Comments (15)
Hello :-),
Yup, we should do that. We have a lot of possible ways to achieve that. Better ones I have in minds are: either a constant (that will act as a macro) or a static method in the core.
I have another question: does Symfony allow to disable its own exception and error handlers?
Thanks :-).
from core.
I don't know, but the exception/error handlers is only activated on symfony/debug (used in symfony/symfony), you can use all other libraries without having a new exception/error handler system.
from core.
So, there is two “issues”: (i) toggle exception handler and (ii) toggle error to exception handler (note: this last respects the error_reporting
parameter). What would be the default state? Enabled when Hoa is alone, else disabled? How to disable: with a constant (say define('HOA_CORE_EXCEPTION_HANDLER', false)
) or with a static method: (say Hoa\Core\Exception::disableHandler()
)? I have a preference for the second one :-).
from core.
I prefer too the second one ;)
And, as i said in #15, i guess we should deactivate it by default, user will activate it if he want.
from core.
I agree to add static methods to enable/disable error and exception handlers, but can we have a vote for the default values (/ping @osaris, @CircleCode, @camael24, @jubianchi, @shouze…)?
Moreover, do you have a patch to propose?
from core.
+1 for static methods to enable/disable
+1 for disabled by default because we need to make Hoa integration in other tools as smooth as possible if we want it to be widely adopted
from core.
+1 for @osaris :)
from core.
Ok, so what would be the name for those methods: enableErrorHandler(true | false)
and enableExceptionHandler(true | false)
, on Hoa\Core
?
from core.
Yep, that's a good naming to me.
from core.
Do I add these methods respectively on Hoa\Core\Exception
and Hoa\Core\Exception\Error
or on Hoa\Core
(I propose Hoa\Core
since this is an upstream operation: the core “enables” Hoa\Core\Exception\Error
for example).
from core.
+1 for Hoa\Core
from core.
Hoa\Core
from core.
from core.
Done: d3d90b3.
@stephpy: If you agree, please, close the issue :-).
from core.
You're awesome, thanks ;)
from core.
Related Issues (20)
- I'm getting this error *"Hoa main file (Core.php) must be included once."* HOT 7
- mark as deprecated HOT 1
- Support \U, \u, \L, \l, \E and \e in the zFormat HOT 1
- Do we need to cache `extension_loaded` result? HOT 3
- Use a trait for Hoa\Core\Event
- Hoa\Core should NEVER edit php configuration. HOT 12
- Hint IDEs about property. HOT 3
- hoa break when installed globaly HOT 3
- The 'hoa' binary should not be installed with Core HOT 19
- Add a `home` command to open http://hoa-project.net HOT 1
- Setlocal issues in core HOT 4
- PHP7 compatibility
- `Exception::uncaught` can receive a `BaseException` in PHP7.0
- Update `Consistency::isKeyword` for PHP7.0 HOT 1
- Protocol: `stream_stat` is not very verbose when failing
- Does Hoa Core need the "files" load approach in Composer? HOT 14
- Hoa/Core errors when loaded twice HOT 39
- Hoa shouldn't initialize before being used HOT 7
- [meta] Split the core HOT 48
- [meta] Split the core, next HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.