Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Error on fixture loading CMF PHPCR (FilesystemCache) #180

devpro opened this Issue Sep 14, 2012 · 9 comments


None yet
5 participants

devpro commented Sep 14, 2012

I created from scratch a project "symfony-cmf/standard-edition" (with composer).
There is a problem at the end of the db init during fixture loading.

$ app/console doctrine:phpcr:fixtures:load

purging database


Warning: mkdir(): Invalid argument in ...\vendor\doctrine\common\lib\Doctrine\Common\Cach\FilesystemCache.php line 109

In debug I have been able to find out that the process tries to create a filename :

There is the ':' character that is not supported by Windows.

Would it be possible that cache mechanism replaces this special character?

Extract from composer.lock:
symfony/symfony: version=2.1.x-dev
doctrine/common: version=2.3.x-dev
doctrine/phpcr-bundle: version=1.0.x-dev


lsmith77 commented Sep 14, 2012

@FabioBatSilva can you look into this issue?


FabioBatSilva commented Sep 14, 2012

Sure @lsmith77

I think we can fix it using hash to the cache key
you can see any problem using SHA(256/512) ?


lsmith77 commented Sep 14, 2012

dont have much experience there .. but sounds like a workable solution. not sure if there are performance considerations here to factor in ..


beberlei commented Sep 17, 2012

i am against hashing the keys. very dangerous.


lsmith77 commented Sep 23, 2012

btw havent looked at how the PhpFileCache is different .. but maybe that works better on windows?


FabioBatSilva commented Sep 23, 2012

@lsmith77 PhpFileCache uses the same approach to create the file name FileCache#getFilename. https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Cache/FileCache.php#L92

I can't think in a solution that does not change the cache keys,
@beberlei do you mean problems with colisions using hash ?


Ocramius commented Nov 9, 2012

Is there a list of "forbidden" characters out there? What if we simply build something like

sha1($key) . strtr($key, $replacements) ?


lsmith77 commented Aug 18, 2013



beberlei commented Aug 18, 2013

Thiw was merged several months ago.

@beberlei beberlei closed this Aug 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment