Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitffc1cd5

Browse files
committed
bug#21731 Fix emacs link (rubenrua)
This PR was merged into the 2.7 branch.Discussion----------Fix emacs link| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes (minor)| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | none| License | MIT| Doc PR | noneWhen an Emacs buffer is modified, by default Emacs automatically creates atemporary symlink in the same directory as the file being edited (e.g. Controller.php):```.#Controller.php -> user@host.12345:1296583136```where '12345' is [the Emacs' PID][1].In this case Symfony breaks with a RuntimeException:```SplFileInfo::getMTime(): stat failed for ...Bundle/Controller/.#APIController.php```invendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.phpat line 89```$newestMTime = max($file->getMTime(), $newestMTime);```[1]:https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.htmlCommits-------c6f7ca6 Fix RuntimeException when an Emacs buffer is modified
2 parents908d470 +c6f7ca6 commitffc1cd5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/Symfony/Component/Config/Resource/DirectoryResource.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,15 @@ public function isFresh($timestamp)
8484
continue;
8585
}
8686

87+
// for broken links
88+
try {
89+
$fileMTime =$file->getMTime();
90+
}catch (\RuntimeException$e) {
91+
continue;
92+
}
93+
8794
// early return if a file's mtime exceeds the passed timestamp
88-
if ($timestamp <$file->getMTime()) {
95+
if ($timestamp <$fileMTime) {
8996
returnfalse;
9097
}
9198
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp