Download the PHP package ekino/drupal-debug without Composer

On this page you can find all versions of the php package ekino/drupal-debug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drupal-debug

Drupal Debug

Build Status Scrutinizer Code Quality Code Coverage


This library provides an alternative Kernel for Drupal 8 to improve the Developer eXperience during the development process.

This Debug Kernel extends (but substitutes entirely by default) the original Drupal Kernel in order to alter some inner Drupal behaviors. It is done for one reason: help you develop better and faster!

Once this library is installed, you will be able to experience a « debug mode » during the development process. For example, you will not need to manually clear the cache anymore when you add or remove a custom service, a route or a module hook implementation.

Requirements

This library requires that your Drupal project uses Composer. If it is not the case yet, you can check this Composer template for Drupal projects for example.

It has active support for the latest released Drupal minor version only.

It has active support for the currently supported versions of PHP only.

Installation

Require this library as a development dependency.

It MUST only be installed as a development dependency. You do not want to use it in production!

Actions

This library works with « actions ». An action has an unique goal that improves your development experience with Drupal.

At the moment, all actions are enabled and mandatory but the plan is to make most of them optional, step by step.

Also, you cannot provide your own custom actions yet but this is planned for the future as well.

Here is the list of the current available actions and how they help you:

Name Description
Disable CSS Aggregation Disable CSS files aggregation
Disable Dynamic Page Cache Disable Drupal Dynamic Page Cache
Disable Internal Page Cache Disable Drupal Internal Page Cache
Disable JS Aggregation Disable JS files aggregation
Disable Render Cache Disable Drupal Render Cache
Disable Twig Cache Disable Twig Cache
Display Dump Location Display location when you use the dump() function of the Symfony VarDumper component
Display Pretty Exceptions Display a better looking exception page and log exceptions (active when the Request is handled by the Kernel and if the exceptions are caught)
Display Pretty Exceptions ASAP Display a better looking exception page (active as soon as the Kernel is instantiated)
Enable Debug Class Loader Enable the DebugClassLoader of the Symfony Debug component
Enable Twig Debug Enable Twig Debug mode
Enable Twig Strict Variables Enable Twig strict_variables option (disabled at the moment because the Drupal core is not ready at all)
Throw Errors As Exceptions Throw PHP errors as exceptions
Watch Container Definitions Watch services definitions and service providers files to automatically invalidate the container definition
Watch Modules Hooks Implementations Watch .module files to automatically refresh the modules hooks implementations
Watch Routing Definitions Watch routing definitions files to automatically rebuild the routes

And more to come!

Configuration

Some actions are configurable with options that can be set in a dedicated configuration file. However, this configuration file is not mandatory because every option has a default value that is resolved if it is not explicitly defined.

At the moment, those options are not configurable independently for each action (with this file) but this is of course planned. What is configurable is actually the defaults values of reused options. If you want to specify options for each actions, you have to manually use the Debug Kernel.

Here is the default configuration file content (i.e. the default resolved configuration if the configuration file does not exist, or if a key is not defined):

By default, the location of this configuration file is the root of the project (the parent directory of the Composer vendor directory). But it can be defined with the DRUPAL_DEBUG_CONFIGURATION_FILE_PATH environment variable.

For performance, the resolved configuration is cached. By default, the location of this cache is the system temporary directory. But it can be defined with the DRUPAL_DEBUG_CONFIGURATION_CACHE_DIRECTORY_PATH environment variable.

Here is the list of all the actions that have options :

Display Pretty Exceptions

Display Pretty Exceptions ASAP

Throw Errors As Exceptions

Watch Container Definitions

Watch Modules Hooks Implementations

Watch Routing Definitions

Composer commands

Here is the list of the provided Composer commands that help you manage the configuration file:

Command Alias Description
composer drupal-debug:dump-reference-configuration-file None Dump the reference configuration file
composer drupal-debug:disable-original-drupal-kernel-substitution composer drupal-debug:disable Alter the configuration file to disable the original Drupal Kernel substitution
composer drupal-debug:enable-original-drupal-kernel-substitution composer drupal-debug:enable Alter the configuration file to enable the original Drupal Kernel substitution

Original Drupal Kernel substitution

Substituting the original Drupal Kernel concretely means that every time the DrupalKernel class is used somewhere after the Composer autoload file has been required, it is this library DebugKernel class that is actually being used, despite appearances!

It is great because any third party libraries interacting with Drupal (such as drush for example) will automatically use the Debug Kernel.

However, it could lead to unwanted behaviors, especially during the WIP phase of this library. This is why you SHOULD NOT use the original Drupal Kernel substitution when you run your tests for example. Keep it for the development part only!

Manually use the Debug Kernel

It is possible to directly use the Debug Kernel in your front controller (typically the index.php file in your web exposed directory) to specify options for each actions. It is also the solution to use the Debug Kernel with the original Drupal Kernel substitution disabled.

You simply need to use the OptionsStackBuilder helper class to build an OptionsStack instance and pass it to the DebugKernel constructor.

Manually setting an option in the options stack overrides the default value defined by the configuration (if it exists).

Here is an example usage:


All versions of drupal-debug with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
composer-plugin-api Version ^1.1
drupal/core Version ^8.6
monolog/monolog Version ^1.3
nesbot/carbon Version ^1.24
symfony/config Version ^3.4 || >=4.0 <4.3
symfony/console Version ^3.4 || ^4.0
symfony/debug Version ^3.4.22 || ^4.1.11 || ^4.2.3
symfony/dependency-injection Version ^3.4 || ^4.0
symfony/event-dispatcher Version ^3.4 || ^4.0
symfony/filesystem Version ^3.4 || ^4.0
symfony/http-foundation Version ^3.4 || ^4.0
symfony/http-kernel Version ^3.4 || ^4.0
symfony/polyfill-php70 Version ^1.0
symfony/property-access Version ^3.4 || ^4.0
symfony/var-dumper Version ^3.4 || ^4.0
symfony/yaml Version ^3.4 || ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ekino/drupal-debug contains the following files

Loading the files please wait ....