Ivar van der Burg
Ivar van der Burg
+1 on the cache break here. It appears `TraceableTwigEnvironment` calls `Twig_Environment::writeCacheFile()`, which doesn't has the `$cache` property set. Calling `$this->twig->writeCacheFile()` should fix this (for now). Also, maybe `TraceableTwigEnvironment` should not...
I'd do the immutable way if there's a need for comparison or anything like that, but prefer the mutable way.
Maybe it's an idea to make a mutable one that extends the immutable `SemVer`? Or, at a given point, be able to freeze the mutable `SemVer` thus transforming it into...
To be able to support both
Well true, most of the time you would definitely want an immutable SemVer. In the current implementation the `Parser` seems to need a mutable though.
It probably needs to be refactored and pass the Version metadata through the constructor for an immutable SemVer.