Download the PHP package mmstewart/laravel-x-ray without Composer
On this page you can find all versions of the php package mmstewart/laravel-x-ray. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mmstewart/laravel-x-ray
More information about mmstewart/laravel-x-ray
Files in mmstewart/laravel-x-ray
Package laravel-x-ray
Short Description A Laravel upgrade compatibility scanner that identifies potential issues before upgrading your application.
License MIT
Homepage https://github.com/mmstewart/laravel-x-ray
Informations about the package laravel-x-ray
Laravel X-Ray
Laravel X-Ray scans your Laravel application for potential compatibility issues before a Laravel version upgrade.
It compares relevant parts of your application against the target Laravel skeleton and analyzes dependencies, PHP requirements, bootstrap configuration, environment variables, and configuration files.
Why Laravel X-Ray?
Laravel upgrades can involve more than changing the version of laravel/framework.
Dependencies may require newer versions, the Laravel application skeleton may change, and configuration or bootstrap files may need attention.
Laravel X-Ray gives you a report of potential issues before you begin the upgrade.
Requirements
- PHP 8.4+
- Laravel 11, 12, or 13
Installation
You can install the package via Composer:
Usage
X-Ray accepts optional from and to arguments to specify the Laravel versions you want to compare.
Compare specific Laravel versions
The first argument (11.x) is the source Laravel version, and the second argument (13.x) is the target version you plan to upgrade to.
Version arguments accept either lowercase or uppercase x. For example, 11.x and 11.X are both valid.
Automatic version detection
If you omit the arguments, X-Ray determines the source branch from your installed Laravel version and uses Laravel's default GitHub repository branch as the target:
Version validation
X-Ray validates the supplied version arguments before performing the comparison.
- Valid formats:
11.x,12.x,13.x,11.X,12.X, and13.X. - Invalid formats:
11x,12, and13x. - Downgrade attempts: A target version lower than the source version is rejected.
- Same version: If the source and target versions are identical, X-Ray reports that no newer Laravel skeleton branch is available.
Example output
Note: X-Ray identifies potential upgrade issues by comparing Laravel skeleton changes and dependency requirements. Review the findings in the context of your application; the report does not guarantee that an upgrade will succeed without additional changes.
Running php artisan laravel-x-ray 11.x 13.x produces a report similar to the following:
Use explicit versions when planning a specific upgrade, or omit the arguments to let X-Ray detect the versions automatically.
What It Checks
Composer dependencies
Laravel X-Ray checks your Composer dependencies against the target Laravel version.
It can identify:
- PHP version requirements
- Laravel framework dependencies
- Development dependencies
- Third-party packages with Laravel compatibility requirements
- Dependencies that may require a version change
Bootstrap configuration
Laravel X-Ray compares your bootstrap/app.php against the target Laravel application structure.
It can detect:
- Legacy Laravel bootstrap patterns
- Missing
withRouting() - Missing
withMiddleware() - Missing
withExceptions()
Environment variables
Laravel X-Ray compares your .env.example against the target Laravel skeleton and identifies newly introduced environment variables that are missing from your application.
Laravel X-Ray intentionally checks
.env.examplerather than.env. Your.envmay contain sensitive values and should not be committed or uploaded.
Configuration files
Laravel X-Ray identifies configuration files that have been added, removed, or modified between Laravel versions.
It can detect:
- Configuration files added by the target Laravel version
- Configuration files removed by the target Laravel version
- Known configuration migrations that may require changes to your application
- Known environment variable changes within Laravel service configuration
X-Ray intentionally does not report every modified configuration file. It focuses on known Laravel changes that provide an actionable upgrade warning or informational finding.
Configuration
Publish the configuration file:
The configuration allows you to control features such as caching, analyzers, GitHub authentication, and minimum severity.
Example:
GitHub Token
A GitHub token is optional. Laravel X-Ray can use the GitHub API without one, but authenticated requests have a higher API rate limit.
If you want to provide a token, add GITHUB_TOKEN to your application's .env file:
You do not need to configure a token for X-Ray to work.
Caching
Laravel X-Ray caches Laravel skeleton and Packagist data to avoid unnecessary API requests.
Caching can be disabled in the configuration:
Severity Levels
Findings are grouped by severity:
| Severity | Meaning |
|---|---|
| Error | A compatibility issue that may prevent the application from working correctly |
| Warning | An issue that should be addressed during the upgrade |
| Info | Something that should be reviewed but is not necessarily a compatibility problem |
You can configure the minimum severity reported by X-Ray.
Available levels:
Testing
Run the test suite with:
Changelog
See CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review the Security Policy for information on reporting vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-x-ray with dependencies
spatie/laravel-package-tools Version ^1.16
composer/semver Version ^3.0
illuminate/contracts Version ^11.0||^12.0||^13.0