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

[TASK] Log deprecations as info for now #33

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Directives/Php/EnumDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function processSub(
if (str_contains($name, ':')) {
[$name, $type] = explode(':', $name, 2);
$type = trim($type);
$this->logger->warning('Passing the type of a backed enum directly with the name is deprecated. Use option :type: instead.', $blockContext->getLoggerInformation());
$this->logger->info('Passing the type of a backed enum directly with the name is deprecated. Use option :type: instead.', $blockContext->getLoggerInformation());
}

$fqn = $this->fullyQualifiedNameService->getFullyQualifiedName(trim($name), true);
Expand Down
2 changes: 1 addition & 1 deletion src/Directives/Php/MethodDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private function extractReturnDescriptionFromFieldListItem(?CollectionNode $retu
{
if (!$returnInlineNode instanceof \phpDocumentor\Guides\Nodes\CollectionNode) {
$returnInlineNode = new CollectionNode($fieldListItem->getChildren());
$this->logger->warning(sprintf("The definition of a return description as field list is deprecated. Define it as an option of the method \n
$this->logger->info(sprintf("The definition of a return description as field list is deprecated. Define it as an option of the method \n
for example:

.. :php:method:: %s
Expand Down
2 changes: 1 addition & 1 deletion src/Directives/Php/PropertyDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function processSub(
$modifiers = $this->modifierService->getModifiersFromDirectiveOptions($directive, $this->allowedModifiers);

if ($directive->getName() !== 'php:property') {
$this->logger->warning(sprintf('Using directive `%s` is deprecated, use directive `php:property` instead.', $directive->getName()), $blockContext->getLoggerInformation());
$this->logger->info(sprintf('Using directive `%s` is deprecated, use directive `php:property` instead.', $directive->getName()), $blockContext->getLoggerInformation());
}

foreach ($this->illegalCombinations as $combination) {
Expand Down
2 changes: 1 addition & 1 deletion src/Directives/Php/StaticMethodDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function processSub(
CollectionNode $collectionNode,
Directive $directive,
): Node|null {
$this->logger->warning(
$this->logger->info(
'Directive `.. php:staticmethod::` is deprecated use directive `.. php:method::` with option `:static:` instead. ',
$blockContext->getLoggerInformation()
);
Expand Down
2 changes: 1 addition & 1 deletion src/TextRoles/ExceptionTextRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function processNode(
string $rawContent,
): AbstractLinkInlineNode {
if ($role !== 'php:exception') {
$this->logger->warning(sprintf('Text role :%s: is deprecated. Use :php:exception: instead. ', $role), $documentParserContext->getLoggerInformation());
$this->logger->info(sprintf('Text role :%s: is deprecated. Use :php:exception: instead. ', $role), $documentParserContext->getLoggerInformation());
}
return parent::processNode($documentParserContext, $role, $content, $rawContent);
}
Expand Down
2 changes: 1 addition & 1 deletion src/TextRoles/MethodTextRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function createNode(DocumentParserContext $documentParserContext, stri
private function createNodeWithInterlink(DocumentParserContext $documentParserContext, string $referenceTarget, string $interlinkDomain, string|null $referenceName): ReferenceNode
{
if (!preg_match(self::METHOD_NAME_REGEX, $referenceTarget, $matches)) {
$this->logger->warning($referenceTarget . ' is not a valid method name. Use the form "\Vendor\Path\Class::method" or "\Vendor\Path\Class::method(int $param)"', $documentParserContext->getLoggerInformation());
$this->logger->info($referenceTarget . ' is not a valid method name. Use the form "\Vendor\Path\Class::method" or "\Vendor\Path\Class::method(int $param)"', $documentParserContext->getLoggerInformation());
$id = $this->anchorReducer->reduceAnchor($referenceTarget);
return new ReferenceNode($id, $referenceName ?? $referenceTarget, $interlinkDomain, 'php:' . $this->getName());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
app.WARNING: \TYPO3\CMS\Core\Test:: is not a valid method name. Use the form "\Vendor\Path\Class::method" or "\Vendor\Path\Class::method(int $param)" {"rst-file":"index.rst"} []
app.WARNING: \TYPO3\CMS\Core\Test->getDate is not a valid method name. Use the form "\Vendor\Path\Class::method" or "\Vendor\Path\Class::method(int $param)" {"rst-file":"index.rst"} []
app.WARNING: Nested PHP domain components (php:class, php:interface, php:enum etc) are not supported.
app.WARNING: Nested PHP domain components (php:class, php:interface, php:enum etc) are not supported. Found php:IllegalSubClass inside \TYPO3\CMS\Core\Test {"rst-file":"index.rst"} []
app.WARNING: Reference typo3-cms-core-test could not be resolved in index {"rst-file":"index"} []
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
app.WARNING: A PHP property cannot be private and public at the same time.
app.WARNING: A PHP property cannot be static and readonly at the same time.
app.WARNING: Using directive `php:attr` is deprecated, use directive `php:property` instead.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
app.WARNING: Passing the type of a backed enum directly with the name is deprecated. Use option :type: instead. {"rst-file":"index.rst","currentLineNumber":21} []
app.WARNING: The type of the backed enum was set twice. The type from the option will be prefered. {"rst-file":"index.rst","currentLineNumber":21} []
app.WARNING: Passing the type of a backed enum directly with the name is deprecated. Use option :type: instead. {"rst-file":"index.rst","currentLineNumber":30} []

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/integration/static-method/expected/logs/warning.log

This file was deleted.