{"id":19324920,"url":"https://github.com/spatie/global-ray","last_synced_at":"2025-05-15T14:08:34.697Z","repository":{"id":37476783,"uuid":"462800272","full_name":"spatie/global-ray","owner":"spatie","description":"Enable Ray in all PHP files on your system","archived":false,"fork":false,"pushed_at":"2025-02-25T15:53:22.000Z","size":2035,"stargazers_count":216,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-09T13:56:02.327Z","etag":null,"topics":["debugging","php","ray"],"latest_commit_sha":null,"homepage":"https://myray.app","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"spatie"}},"created_at":"2022-02-23T15:45:00.000Z","updated_at":"2025-04-16T07:39:08.000Z","dependencies_parsed_at":"2024-06-21T15:44:35.508Z","dependency_job_id":"c6f6438d-707b-49d8-8f75-47f92cd2c764","html_url":"https://github.com/spatie/global-ray","commit_stats":{"total_commits":248,"total_committers":11,"mean_commits":"22.545454545454547","dds":0.5887096774193548,"last_synced_commit":"d881ce85ac3d1ded2df3072081e855dba882d150"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":"spatie/package-skeleton-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fglobal-ray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fglobal-ray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fglobal-ray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fglobal-ray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/global-ray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","php","ray"],"created_at":"2024-11-10T02:07:30.272Z","updated_at":"2025-05-15T14:08:29.685Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":["https://github.com/sponsors/spatie"],"categories":[],"sub_categories":[],"readme":"# Enable `ray()`, `dd()` and `dump()` in all PHP files on your system\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/global-ray.svg?style=flat-square)](https://packagist.org/packages/spatie/global-ray)\n[![Tests](https://github.com/spatie/global-ray/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/spatie/global-ray/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/spatie/global-ray.svg?style=flat-square)](https://packagist.org/packages/spatie/global-ray)\n\n[Ray](https://myray.app) is a wonderful desktop application that can help you debug applications faster. It can beautifully show you all debugging information, can pause your code, measure performance and [a whole lot more](https://spatie.be/docs/ray/v1/usage/framework-agnostic-php-project).\n\nTo send debugging information to Ray, you can use the `ray()` function. \n\nBy installing `spatie/global-ray`, you can use `ray()` and [all framework agnostic Ray functions](https://spatie.be/docs/ray/v1/usage/framework-agnostic-php-project) in any PHP app or script on your system. \n\nIf you installed a specific Ray package, such as [spatie/laravel-ray](https://spatie.be/docs/ray/v1/usage/laravel) in your project already, then `ray()` will execute that specific version, so you can use still use framework specific things such as `ray()-\u003eshowQueries()` to show all executed queries.\n\n❤️ As a bonus the popular `dd` and  `dump` functions will be made available globally too.\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/global-ray.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/global-ray)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Installation\n\nYou can install the global Ray via composer:\n\n```bash\ncomposer global require spatie/global-ray\nglobal-ray install\n```\n\nWhen running `global-ray install`, we'll add a line in your `php.ini` to automatically load the functions provided by this package.\n\n## Usage\n\nYou can use `ray()` and [all Ray's framework agnostic functions](https://spatie.be/docs/ray/v1/usage/framework-agnostic-php-project) in any PHP file.\n\nThe `rd()`, `dump()` and `dd()` will also be available in any PHP project or script.\n\n## Using framework specific functionality\n\nTo use framework specific functionality, such as [viewing queries in Laravel](https://spatie.be/docs/ray/v1/usage/laravel#showing-queries), or [displaying mails in WordPress](https://spatie.be/docs/ray/v1/usage/wordpress#displaying-mails), you should still [install the relevant package or library](https://spatie.be/docs/ray/v1/installation-in-your-project/introduction).\n\nIf a framework specific package is detected, it will be used instead of the global Ray.\n\n## How to uninstall\n\nTo uninstall you must first issue this command:\n\n```bash\nglobal-ray uninstall\n```\n\nThis will remove the line in `php.ini` that automatically loads `ray()` and related functions.\n\nAfter that, you can uninstall the package itself using\n\n```bash\ncomposer global remove spatie/global-ray\n```\n\n\n## Troubleshooting\n\nIf suddenly all of PHP scripts terminate very early with a strange error after upgrading PHP or switching to another version, then global ray might be the culprit. \n\nAs mentioned before, during install we slightly modify your `php.ini`. To manually uninstall global ray, remove the script named `global-ray-loader.php` in the `auto_prepend_file` directive in `php.ini`. \n\nYou find the location of your `php.ini` by executing this command:\n\n```php\nphp --ini\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Steve Bauman](https://github.com/stevebauman)\n- [Freek Van der Herten](https://github.com/freekmurze)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Fglobal-ray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Fglobal-ray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Fglobal-ray/lists"}