In my case I want once I do:
composer install
After the dependencies being downloaded to replace some files in vendor based upon a json names hotpatch.json and will have theese entries:
{
"my_dependency":{
"v1.1":[
{
"original":"./vendor/my_dependency/app/Myclass.php"
"replacement":"./hotpatch/my_dependency/app/v1/Myclass.php"
}
]
}
}
Or in case a php version and extention version is specific:
{
"my_dependency":{
"v1.1":[
{
"original":"./vendor/my_dependency/app/Myclass.php"
"replacement":[
{
php_version: "7.4",
ext-curl: "1.2",
file:"./hotpatch/my_dependency/app/v1/Myclass.php"
}
]
}
]
}
}
The idea is because legacy applications have strict rules upon dependencies and I may not have the option to decide where the app will run I want to ensure that a specific version of a dependency is appropriately patched. At the same time I want to keep the best practices as well.
Also I want to ensure that all my dependencies are approriately patched whilst keep a dump-to-use approach for inexperienced developers as well. Using a automated copy-pasta approach seem good enough especially in a time-restricted environment where each second of development hour counts.
Is there an tool that allows me to do this? I mean having the project as is and testing it on the fly is time saving upon manhours.