Skip to content
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

Allow creating of missing tmp directories in debug (development) mode #1194

Merged
merged 1 commit into from
Aug 7, 2013
Merged

Allow creating of missing tmp directories in debug (development) mode #1194

merged 1 commit into from
Aug 7, 2013

Conversation

dereuromark
Copy link
Member

Allow creating of missing tmp directories in debug (development) mode for cache and log to avoid unnecessary errors thrown.

dereuromark referenced this pull request Mar 25, 2013
… for cache and log to avoid unnecessary errors thrown
@markstory
Copy link
Member

Every build failed in travis. At least some should pass before it can be merged in.

@dereuromark
Copy link
Member Author

Any idea what could be causing it? Or what we can do here?

@markstory
Copy link
Member

Looks like it is related to file permissions. Perhaps the new directories aren't getting the correct permissions set?

@dereuromark
Copy link
Member Author

A remaining problem is:

"CacheTest::testInvalidConfig
Failed asserting that exception of type "PHPUnit_Framework_Error_Warning" is thrown."

In the tests it creates this invalid path "webroot/tmpdata" even though the chmod rights should not be sufficient enough here.

if (Configure::read('debug')) {
$path = $dir->getPathname();
if (!is_dir($path)) {
mkdir($path, 0775, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it worth checking the return value, and log an error if it can't be created?

Maybe also considering to use Folder::create() - it does the "logging" for you, and more sanity checks

@markstory
Copy link
Member

This pull request has a few open comments & failing tests. The current plan is to start the RC process for 2.4 next week. If you'd still like this to be part of 2.4 could you resolve the remaining issues.

… for cache and log to avoid unnecessary errors thrown - using 0775 for dirs and 0664 for files
@dereuromark
Copy link
Member Author

Tests pass - squashed.

markstory added a commit that referenced this pull request Aug 7, 2013
Allow creating of missing tmp directories in debug (development) mode
@markstory markstory merged commit 054668f into cakephp:2.4 Aug 7, 2013
@markstory
Copy link
Member

@dereuromark Can you upgrade the migration guide + docs?

@dereuromark
Copy link
Member Author

Sure. PR: cakephp/docs#677

@dereuromark
Copy link
Member Author

Thx for @tigrang who pointed me in the right direction.

@ravage84
Copy link
Member

ravage84 commented Aug 8, 2013

@jippi
Copy link
Contributor

jippi commented Aug 8, 2013

Sooo.. my comments was disregarded ? :|

@dereuromark
Copy link
Member Author

It is just for debug mode - and only to avoid errors thrown. Not sure if we should create the overhead with Folder class here then. Also: why logging this if you will get a notice/warning anyway when it fails in debug with a verbose description of what failed - on the screen?
Or do you still insist this is a useful addition to use the class here?

@markstory
Copy link
Member

Folder's 'logging' is hardly useful in this context, which is why I didn't wait before merging it.

@AD7six
Copy link
Member

AD7six commented Aug 8, 2013

I don't read any insisting @dereuromark only "why was there no reply to my comment". If it was read, weighed and decided against - there's no way to tell that from "".

@dereuromark
Copy link
Member Author

Yeah, I had the same reasoning as @markstory mentioned. Sry for not expressing that more verbosely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants