paq85 / phpstarter
Set of tools for a good start of PHP project
v1.0.0
2015-03-23 10:05 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2025-03-15 19:20:30 UTC
README
Takes care preparing PHP's settings to let you work on a well written project
\Paq\PhpStarter\PhpStarter::start();
What does it do?
- Report all Errors
- Convert PHP Errors, Notices etc. to Exceptions
Why?
- Having error reporting enabled with conversion to exceptions gives you full control over your code. It makes writing automatic tests easier which let's you provide much better software. Many people disable error reporting in Production. IMHO it should be ENABLED on all environments.
Convert PHP Errors, Notices etc. to Exceptions
If you only want to convert PHP Errors to Exceptions use
\Paq\PhpStarter\PhpStarter::convertErrorsToExceptions();
Tips
You SHOULD NOT use "@" (Inline Error Suppression) in your code.
See PHP The Right Way: Errors and Exceptions
Credits
Thanks to
- Xstream Ingest development team.