PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 21, 2022

[FIXED] How can I store my cakephp project in git?

 February 21, 2022     cakephp, cakephp-3.0, composer-php, git, php     No comments   

Issue

I would like to store my new project in my company's git repo. The project will use cakephp 3. But frequently after setting up a project and pushing it I get some trouble: A coworker clones the project to his pc and it comes with missing directories (mostly "vendor"), and we frequently get problems with debug kit (need to remove the database file after every git pull).

Is there some recommended procedure to create this kind of project?


Solution

The recommended strategy for composer-backed PHP projects is as follows:

  • Add the vendor directory to gitignore.
  • Commit composer.json and composer.lock.

When your colleague begins development they just need to run composer install, and the committed composer.lock file will result in the right dependencies being downloaded.



Answered By - bcmcfc
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing