Skip to content

Commit

Permalink
add global install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Jan 4, 2025
1 parent ea3145a commit d214628
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,34 @@ Multi-purpose colorful modern alternative to [var_dump](https://www.php.net/manu

VarDump is available through [Packagist](https://packagist.org/packages/chevere/var-dump) and the repository source is at [chevere/var-dump](https://github.com/chevere/var-dump).

Run the following command to install VarDump as a development dependency of your project:

```sh
composer require --dev chevere/var-dump
```

### Global installation

To make the `vd()` function available globally in any PHP code, install VarDump globally:

```sh
composer global require chevere/var-dump
```

If not already configured, add the global Composer dependencies to your `php.ini`:

```ini
auto_prepend_file = ${HOME}/.composer/vendor/autoload.php
```

Run the following command to select and update the `auto_prepend_file` directive in your `php.ini`:

```sh
bash <(curl -sL chevere.org/bin/composer/global-prepend.sh)
```

You can now use VarDump in any PHP script without requiring the library for each project.

## Quick start

* Use `vd` to dump information about any variable (replaces `var_dump` and `dump`)
Expand Down

0 comments on commit d214628

Please sign in to comment.