-
-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with package tag in a global function #1330
Comments
A possible correction that seems to work (I'm not sure in fact ^^) : use the specific method diff --git a/src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php b/src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php
index d772043..01e057a 100644
--- a/src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php
+++ b/src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php
@@ -62,7 +62,7 @@ class FunctionAssembler extends AssemblerAbstract
$descriptor->setFullyQualifiedStructuralElementName($reflector->getName() . '()');
$descriptor->setName($reflector->getShortName());
$descriptor->setLine($reflector->getLinenumber());
- $descriptor->getTags()->set('package', $this->extractPackageFromDocBlock($reflector->getDocBlock()) ? : '');
+ $descriptor->setPackage($this->extractPackageFromDocBlock($reflector->getDocBlock()) ? : '');
$descriptor->setNamespace($this->getFullyQualifiedNamespaceName($reflector));
} |
Actually setPackage is meant to be used with PackageDescriptor objects that are created later. This was a rather unfortunate choice of method naming :S |
In a recent refactoring we removed all notion of string based tags but put them in TagDescriptors. Apparently I missed a bit of handling of the package tags and this caused fatal errors later due to typehints.
#1330: Fix crash when assembling package tags
This issue is resolved in PR #1334 and will be included in a hotfix release this week |
FYI: I just released the new version :) |
Hi,
With 2.6.0 6c7cb9c , a little file creates a Fatal Error :
Run with :
Makes :
In fact, it tries to make
->add()
on the string "Other"…The text was updated successfully, but these errors were encountered: