zendframework/zend-modulemanager

Adding New Module and generate autoload for that module will corrupt git repository using ZF '3.0.2'

acaballes opened this issue · 1 comments

Hi, Im experiencing this issue now while Im creating new module in my project using ZF 3.0.2.
Here are the steps I've made.
1 . I added a new module (e.g User).
2. I added the new module to config/modules.config.php
3. I added the new module to generate autoloads in the composer.json
4. I run 'composer dump-autoload' to generate autoload

... and everything is working fine with the projects. But when I try to commit my changes, it seems that those steps corrupt my local git repository and it displays like this below:

git status
error: object file .git/objects/9a/e23986685e888032513700698bf7602366e3c4 is empty
error: object file .git/objects/9a/e23986685e888032513700698bf7602366e3c4 is empty
fatal: loose object 9ae23986685e888032513700698bf7602366e3c4 (stored in .git/objects/9a/e23986685e888032513700698bf7602366e3c4) is corrupt

..is this a known issue with this version when you try to create new modules and generate autoload files it will break your repository?

Thanks,
Algie

@acaballes

..is this a known issue with this version when you try to create new modules and generate autoload files it will break your repository?

This is not a problem of the Zend Framework, the module, the module manager or Composer.
Maybe your machine has crashed or has turned off during a git operation. Then data is lost and the files are corrupt. (See also on Stackoverflow: "how to fix GIT error: object file is empty?")

I hope this helps or shows the right direction!