Giter Club home page Giter Club logo

Comments (9)

jrfnl avatar jrfnl commented on July 17, 2024

@nikitastupin I know virtually nothing about Docker, but I can tell you that the install instructions have changed with c36e8c6, which will be in the next major.

Did you update your Docker build script with the new install instructions ?

from phpcs-security-audit.

jmarcil avatar jmarcil commented on July 17, 2024

That error can be when it cannot find the phpcs sniff due to wrong installed_paths. By default it is a relative path, and might work better if we set something absolute in Docker.

Can you try to add this line before WORKDIR /tmp in the Dockerfile:

RUN /tmp/vendor/bin/phpcs --config-set installed_paths /tmp/vendor/pheromone/phpcs-security-audit/

from phpcs-security-audit.

jrfnl avatar jrfnl commented on July 17, 2024

@jmarcil That shouldn't be needed as the dealerdirect/phpcodesniffer-composer-installer composer plugin should set that automatically.

@nikitastupin What does phpcs -i return ?

from phpcs-security-audit.

nikitastupin avatar nikitastupin commented on July 17, 2024

#62 (comment)

I've added this line and error gone!

What does phpcs -i return ?

The installed coding standards are MySource, PEAR, PSR12, PSR2, Zend, Squiz and PSR1

from phpcs-security-audit.

jrfnl avatar jrfnl commented on July 17, 2024

The installed coding standards are MySource, PEAR, PSR12, PSR2, Zend, Squiz and PSR1

Hmm.. that doesn't look right... in that case you should still get the error. Could it be that there are multiple PHPCS installs in the image ? and that this one is a different one from the one containing the Security standard ?

What about vendor/bin/phpcs -i ?

from phpcs-security-audit.

nikitastupin avatar nikitastupin commented on July 17, 2024

Hmm.. that doesn't look right... in that case you should still get the error. Could it be that there are multiple PHPCS installs in the image ? and that this one is a different one from the one containing the Security standard ?

I did phpcs -i on image that returns the error :)

After that I've added RUN /tmp/vendor/bin/phpcs --config-set installed_paths /tmp/vendor/pheromone/phpcs-security-audit/ to Dockerfile and error has gone!

from phpcs-security-audit.

jmarcil avatar jmarcil commented on July 17, 2024

@nikitastupin can you create a pull request with that fix? I'll promptly merge it.

from phpcs-security-audit.

nikitastupin avatar nikitastupin commented on July 17, 2024

Done #64

from phpcs-security-audit.

jmarcil avatar jmarcil commented on July 17, 2024

OK now master should be "fixed". I've done this just to have a working state as I'm not sure when this will be properly fixed.

My take on this is that phpcodesniffer-composer-installer doesn't work properly within our Docker environment and it's probably setting the wrong installed_paths for whatever reason.

I still haven't created/tested any composer package with what we have so far, so maybe that's a problem regardless of Docker.

Also, I noticed that in the instruction we're supposed to do --dev (but yet we don't use require-dev in composer.json?) and the docker file doesn't do --dev. Maybe that's why phpcodesniffer-composer-installer is ineffective?

@nikitastupin I'll close this issue, as the bug is resolved with your PR, but I'd appreciate a lot if you could figure out (maybe with some help from @jrfnl) what is wrong with Docker / our package right now.

from phpcs-security-audit.

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.