All Projects → symfony → Error Handler

symfony / Error Handler

Licence: mit
The ErrorHandler component provides tools to manage errors and ease debugging PHP code.

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Error Handler

Security Http
Security provides an infrastructure for sophisticated authorization systems, which makes it possible to easily separate the actual authorization logic from so called user providers that hold the users credentials. It is inspired by the Java Spring framework.
Stars: ✭ 1,146 (-38.12%)
Mutual labels:  symfony, symfony-component, component
Security
The Security component provides a complete security system for your web application.
Stars: ✭ 1,195 (-35.48%)
Mutual labels:  symfony, symfony-component, component
Security Guard
The Guard component brings many layers of authentication together, making it much easier to create complex authentication systems where you have total control.
Stars: ✭ 1,157 (-37.53%)
Mutual labels:  symfony, symfony-component, component
Var Exporter
The VarExporter component allows exporting any serializable PHP data structure to plain PHP code. While doing so, it preserves all the semantics associated with the serialization mechanism of PHP (__wakeup, __sleep, Serializable).
Stars: ✭ 1,616 (-12.74%)
Mutual labels:  symfony, symfony-component, component
Polyfill
PHP polyfills
Stars: ✭ 1,333 (-28.02%)
Mutual labels:  symfony, symfony-component, component
Web Link
The WebLink component manages links between resources. It is particularly useful to advise clients to preload and prefetch documents through HTTP and HTTP/2 pushes.
Stars: ✭ 1,060 (-42.76%)
Mutual labels:  symfony, symfony-component, component
Console
The Console component eases the creation of beautiful and testable command line interfaces.
Stars: ✭ 8,988 (+385.31%)
Mutual labels:  symfony, symfony-component, component
Telegram Notifier
Provides Telegram integration for Symfony Notifier.
Stars: ✭ 30 (-98.38%)
Mutual labels:  symfony, symfony-component, component
Polyfill Php54
This component provides functions unavailable in releases prior to PHP 5.4.
Stars: ✭ 93 (-94.98%)
Mutual labels:  symfony, symfony-component, component
Security Core
Security provides an infrastructure for sophisticated authorization systems, which makes it possible to easily separate the actual authorization logic from so called user providers that hold the users credentials. It is inspired by the Java Spring framework.
Stars: ✭ 1,264 (-31.75%)
Mutual labels:  symfony, symfony-component, component
Http Foundation
The HttpFoundation component defines an object-oriented layer for the HTTP specification.
Stars: ✭ 8,068 (+335.64%)
Mutual labels:  symfony, symfony-component, component
Polyfill Php55
This component provides functions unavailable in releases prior to PHP 5.5.
Stars: ✭ 105 (-94.33%)
Mutual labels:  symfony, symfony-component, component
Event Dispatcher
The EventDispatcher component provides tools that allow your application components to communicate with each other by dispatching events and listening to them.
Stars: ✭ 7,946 (+329.05%)
Mutual labels:  symfony, symfony-component, component
Class Loader
[DEPRECATED] The ClassLoader component provides tools to autoload your classes and cache their locations for performance.
Stars: ✭ 1,131 (-38.93%)
Mutual labels:  symfony, symfony-component, component
Finder
The Finder component finds files and directories via an intuitive fluent interface.
Stars: ✭ 7,840 (+323.33%)
Mutual labels:  symfony, symfony-component, component
Http Client
The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously.
Stars: ✭ 1,186 (-35.96%)
Mutual labels:  symfony, symfony-component, component
Polyfill Xml
This polyfill is deprecated. Use the symfony/polyfill-php72 package instead.
Stars: ✭ 11 (-99.41%)
Mutual labels:  symfony, symfony-component, component
Routing
The Routing component maps an HTTP request to a set of configuration variables.
Stars: ✭ 7,080 (+282.29%)
Mutual labels:  symfony, symfony-component, component
Security Csrf
The Security CSRF (cross-site request forgery) component provides a class CsrfTokenManager for generating and validating CSRF tokens.
Stars: ✭ 1,220 (-34.13%)
Mutual labels:  symfony, symfony-component, component
Polyfill Util
This component provides binary-safe string functions, using the mbstring extension when available.
Stars: ✭ 1,364 (-26.35%)
Mutual labels:  symfony, symfony-component, component

ErrorHandler Component

The ErrorHandler component provides tools to manage errors and ease debugging PHP code.

Getting Started

$ composer require symfony/error-handler
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\ErrorHandler\ErrorHandler;
use Symfony\Component\ErrorHandler\DebugClassLoader;

Debug::enable();

// or enable only one feature
//ErrorHandler::register();
//DebugClassLoader::enable();

// If you want a custom generic template when debug is not enabled
// HtmlErrorRenderer::setTemplate('/path/to/custom/error.html.php');

$data = ErrorHandler::call(static function () use ($filename, $datetimeFormat) {
    // if any code executed inside this anonymous function fails, a PHP exception
    // will be thrown, even if the code uses the '@' PHP silence operator
    $data = json_decode(file_get_contents($filename), true);
    $data['read_at'] = date($datetimeFormat);
    file_put_contents($filename, json_encode($data));

    return $data;
});

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].