-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Ticket 25999 #26013
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
Ticket 25999 #26013
Conversation
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.
To fix the changes in a lower branch, you'll have to make different pull requests. Find the lowest maintained branch (2.7 in this case) that supports your patch for those lines and base the pull request on that branch. You mentioned that the ReflectionClassResource
does not exist in 2.7 yet, so those changes need to be applied in a higher branch than 2.7 (meaning multiple pull requests).
* 3.4.x (2018-xx-xx) | ||
|
||
* bug #25999 [DependencyInjection] Huge performance degradation of ReflectionClassResource and FileResource on big projects inside Docker For Mac | ||
|
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.
This file is updated automatically when a new symfony version is released. Can you please revert this change?
return file_exists($this->resource) && @filemtime($this->resource) <= $timestamp; | ||
$filemtime = @filemtime($this->resource); | ||
|
||
return $filemtime && $filemtime <= $timestamp; |
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.
These changes can probably be fixed in a lower branch.
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 can probably inline the definition as well, i.e.
return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
@@ -34,12 +34,13 @@ public function __construct($class, $path, array $autowiringMetadata) | |||
|
|||
public function isFresh($timestamp) | |||
{ | |||
if (!file_exists($this->filePath)) { | |||
$filemtime = @filemtime($this->filePath); | |||
if (!$filemtime) { |
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.
The changes in this file can probably also be applied on a lower branch.
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.
same as @sroze you can inline all this condition
return file_exists($this->resource) && @filemtime($this->resource) <= $timestamp; | ||
$filemtime = @filemtime($this->resource); | ||
|
||
return $filemtime && $filemtime <= $timestamp; |
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 can probably inline the definition as well, i.e.
return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
@@ -37,11 +37,12 @@ public function isFresh($timestamp) | |||
} | |||
|
|||
foreach ($this->files as $file => $v) { | |||
if (!file_exists($file)) { | |||
$filemtime = @filemtime($file); | |||
if (!$filemtime) { |
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.
inline?
if (false === ($filemtime = @filemtime($file))) {
Also, it would be good to give the pull-request a nice title, such as "Only using |
Travis failure seems unrelated to the changes |
Uh oh!
There was an error while loading. Please reload this page.