diff --git a/README.md b/README.md
index 6c07ad78ef980af15748d1b33b0ddfdd3948e60f..05ba8d777277df2e1bf53acbc51ce61292d7bbe5 100644
--- a/README.md
+++ b/README.md
@@ -17,3 +17,29 @@ To run PHPStan, simply execute the following command (`<path>` is only required
 ```sh
 vendor/bin/phpstan analyse <path>
 ```
+
+### Dependencies between plugins
+
+Besides WordPress and WooCommerce, it may be sometimes necessary to analyse dependencies between plugins, e.g. when developing an extension to base plugin, PHPStan needs to be aware of the dependent plugin's codebase.
+
+In such cases it is necessary to generate the stubs for the dependent plugin with the use of [stub generator library](https://github.com/php-stubs/generator). Try to install it as system-wide utility, rather than plugin's package.
+
+```sh
+composer global require php-stubs/generator
+```
+
+With the aid of this library, you will be able to provide read-only access to the dependent codebase for PHPStan purposes. Use `stub` extension to ignore this file by your editor analyzers.
+
+```sh
+generate-stubs --out=/path/to/.stubs/dependency.stub -- /path/to/dependency/src
+```
+
+Remember to regenerate the stubs, whenever there's an important change in upstream plugin.
+
+Finally, include generated stubs in your PHPStan configuration.
+
+```neon
+parameters:
+  scanFiles:
+    - .stubs/dependency.stub
+```