Download the PHP package stopsopa/envext without Composer
On this page you can find all versions of the php package stopsopa/envext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stopsopa/envext
More information about stopsopa/envext
Files in stopsopa/envext
Package envext
Short Description Debugging tools based on symfony VarDumper Component to install locally on dev machine
License MIT
Informations about the package envext
Deprecated because now it is implemented natively in xdebug and in symfony/var-dumper symfony module.
Inspiration
Annotation from VarDumper Component documentation link :
For God's sake, why this library?
Normal dump() function prints variable, but usually it's not enough. Line of execution function dump() is sometimes even more usefull information, especially when You debug something by placing more then one dump() in code and later wants to get rid all of them.
Example:
Usage
This library provides two functions "d()" and "dd()":
- function d() prints data and terminate script by die()
- function dd() prints data and allows script to continue
Installation without including to project
sudo -i
cd /bin
composer require stopsopa/envext:dev-master
add to php.ini (http and cli mode) (/etc/php.ini for centos):
auto_prepend_file = /bin/vendor/autoload.php
setup nginx (usually somewhere in /etc/nginx/sites-enabled/default.conf) ...
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index app.php;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_param PHP_VALUE "auto_prepend_file = /bin/vendor/autoload.php";
}
.. or setup apache2
<Directory />
AllowOverride none
Require all denied
Php_value auto_prepend_file /bin/vendor/autoload.php
</Directory>
restart nginx/apache (... or other http server)
centos
/etc/init.d/nginx restart
sudo apachectl restart
ubuntu
sudo service nginx restart
sudo service apache2 restart
Test
cli
echo '<?php dd("one");d("stop here");d("should t see this");' > test.php && php test.php && rm test.php
web
echo '<?php dd("one");d("stop here");d("should t see this");' > test.php
... and call from web, then remove test.php