Upgraded phpspec to v4.0@rc, meaning:
- phpspec v2 and v3 support was dropped
Upgraded Memio to v2.0@alpha, meaning:
- PHP 5 support was dropped
- scalar arguments now get type hinted
- maximum method argument line length changed from 120 to 80
- opening curly brace changed to be on the same line as the method closing parenthesis, when arguments are on many lines
- properties changed to not have empty lines between them, except if they have PHPdoc
Constructor generator wasn't registered as a generator in phpspec 3, du to a missing DI tag.
BC Break: since phpspec 3.0@beta2, registering extensions in
phpspec.yml
is done as follow:extensions: Memio\SpecGen\MemioSpecGenExtension: ~
Note:
0.6.0
is actually the same as0.5.0
, due to a git tagging typo.
Due to phpspec sharing some common dependencies with SpecGen:
- dropped support for PHP < 5.6
- dropped support for Symfony Event Dispatcher < 2.7
- added support for PHP 7
- added support for Symfony 3
- object arguments will now be typehinted against their interface
- object arguments will now be named after their interface (without
Interface
suffix)
- constructor generation, same as method except:
- it inserts constructor at the begining of the class
- it inserts properties with initialization for each constructor arguments
- use statement insertion (for each object argument)
- fixed Prophecy test doubles type guessing
- method generation:
- it inserts method at the end of the class
- it typehints object, array and callable arguments
- it names object arguments after their type
- it names scalar arguments after a generic name (
argument
) - it adds number on names that could collide (e.g.
$argument1, $argument2
)