Giter VIP home page Giter VIP logo

Comments (6)

shadowhand avatar shadowhand commented on August 24, 2024

static-review doesn't include composer.lock in the repository, so this should be solved by running composer update on your local machine. If that doesn't work, try rm -rf vendor/sjparkinson/static-review followed by composer install.

from static-review.

jyggen avatar jyggen commented on August 24, 2024

The composer.json file is not part of static-review in any way. Our project uses static-review as a git hook, and one of the reviews is ComposerLintReview which fails when we try to commit changes to our composer.json.

from static-review.

shadowhand avatar shadowhand commented on August 24, 2024

Well then it looks like you tried to commit composer.json without composer.lock being in sync.

from static-review.

sjparkinson avatar sjparkinson commented on August 24, 2024

Our project uses static-review as a git hook, and one of the reviews is ComposerLintReview which fails when we try to commit changes to our composer.json.

So static review creates a temporary version of the staged file that you want to commit and reviews that.

Have a go running git show :composer.json and ensure that the output is a valid file. Feel free to include it here.

from static-review.

jyggen avatar jyggen commented on August 24, 2024

I figured it out.

The cached composer.json file static-review uses checks if it's out-of-sync against any cached composer.lock, meaning that if I only commit the composer.json file it'll check out-of-sync against an old composer.lock (as long as there is one in the cache).

In my case we once upon a time had composer.lock in the repo but later decided to remove it (due to the repo being a library). But I still have an old copy of it in static-review's cache, so every time I try to commit changes to composer.json it'll complain.

I removed the cached composer.lock and now I can successfully commit composer.json. Woo!

from static-review.

sjparkinson avatar sjparkinson commented on August 24, 2024

In my case we once upon a time had composer.lock in the repo but later decided to remove it (due to the repo being a library). But I still have an old copy of it in static-review's cache, so every time I try to commit changes to composer.json it'll complain.

Ah yes, I haven't done much work on cleaning up the temporary files, nice work figuring it out! I'll open a new issue to look at cleaning up the temporary files that the git version control class creates.

from static-review.

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.