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

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

Merged
fabpot merged 1 commit intosymfony:2.7fromrubenrua:fix_emacs_link
Mar 1, 2017
Merged

Fix emacs link#21731

fabpot merged 1 commit intosymfony:2.7fromrubenrua:fix_emacs_link
Mar 1, 2017

Conversation

@rubenrua
Copy link
Contributor

@rubenruarubenrua commentedFeb 23, 2017
edited
Loading

QA
Branch?2.7
Bug fix?yes (minor)
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsnone
LicenseMIT
Doc PRnone

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):

.#Controller.php -> user@host.12345:1296583136

where '12345' isthe Emacs' PID.

In this case Symfony breaks with a RuntimeException:

SplFileInfo::getMTime(): stat failed for ...Bundle/Controller/.#APIController.php

in
vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php
at line 89

$newestMTime = max($file->getMTime(), $newestMTime);

@nicolas-grekas
Copy link
Member

Applies to 2.7, isn't it?

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneFeb 25, 2017
@rubenrua
Copy link
ContributorAuthor

Yes, new pull request?

@xabbuh
Copy link
Member

@rubenrua No need for a new PR. You can rebase your changes onto the2.7 branch and then changed the target path here.

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);```
@rubenruarubenrua changed the base branch from2.8 to2.7February 28, 2017 11:11
@rubenrua
Copy link
ContributorAuthor

Rebase done


// for broken links
try {
$fileMTime =$file->getMTime();
Copy link
Member

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?

Copy link
ContributorAuthor

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());

https://3v4l.org/nLNYH

@fabpot
Copy link
Member

Thank you@rubenrua.

@fabpotfabpot merged commitc6f7ca6 intosymfony:2.7Mar 1, 2017
fabpot added a commit that referenced this pull requestMar 1, 2017
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
This was referencedMar 6, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

6 participants

@rubenrua@nicolas-grekas@xabbuh@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp