PHP code example of vocweb / laravel-upgrade-pilot

1. Go to this page and download the library: Download vocweb/laravel-upgrade-pilot library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vocweb / laravel-upgrade-pilot example snippets


use vocweb\UpgradePilot\Facades\Upgrade;

$result = Upgrade::analyze(target: 12);

$result->riskScore;          // 4.2
$result->riskLevel;          // 'medium'
$result->breakingChanges;    // Collection
$result->packageIssues;      // Collection
$result->autoFixablePercent; // 62.0
$result->estimatedEffort;    // '2-5 hours'
bash
# Output prompt to terminal
php artisan upgrade:prompt --target=12

# Copy to clipboard (macOS)
php artisan upgrade:prompt --target=12 | pbcopy

# Copy to clipboard (Linux)
php artisan upgrade:prompt --target=12 | xclip -selection clipboard

# Save to file
php artisan upgrade:prompt --target=12 --output=upgrade-prompt.md
bash
php artisan upgrade:packages --target=12
bash
# HTML report (recommended)
php artisan upgrade:report --format=html

# Markdown or JSON
php artisan upgrade:report --format=markdown
php artisan upgrade:report --format=json
bash
php artisan vendor:publish --tag=upgrade-pilot-rules