How to keep a Nette addon compatibility with Nette Framework 2.0, 2.1 and 2.2? Here is my fight description:
- Nette 2.0
Nette\Utils\PhpGenerator\ClassType
vs Nette 2.1+Nette\PhpGenerator\ClassType
strict errors andNette\Config\CompilerExtension
vs.Nette\DI\CompilerExtension
. This was a difficult one:
- Create abstract
BC\Extension
s like this, - and Nette version-dependent loader like this.
- A target extension will inherit one of them as
class Extension extends BC\Extension
and - the Composer will class-mapping different folder and hard load version-dependent loader like this.
IBarPanel
is solved in the same way as 1)