Skip to content

PHP files which contain phtml in the name detect as a template #147

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

Closed
iGerchak opened this issue Oct 4, 2019 · 2 comments
Closed

PHP files which contain phtml in the name detect as a template #147

iGerchak opened this issue Oct 4, 2019 · 2 comments
Labels
bug Something isn't working Progress: good first issue Issues is easy to get started with

Comments

@iGerchak
Copy link

iGerchak commented Oct 4, 2019

Preconditions

  1. Magento coding standard 4.0

Steps to reproduce

  1. Create Block with name AmpHtmlBlock.php with the following content:
<?php

namespace Block;

/**
 * Class AmpHtmlBlock
 */
class AmpHtmlBlock
{
    /**
     *
     */
    public function test()
    {
        $this->test();
    }
}

Expected result

There shouldn't be any warnings

Actual result

FILE: .../Block/AmpHtmlBlock.php
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
 15 | WARNING | Usage of $this in template files is deprecated.
-------------------------------------------------------------------------------------------
@iGerchak iGerchak added the bug Something isn't working label Oct 4, 2019
@ihor-sviziev
Copy link
Collaborator

@lenaorobei could you review this issue? As for me - we need to fix it

@lenaorobei
Copy link
Contributor

@iGerchak thanks for reporting. @ihor-sviziev, sure, I agree it needs to be fixed.

@larsroettig larsroettig self-assigned this Oct 15, 2019
@lenaorobei lenaorobei added Progress: good first issue Issues is easy to get started with and removed Progress: good first issue Issues is easy to get started with labels Jan 22, 2020
sinisa86 added a commit to sinisa86/magento-coding-standard that referenced this issue Apr 4, 2020
lenaorobei added a commit that referenced this issue Apr 13, 2020
#147 - Fixed include / exclude patterns in ruleset.xml
magento-devops-reposync-svc pushed a commit that referenced this issue Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Progress: good first issue Issues is easy to get started with
Projects
None yet
Development

No branches or pull requests

5 participants