Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Fix emacs link#21731
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix emacs link#21731
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedFeb 25, 2017
Applies to 2.7, isn't it? |
rubenrua commentedFeb 27, 2017
Yes, new pull request? |
xabbuh commentedFeb 27, 2017
@rubenrua No need for a new PR. You can rebase your changes onto the |
When 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 Emacs' PID.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);```
rubenrua commentedFeb 28, 2017
Rebase done |
| // for broken links | ||
| try { | ||
| $fileMTime =$file->getMTime(); |
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.
DoesgetMTime() from PHP throws aRuntimeException? If yes, since which version?
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.
All PHP versions since5.3.
symlink('/tmp/target_not_exists','/tmp/link');$file =newSplFileInfo('/tmp/link');var_dump($file->getMTime());
fabpot commentedMar 1, 2017
Thank you@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
Uh oh!
There was an error while loading.Please reload this page.
When an Emacs buffer is modified, by default Emacs automatically creates a
temporary symlink in the same directory as the file being edited (e.g. Controller.php):
where '12345' isthe Emacs' PID.
In this case Symfony breaks with a RuntimeException:
in
vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php
at line 89