Git Product home page Git Product logo

Comments (4)

TomasVotruba avatar TomasVotruba commented on May 20, 2024

Hi, is Nette\Utils\Strings class autolaoded?

Is phpcs skipping the vendor/autoload.php?

from phpcs-calisthenics-rules.

widoz avatar widoz commented on May 20, 2024

Hi thanks for the reply and sorry for the delay.
I cloned the repo again and ran composer install --optimize-autoloader, updated the phpcs to the latest release 3.3.2. But now the issue is with PHP Fatal error: Uncaught Error: Class 'SlevomatCodingStandard\Helpers\ClassHelper' not found in /Users/guido/Sites/sniffs/phpcs-calisthenics-rules/src/ObjectCalisthenics/Sniffs/NamingConventions/NoSetterSniff.php:67 

Is phpcs skipping the vendor/autoload.php?

What do you mean exactly? If I remove the rules

<rule ref="ObjectCalisthenics.Metrics.MaxNestingLevel">
        <properties>
            <property name="maxNestingLevel" value="2"/>
        </properties>
    </rule>
    <rule ref="ObjectCalisthenics.ControlStructures.NoElse"/>
    <!--<rule ref="ObjectCalisthenics.NamingConventions.ElementNameMinimalLength"/>-->
    <!--<rule ref="ObjectCalisthenics.Classes.ForbiddenPublicProperty"/>-->
    <rule ref="ObjectCalisthenics.NamingConventions.NoSetter"/>
    <rule ref="ObjectCalisthenics.Metrics.PropertyPerClassLimit">
        <properties>
            <property name="maxCount" value="5"/>
        </properties>
    </rule>

Phpcs works as expected. You can view the file here https://github.com/widoz/unprefix/blob/refactor-php7/phpcs.xml

from phpcs-calisthenics-rules.

widoz avatar widoz commented on May 20, 2024

Hi @TomasVotruba it's me again,

Sorry for the double reply but I guess I found the problem. I don't know exactly where could be in terms of line of codes but using the latest version of phpcs seems causing the issue. I switched to the latest version for 3.2.x and phpcs is able to work correctly without problems.

from phpcs-calisthenics-rules.

TomasVotruba avatar TomasVotruba commented on May 20, 2024

Hey,

that's great to hear! I tried to reproduce the issue and find myself stuck with autoloading problems. That's why I prefer ECS, where these problems doesn't exist.

I'm glad it works 👍

from phpcs-calisthenics-rules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.