PHPackages                             php-upgrade-preflight/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. php-upgrade-preflight/core

ActiveLibrary

php-upgrade-preflight/core
==========================

Deterministic Composer/PHP upgrade analysis core.

v0.1.0(today)01↑2900%2PolyForm-Noncommercial-1.0.0PHPPHP ^8.0

Since Aug 8Pushed todayCompare

[ Source](https://github.com/ValentinNikolaev/php-upgrade-preflight-core)[ Packagist](https://packagist.org/packages/php-upgrade-preflight/core)[ Docs](https://github.com/ValentinNikolaev/php-upgrade-preflight)[ RSS](/packages/php-upgrade-preflight-core/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (2)Used By (2)

PHP Upgrade Preflight
=====================

[](#php-upgrade-preflight)

PHP Upgrade Preflight analyzes Composer-based PHP upgrades before you change the target project. It copies `composer.json` and `composer.lock` into temporary workspaces, runs isolated Composer scenarios, scans source files, and produces a canonical JSON report or a Markdown projection.

The v0.1 package line supports PHP `^8.0` (PHP 8.0 through PHP 8.x). Its first framework adapter covers Laravel 7 projects targeting Laravel 8 or 9, including PHP platform changes and common Laravel package constraints.

The Laravel adapter can be installed alongside Laravel 8 and 9 on PHP 8.0, Laravel 10 on PHP 8.1, and the additionally declared Laravel 11/12 host integrations on PHP 8.2. These host-installability ranges do not expand the v0.1 upgrade-rule scope beyond Laravel 8/9 targets.

Install
-------

[](#install)

Install the CLI and Laravel adapter in a separate tools directory when the target project still runs PHP 7 or must remain byte-for-byte unchanged:

```
mkdir php-upgrade-tools
cd php-upgrade-tools
composer require php-upgrade-preflight/cli php-upgrade-preflight/laravel
```

You can install both packages as development dependencies in a project that already runs PHP 8.0 or later:

```
composer require --dev php-upgrade-preflight/cli php-upgrade-preflight/laravel
```

See [Installation](docs/installation.md) and [External analysis](docs/external-analysis.md) for package choices, Windows commands, and the PHP 7.4 workflow.

Run an analysis
---------------

[](#run-an-analysis)

```
vendor/bin/upgrade-intel analyze \
  --path=/projects/legacy-app \
  --from-php=7.4 \
  --target=laravel/framework:^9.0 \
  --target-php=8.1 \
  --framework=laravel \
  --format=json \
  --output=/projects/reports/legacy-app.json
```

Laravel applications with the adapter installed also expose an Artisan command:

```
php artisan upgrade:analyze \
  --from-php=7.4 \
  --target=laravel/framework:^9.0 \
  --target-php=8.1 \
  --format=markdown \
  --output=/projects/reports/legacy-app.md
```

The analyzer returns `0` after producing a valid report, including reports whose `resolution.status` is `blocked` or `unknown`. Automation should read that field instead of treating the process exit code as upgrade feasibility.

Read-only analysis
------------------

[](#read-only-analysis)

The analyzer treats the target project as immutable input. Composer runs only in disposable workspaces, with scripts and plugins disabled. Report destinations supplied through `--output` must sit outside the analyzed project. Tests snapshot every fixture file before analysis and verify the original bytes afterward.

Composer stdout, stderr, diagnostics, and command failure messages pass through a deterministic secret boundary before they can reach reports or console diagnostics. Credential-bearing URLs, authorization values, common token forms, and named credential fields are replaced with stable redaction markers; release CI also scans generated reports and archives with synthetic canaries.

`--debug` preserves temporary workspaces for investigation. A debug run therefore leaves copied Composer files on disk and reports each path.

Reports
-------

[](#reports)

JSON is the canonical report. The current contract uses schema version `0.6`, independent of the tool version. Reports contain:

- scenario commands, solver outcomes, diagnostics, and candidate-lock fingerprints;
- package changes, structured blockers, source usage, and framework findings;
- staged actions, test guidance, risk, effort, uncertainty, and linked evidence.

Six application-shaped Laravel fixtures have approved JSON and Markdown snapshots in [`packages/laravel/tests/Snapshots`](packages/laravel/tests/Snapshots). CI runs the same suite on Ubuntu and Windows.

Packages
--------

[](#packages)

- `php-upgrade-preflight/core` contains the analysis pipeline and report contract.
- `php-upgrade-preflight/cli` provides `upgrade-intel analyze`.
- `php-upgrade-preflight/laravel` provides Laravel detection, rules, and `upgrade:analyze`.

Documentation
-------------

[](#documentation)

- [Installation](docs/installation.md)
- [External analysis](docs/external-analysis.md)
- [CLI reference](docs/cli.md)
- [Artisan reference](docs/artisan.md)
- [JSON schema and compatibility](docs/schema.md)
- [Limitations and trust boundaries](docs/limitations.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Contributing](CONTRIBUTING.md)
- [Security policy](SECURITY.md)
- [Changelog](CHANGELOG.md)
- [Versioning policy](docs/versioning.md)

Development
-----------

[](#development)

The Docker environment uses PHP 8.3 while Composer resolves development dependencies against PHP 8.0.30, the runtime floor.

```
docker compose build php
docker compose run --rm php composer install
docker compose run --rm php composer check
```

`composer check` validates every package manifest, runs PHPUnit, performs static analysis, and checks formatting. See [CONTRIBUTING.md](CONTRIBUTING.md) for focused test commands and snapshot updates.

License
-------

[](#license)

Copyright 2026 Valentin Nikolaev. The [PolyForm Noncommercial License 1.0.0](LICENSE) permits noncommercial use. Commercial use requires a separate license from the copyright holder.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/435393?v=4)[Nikolaev Valentin](/maintainers/ValentinNikolaev)[@ValentinNikolaev](https://github.com/ValentinNikolaev)

---

Top Contributors

[![ValentinNikolaev](https://avatars.githubusercontent.com/u/435393?v=4)](https://github.com/ValentinNikolaev "ValentinNikolaev (38 commits)")

---

Tags

phpcomposerstatic analysisupgradedependency-analysis

### Embed Badge

![Health badge](/badges/php-upgrade-preflight-core/health.svg)

```
[![Health](https://phpackages.com/badges/php-upgrade-preflight-core/health.svg)](https://phpackages.com/packages/php-upgrade-preflight-core)
```

###  Alternatives

[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136411.0k14](/packages/rector-rector-src)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k257.0M27.4k](/packages/friendsofphp-php-cs-fixer)[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k199.6M3.3k](/packages/composer-composer)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6943.5M446](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
