Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stopsopa/envext
Now similar user experience is implemented natively
https://github.com/stopsopa/envext
Last synced: 22 days ago
JSON representation
Now similar user experience is implemented natively
- Host: GitHub
- URL: https://github.com/stopsopa/envext
- Owner: stopsopa
- Created: 2016-09-07T12:04:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T08:45:46.000Z (over 7 years ago)
- Last Synced: 2024-04-14T07:27:05.447Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Deprecated because now it is implemented natively in xdebug and in symfony/var-dumper symfony module.
===[![Latest Stable Version](https://poser.pugx.org/stopsopa/envext/v/stable)](https://packagist.org/packages/stopsopa/envext)
Inspiration
===Annotation from VarDumper Component documentation [link](http://symfony.com/doc/current/components/var_dumper.html) :
![ScreenShot](https://raw.githubusercontent.com/stopsopa/envext/master/inspiration.bmp)
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:
![ScreenShot](https://raw.githubusercontent.com/stopsopa/envext/master/web.bmp)
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 continueInstallation 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
AllowOverride none
Require all denied
Php_value auto_prepend_file /bin/vendor/autoload.php
restart nginx/apache (... or other http server)
centos
/etc/init.d/nginx restart
sudo apachectl restart
ubuntu
sudo service nginx restart
sudo service apache2 restartTest
===cli
echo ' test.php && php test.php && rm test.php
web
echo ' test.php
... and call from web, then remove test.php