Skip to content

Commit 8e01f05

Browse files
authored
Merge pull request #58 from laminas/chore/remove-scanner-subsystem
BC BREAK: removed `Scanner` component, removed `FileReflection`, removed `NameInformation` and made `DocBlockScanner` `@internal`
2 parents 1735224 + ab21223 commit 8e01f05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+162
-8574
lines changed

CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,44 @@ All notable changes to this project will be documented in this file, in reverse
3131
`laminas/laminas-zendframework-bridge` has been removed, and is instead to be installed optionally
3232
by consumers of the library. If you are still migrating from `zendframework/zend-code`, you will
3333
need to add it to your `composer.json` yourself, or directly use to `Laminas\Code` symbols.
34+
- BC BREAK [laminas/laminas-code#58](https://github.com/laminas/laminas-code/pull/58) the `Scanner`
35+
and `Annotation` components have been removed, and with it all API that interacted with it:
36+
* `Laminas\Code\Generator\FileGeneratorRegistry` has been deleted
37+
* `Laminas\Code\Generator\FileGenerator::fromReflectedFileName()` was removed
38+
* `Laminas\Code\Generator\FileGenerator::fromReflection()` was removed
39+
* `Laminas\Code\NameInformation` has been deleted
40+
* `Laminas\Code\Reflection\ReflectionInterface` was marked `@internal`
41+
* `Laminas\Code\Reflection\FileReflection` has been deleted
42+
* `Laminas\Code\Generic\Prototype\PrototypeInterface` was marked `@internal`
43+
* `Laminas\Code\Generic\Prototype\PrototypeClassFactory` was marked `@internal`
44+
* `Laminas\Code\Generic\Prototype\PrototypeGenericInterface` was marked `@internal`
45+
* `Laminas\Code\Annotation\AnnotationInterface` has been deleted
46+
* `Laminas\Code\Annotation\Parser\GenericAnnotationParser` has been deleted
47+
* `Laminas\Code\Annotation\Parser\ParserInterface` has been deleted
48+
* `Laminas\Code\Annotation\Parser\DoctrineAnnotationParser` has been deleted
49+
* `Laminas\Code\Annotation\AnnotationManager` has been deleted
50+
* `Laminas\Code\Annotation\AnnotationCollection` has been deleted
51+
* `Laminas\Code\Scanner\ValueScanner` has been deleted
52+
* `Laminas\Code\Scanner\DirectoryScanner` has been deleted
53+
* `Laminas\Code\Scanner\DocBlockScanner#$nameInformation` was removed
54+
* `Laminas\Code\Scanner\DocBlockScanner#$annotationManager` was removed
55+
* `Laminas\Code\Scanner\DocBlockScanner#$annotations` was removed
56+
* `Laminas\Code\Scanner\DocBlockScanner#getAnnotations()` was removed
57+
* `Laminas\Code\Scanner\DocBlockScanner` was marked `@internal`
58+
* `Laminas\Code\Scanner\ConstantScanner` has been deleted
59+
* `Laminas\Code\Scanner\FunctionScanner` has been deleted
60+
* `Laminas\Code\Scanner\AnnotationScanner` has been deleted
61+
* `Laminas\Code\Scanner\DerivedClassScanner` has been deleted
62+
* `Laminas\Code\Scanner\ClassScanner` has been deleted
63+
* `Laminas\Code\Scanner\AggregateDirectoryScanner` has been deleted
64+
* `Laminas\Code\Scanner\TokenArrayScanner` has been deleted
65+
* `Laminas\Code\Scanner\ParameterScanner` has been deleted
66+
* `Laminas\Code\Scanner\FileScanner` has been deleted
67+
* `Laminas\Code\Scanner\PropertyScanner` has been deleted
68+
* `Laminas\Code\Scanner\CachingFileScanner` has been deleted
69+
* `Laminas\Code\Scanner\ScannerInterface` has been deleted
70+
* `Laminas\Code\Scanner\MethodScanner` has been deleted
71+
* `Laminas\Code\Scanner\Util` has been deleted
3472

3573
### Fixed
3674

docs/book/generator/examples.md

-11
Original file line numberDiff line numberDiff line change
@@ -322,17 +322,6 @@ define('APPLICATION_ENV', 'testing');
322322

323323
## Add code to existing PHP files and classes
324324

325-
### Seeding PHP file code generation via reflection
326-
327-
You can add *PHP* code to an existing *PHP* file using the code generator. To do so, you need to
328-
first do reflection on it. The static method `fromReflectedFileName()` allows you to do this.
329-
330-
```php
331-
$generator = Laminas\Code\Generator\FileGenerator::fromReflectedFileName($path);
332-
$generator->setBody("\$foo->bar();");
333-
file_put_contents($path, $generator->generate());
334-
```
335-
336325
### Seeding PHP class generation via reflection
337326

338327
You may add code to an existing class. To do so, first use the static `fromReflection()` method to

docs/book/generator/reference.md

-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ class Laminas\Code\Generator\FileGenerator extends Laminas\Code\Generator\Abstra
268268
$filePath,
269269
$usePreviousCodeGeneratorIfItExists = true,
270270
$includeIfNotAlreadyIncluded = true)
271-
public static function fromReflection(Laminas\Code\Reflection\FileReflection $reflectionFile)
272271
public function setDocblock(Laminas\Code\Generator\DocBlockGenerator $docblock)
273272
public function getDocblock()
274273
public function setRequiredFiles($requiredFiles)

0 commit comments

Comments
 (0)