Using Ray with Yii

Yii is a high-performance PHP framework for developing modern web applications. Use Ray to help you debug when you're developing a Yii application, extension or module.

spatie/yii-ray

#Installing the package

composer require spatie/yii-ray

This installs Ray as a project dependency, meaning it will also be installed in your production environment. Your application won't break if you forget to remove a ray call. The package doesn't send data when the environment isn't set to dev.

If you prefer, install it as a dev dependency by adding --dev to the composer command. Note that with a dev dependency, any ray calls left in your code will cause errors in production, so you'll need to remove them before deploying. We have some options for detecting Ray calls in your app.

composer require spatie/yii-ray --dev

#Usage

All generic PHP methods are available when using Yii.

To enable ray(), dd() and dump() globally in any file, see the global installation instructions.

#What's next?

Now that Ray is installed in your Yii project, see what you can use it for.

Help us improve this page

Debug without breaking your flow

Ray keeps all your debug output neatly organized in a dedicated desktop app.

Licenses are valid for 1 year and managed through Spatie. Licenses purchased before Ray 3 remain valid. VAT is calculated at checkout.