PHP code example of jalameta / jps-patcher

1. Go to this page and download the library: Download jalameta/jps-patcher 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/ */

    

jalameta / jps-patcher example snippets




use Jalameta\Patcher\Patch;

class WhatDoYouWantToPatch extends Patch
{
    /**
     * Run patch script.
     *
     * @return void
     * @throws \Exception
     */
    public function patch()
    {
        // 
    }
}

    > $this->command->warn('i patch something danger!');
    > $this->command->confirm('do you wish to continue?');
    > 

    > [
    >     'channels' => [
    >         'patcher' => [
    >              'driver' => 'patcher', // you can change me if you want
    >              'path' => storage_path('logs/patches.log'), // change me
    >          ],
    >     ],
    > ];
    > 
shell script
     php artisan patcher:install
    
shell script
php artisan patcher:status
shell script
my_project on  master [$!] via ⬢ v14.14.0 via 🐘 v7.4.11 on 🐳 v19.03.13 
➜ php artisan patcher:status
+------+---------------------------------------+-------+
| Ran? | Patch                                 | Batch |
+------+---------------------------------------+-------+
| Yes  | 2020_09_29_190531_fix_double_sections | 1     |
| Yes  | 2020_10_09_124616_add_attachment_beep | 1     |
+------+---------------------------------------+-------+
shell script
php artisan patcher:run
shell script
my_project on  master [$!] via ⬢ v14.14.0 via 🐘 v7.4.11 on 🐳 v19.03.13 
➜ php artisan patcher:status
Patches table created successfully.
Patching: 2020_09_29_190531_fix_double_sections
Patched:  2020_09_29_190531_fix_double_sections (0.03 seconds)
Patching: 2020_10_09_124616_add_attachment_beep
Patched:  2020_10_09_124616_add_attachment_beep (0.06 seconds)