New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileSystem driver now tries to create cache folder before throwing InvalidArgumentException #66
Conversation
@@ -385,7 +385,10 @@ protected function checkFileSystemPermissions() | |||
} | |||
|
|||
if(!is_dir($this->cachePath)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is better:
if (!is_dir($this->cachepath) && !mkdir($this->cachePath, $this->dirPermissions, true)) {
throw new InvalidArgumentException(sprintf('Failed to create cache path %s', $this->cachePath));
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right 😃 . Fixed
…validArgumentException
Note : Travis is not failing because of this patch, but because of Memached extension installation (probably because of this : http://about.travis-ci.org/blog/2013-03-08-preinstalled-php-extensions/). |
Yup, I actually opened the tickets with Travis about it- travis-ci/travis-ci#970 I've also created a new branch to resolve the testing issues- https://github.com/tedivm/Stash/tree/travis_test Once it's resolved I'll merge the travis_test branch back into mainline, and then I'll ask you to just update your PR with those tests so we can see that things are running smoothly. |
Ok, @tedivm . Just let me know 😃 |
@lolautruche Travis should be fixed now, so you can do a git ci --amend & and a force push to get it to test this. |
@tedivm It seems that your tickets with Travis and Memcached are fixed now, and your |
The travis_test branch isn't actually passing them all- it's skipping the APC tests. I'm trying to get that resolved (I think I know why it's occurring) and merge that back into mainline. I"ll update here once that's handled. |
@tedivm Sorry to insist... Actually we really need this in for the next version of eZ Publish and we'll soon enter in a deep code freeze mode. This PR is not related to APC or Memcached since it's only about the FileSystem driver. Thanks. |
FileSystem driver now tries to create cache folder before throwing InvalidArgumentException
Hello
Fixes tedious/TedivmStashBundle#15
This is a very small change allowing
FileSystem
driver to try to create the cache folder if it doesn't already exist. If folder creation fails, then the exception is thrown.Note the usage of the silent operator (
@
). It's here only to avoid a verbose warning if folder creation fails since we want to throw an exception.