Closed burzum closed 9 years ago
@burzum thanks for reporting the issue and the initial change. I tried the unit tests locally and found a place where it assumed the __toString() still returned the resource.
@henrikbjorn thanks for fixing it.
There are still failing tests? https://travis-ci.org/henrikbjorn/Lurker
I think they're related to inotify and should be made optional, run them only when it is installed?
Also are you going to tag a new version? 1.0.1?
They are only being run when inotify is present, the problem is the number of events we expect, and the number of events that inotify gives us is different.
Running into this issue as well now.
Ah, just realized it hasn't been tagged in a release yet. Pulling in dev-master fixed things. @henrikbjorn could you tag this so Packagist is aware of the change and pulls in newest?
The problem
I have no idea what has changed, but since a few days our task runners (Robo) watcher tasks were not working any more. I've started debugging the issue and figured out that the cause is the
is_dir()
call when the object is passed.I have no idea why this suddenly happens, it happens on php 5.6 which we were using before and it started to happen on Windows and OSX as well.
When I run the tests there is only one failing for me but it seems to be not related to my problem.
I think it would be better to change the code to use
is_dir($this->getResource())
instead of passing the object$this
tois_dir()
. The documentation states it will accept a string, not an object. I guess the object implements__toString()
but for some reason it's not working here.The (possible) cause
After further investigation I think the cause is probably a change in
Symfony\Component\Config\Resource\DirectoryResource
:This won't return the actual path but a hash. Doing
print_r((string) $this);
shows indeed a hash.