I already have a question regarding adding new methods to classes and it's already solved. However, my issue now is that when it comes to adding new methods to classes of libraries, I would have to readd the code every time I update the lib.
I already looked at solutions such as runkit_method_add and classkit_method_add, but they are not bundled in php by default.
What is the cleanest solution to my problem?