1- LARAVEL PATCHER
1+ Laravel Patcher
22--
33* A (migration like) patcher for a smoldering production update.* <br >
44
@@ -9,7 +9,7 @@ LARAVEL PATCHER
99* PHP : 8.\*
1010* Laravel: 9.\*
1111
12- ### INSTALLATION
12+ ### Installation
1313do either of this methods below.
1414* via shell
1515``` shell script
@@ -23,16 +23,16 @@ composer require dentro/laravel-patcher
2323 }
2424}
2525```
26- ### POST INSTALLATION
26+ ### Post Installation
2727> this process is optional, you can skip it though.
2828
2929patches table creation.
3030``` shell script
3131 php artisan patcher:install
3232```
3333
34- ### USAGE
35- #### CREATE NEW PATCH
34+ ### Usage
35+ #### Create New Patch
3636for creating new patch you just need to run these following command
3737``` shell script
3838php artisan make:patch what_do_you_want_to_patch
@@ -80,7 +80,7 @@ that you can use for supporting your patch such as:
8080 > ];
8181 > ```
8282 > you can learn more about `\Illuminate\Log\Logger` [here](https://laravel.com/api/8.x/Illuminate/Log/Logger.html)
83- #### SHOW PATCH STATUS
83+ #### Show Patch Status
8484```shell script
8585php artisan patcher:status
8686```
@@ -95,7 +95,7 @@ Example:
9595+------+---------------------------------------+-------+
9696```
9797
98- #### RUN A PATCH(ES )
98+ #### Run Pending Patch(es )
9999``` shell script
100100php artisan patcher:run
101101```
@@ -109,7 +109,7 @@ Patching: 2020_10_09_124616_add_attachment_beep
109109Patched: 2020_10_09_124616_add_attachment_beep (0.06 seconds)
110110```
111111
112- #### SKIPPING THE PATCH
112+ #### Conditional Patch
113113You might need to skip single patch when run ``` php artisan patcher:run ``` .
114114Due to patch is unnecessary or patch is not eligible to run in your environment.
115115Here you can add the ``` eligible ``` method to your patch class to evaluate the condition
@@ -143,3 +143,14 @@ Skipped: 2020_09_29_190531_fix_double_sections is not eligible to run in curren
143143Patching: 2020_10_09_124616_add_attachment_beep
144144Patched: 2020_10_09_124616_add_attachment_beep (0.06 seconds)
145145```
146+
147+ #### Perpetual Patch
148+ In some cases you might also want to run patches script indefinitely, you can change ` isPerpetual `
149+ property on your patch file to ` true `
150+
151+ ``` php
152+ class WhatDoYouWantToPatch extends Patch
153+ {
154+ public bool $isPerpetual = true;
155+ }
156+ ```
0 commit comments