Download the PHP package spatie/x-ray without Composer

On this page you can find all versions of the php package spatie/x-ray. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package x-ray

Quickly scan source code for calls to Ray

x-ray logo

Package Version license Test Run Status Downloads

This package can quickly scan source code for calls to ray(), rd(), Ray::*, and ->ray() helper methods from the spatie/ray and spatie/laravel-ray packages.

The primary use case is when calls to ray() cannot be left in source code before deploying, even if ray is disabled. This package does NOT remove the calls, it simply displays their locations so they can be removed manually.

The exit code of the x-ray command is zero if no ray calls are found, and non-zero if calls are found. This allows the package to be used in an automated environment such as Github Workflows.

Visit myray.app for information on downloading the Ray debugging app.

Installation

Usage

Specify one or more valid path names and/or filenames to scan:

Display a summary table of the located calls within ./src and ./tests while also ignoring some files:

Display each filename & pass/fail status, along with compact results:

Available Options

Flag Description
--compact or -c Minimal output. Display each result on a single line.
--github or -g GitHub Annotation output. Use error command to create annotation. Useful when you are running x-ray within GitHub Actions.
--ignore or -i Ignore a file or path, can be specified multiple times. Accepts glob patterns.
--no-progress or -P Don't display the progress bar while scanning files
--snippets or -S Display code snippets from located calls
--summary or -s Display a summary of the files/calls discovered
--verbose or -v Display each filename and pass/fail status while scanning. Implies --no-progress.

Configuration files

Create a file named x-ray.yml or x-ray.yml.dist in the root directory of your project to configure the package.

If the configuration file exists, it must have the root sections functions and paths.

Each section may have an ignore or include item, both, or neither. Each item contains an array of strings, and includes override ignores if an entry exists in both. Add a * item to ignore or include all matches (make sure to quote the asterisk).

By default, functions.include matches the ray and rd functions.

Automation

x-ray was designed to be used not only as a manual utility, but in conjunction with automation tools.

Github workflows

You may use x-ray within a github workflow to help ensure you don't commit any calls to ray().

The following example workflow runs unit tests with PHPUnit and then runs x-ray:

Git hooks

In some cases you may want to use a git pre-commit hook to avoid commiting any ray() calls:

You can also use x-ray with husky in your package.json configuration:

Screenshots

Various screenshots can be viewed in the docs.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of x-ray with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
permafrost-dev/code-snippets Version ^1.2.0
permafrost-dev/php-code-search Version ^1.10.5
symfony/console Version ^5.3|^6.0|^7.0
symfony/finder Version ^5.3|^6.0|^7.0
symfony/yaml Version ^5.3|^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spatie/x-ray contains the following files

Loading the files please wait ....