Skip to content
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

PHP Deprecated: Please use getType in .../phpDocumentor/Descriptor/Traits/CanHaveAType.php #3638

Open
alecpl opened this issue Jan 21, 2024 · 1 comment

Comments

@alecpl
Copy link

alecpl commented Jan 21, 2024

A lot of "PHP Deprecated: Please use getType in phar:///tmp/phpDocumentor.phar/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50" in the console. When using run command with current phpDocumentor.phar v3.4.3.

php /tmp/phpDocumentor.phar run -d . -t ./doc --title="Test" --defaultpackagename="Framework" --template="clean"

Expected behavior

No warnings

Actual behavior.

Console full of warnings (with long backtraces that make it hard to find the problem).

PHP  36. twig_get_attribute($env = class Twig\Environment { ... }, $item = 'types', $arguments = [], $type = 'any', $isDefinedTest = FALSE, $ignoreStrictCheck = FALSE, $sandboxed = FALSE, $lineno = 7) phar:///tmp/phpDocumentor.phar/vendor/twig/twig/src/Environment.php(418) : eval()'d code:70
PHP  37. phpDocumentor\Descriptor\Tag\BaseTypes\TypedAbstract->getTypes() phar:///tmp/phpDocumentor.phar/vendor/twig/twig/src/Extension/CoreExtension.php:1570
PHP  38. trigger_error($message = 'Please use getType', $error_level = 16384) phar:///tmp/phpDocumentor.phar/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php:50

PHP >= 8.1.27 (Ubuntu)

@jaapio
Copy link
Member

jaapio commented Jan 21, 2024

This requires an update of the clean template, however we do recommend to use the newer default template, which contains a lot more features and is designed with customization in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
phpDoc issue triage board
  
Needs triage
Development

No branches or pull requests

2 participants