Skip to content

Always using umask(0000) in debug mode#210

Merged
symfony-bot merged 2 commits intosymfony:masterfrom
weaverryan:patch-1
Oct 10, 2017
Merged

Always using umask(0000) in debug mode#210
symfony-bot merged 2 commits intosymfony:masterfrom
weaverryan:patch-1

Conversation

@weaverryan
Copy link
Copy Markdown
Contributor

@weaverryan weaverryan commented Oct 9, 2017

Q A
License MIT

In debug mode, cache files need to be writeable by everyone for a good dev experience. In prod, they do not (and the way the cache system is built these days makes this very easy - yay!).

This change is consistent with how index.php already exists: enable umask for debug, but not otherwise. This gives great DX for dev, and forces users to setup permissions properly for prod.

I've also proposed removing the warning about permissions... basically because if this is for debug mode only, is there really an issue with umask(0000)? There are many things in debug mode you would not want to do/expose in prod mode (e.g. web debug toolbar). This is just another one of those.

P.S. I wasn't sure why there is a class_exists(Debug::class) in console, but not in index.php, but I left that alone.

Copy link
Copy Markdown
Contributor

@symfony-bot symfony-bot left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Copy Markdown
Contributor

@symfony-bot symfony-bot left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Copy Markdown
Contributor

@symfony-bot symfony-bot left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Copy Markdown
Contributor

@symfony-bot symfony-bot left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

@symfony-bot symfony-bot merged commit 56acc9c into symfony:master Oct 10, 2017
@stof
Copy link
Copy Markdown
Member

stof commented Oct 10, 2017

@weaverryan the reason there is no class_exists in index.php is because HttpKernel has a requirement on symfony/debug, and so the class will always exist when using FrameworkBundle. This saves a few opcodes.

@weaverryan weaverryan deleted the patch-1 branch October 10, 2017 18:41
nicwortel added a commit to nicwortel/symfony-skeleton that referenced this pull request Oct 11, 2017
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.

4 participants