4.0.0
4.0.0 - 2020-12-30
Added
- laminas/laminas-code#57 support for following PHP 8
types have been added:- union types
false
mixed
null
static
Changed
- laminas/laminas-code#57 due to internal refactoring
requiring better internal types, the minimum supported PHP version is now7.4
- BC BREAK laminas/laminas-code#38 changed generated class
output to no longer contain excessive whitespace around contents. The structure of the generated output
will still be the same, but spacing changed, which will likely lead o breakages if you
are asserting/depending upon the strings produced byLaminas\Code\Generator\ClassGenerator#generate()
- BC BREAK laminas/laminas-code#42
declare()
statements
will now be generated abovenamespace
declarations: this is to be better compliant with PSR-2, but it
may break downstream applications if these rely on the stability of code produced
byLaminas\Code\Generator\FileGenerator#generate()
Removed
- BC BREAK zendframwork/zend-code#153 Removed
the annotation API from the library - BC BREAK laminas/laminas-code#39 the
laminas/laminas-zendframework-bridge
has been removed, and is instead to be installed optionally
by consumers of the library. If you are still migrating fromzendframework/zend-code
, you will
need to add it to yourcomposer.json
yourself, or directly use toLaminas\Code
symbols. - BC BREAK laminas/laminas-code#58 the
Scanner
andAnnotation
components have been removed, and with it all API that interacted with it:Laminas\Code\Generator\FileGeneratorRegistry
has been deletedLaminas\Code\Generator\FileGenerator::fromReflectedFileName()
was removedLaminas\Code\Generator\FileGenerator::fromReflection()
was removedLaminas\Code\NameInformation
has been deletedLaminas\Code\Reflection\ReflectionInterface
was marked@internal
Laminas\Code\Reflection\FileReflection
has been deletedLaminas\Code\Generic\Prototype\PrototypeInterface
was marked@internal
Laminas\Code\Generic\Prototype\PrototypeClassFactory
was marked@internal
Laminas\Code\Generic\Prototype\PrototypeGenericInterface
was marked@internal
Laminas\Code\Annotation\AnnotationInterface
has been deletedLaminas\Code\Annotation\Parser\GenericAnnotationParser
has been deletedLaminas\Code\Annotation\Parser\ParserInterface
has been deletedLaminas\Code\Annotation\Parser\DoctrineAnnotationParser
has been deletedLaminas\Code\Annotation\AnnotationManager
has been deletedLaminas\Code\Annotation\AnnotationCollection
has been deletedLaminas\Code\Scanner\ValueScanner
has been deletedLaminas\Code\Scanner\DirectoryScanner
has been deletedLaminas\Code\Scanner\DocBlockScanner#$nameInformation
was removedLaminas\Code\Scanner\DocBlockScanner#$annotationManager
was removedLaminas\Code\Scanner\DocBlockScanner#$annotations
was removedLaminas\Code\Scanner\DocBlockScanner#getAnnotations()
was removedLaminas\Code\Scanner\DocBlockScanner
was marked@internal
Laminas\Code\Scanner\ConstantScanner
has been deletedLaminas\Code\Scanner\FunctionScanner
has been deletedLaminas\Code\Scanner\AnnotationScanner
has been deletedLaminas\Code\Scanner\DerivedClassScanner
has been deletedLaminas\Code\Scanner\ClassScanner
has been deletedLaminas\Code\Scanner\AggregateDirectoryScanner
has been deletedLaminas\Code\Scanner\TokenArrayScanner
has been deletedLaminas\Code\Scanner\ParameterScanner
has been deletedLaminas\Code\Scanner\FileScanner
has been deletedLaminas\Code\Scanner\PropertyScanner
has been deletedLaminas\Code\Scanner\CachingFileScanner
has been deletedLaminas\Code\Scanner\ScannerInterface
has been deletedLaminas\Code\Scanner\MethodScanner
has been deletedLaminas\Code\Scanner\Util
has been deleted
Release Notes for 4.0.0
next backward compatibility break release (major)
4.0.0
- Total issues resolved: 21
- Total pull requests resolved: 13
- Total contributors: 9
Enhancement
- 64: Verify
4.0.x
branch against real-world applications before releasing thanks to @Ocramius - 63: Feature - #62 upgrade coding standard and lock dependencies thanks to @Ocramius
- 61: fix #45 : Psalm integration thanks to @fezfez and @boesing
- 60: Remove travi-ci and move to github action thanks to @fezfez and @weierophinney
- 59: Merge release 3.5.1 into 4.0.x thanks to @github-actions[bot]
- 57: #53 support php-8.0 type system additions thanks to @Ocramius and @weierophinney
- 56: #48 merge release
3.5.0
into development branch for4.0.x
thanks to @Ocramius - 10: Additional blank lines make generated class not PSR2 compliant thanks to @weierophinney
BC Break,Enhancement
- 58: BC BREAK: removed
Scanner
component, removedFileReflection
, removedNameInformation
and madeDocBlockScanner
@internal
thanks to @Ocramius - 39: Suggest "laminas/laminas-zendframework-bridge" thanks to @olvlvl
- 12: Remove code scanners to improve library maintainability thanks to @weierophinney
Duplicate,Enhancement
- 54: #53 added support for generating parameters with union types in their definitions thanks to @fezfez and @weierophinney
- 48: Merge release 3.5.0 into 4.0.x thanks to @github-actions[bot]
Bug
Bug,Unit Test Needed
Awaiting Author Updates,BC Break
Bug,Duplicate,Won't Fix
Bug,Won't Fix
- 27: Zend\Code\Scanner\MethodScanner does not account for scalar type declarations thanks to @weierophinney
- 26: v3 only: Unknown Notices from ClassScanner thanks to @weierophinney
- 22: Update AnnotationScanner.php thanks to @weierophinney
- 18: Notice when using array as default value for parameter thanks to @weierophinney
- 15: E_NOTICE with trait method aliases thanks to @weierophinney
- 9: Zend\Code\Reflection\FileReflection getBody() thanks to @weierophinney
- 8: Zend\Code\Reflection\FileReflection crashes on Zend's module.config.php thanks to @weierophinney
- 3: Not using return value of array_map in ClassGenerator->setImplementedInterfaces thanks to @weierophinney
Question,Won't Fix
Enhancement,Won't Fix
- 19: Support nullable types thanks to @weierophinney
- 1: perfect FunctionScanner class thanks to @weierophinney