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

Added a default ide file link web view#19973

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:masterfromjeremyFreeAgent:feature/ide
Oct 25, 2016

Conversation

@jeremyFreeAgent
Copy link
Contributor

@jeremyFreeAgentjeremyFreeAgent commentedSep 19, 2016
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

When having noframework.ide configured orframework.ide = symfony the file link open the source in a web view (eg_profiler/open?file=/src/AppBundle/Controller/DefaultController.php&line=50#line50).

dunglas, hason, ogizanagi, jvasseur, and Koc reacted with thumbs up emojiro0NL reacted with hooray emojiHeahDude reacted with heart emoji
'macvim' =>'mvim://open?url=file://%%f&line=%%l',
'emacs' =>'emacs://open?url=file://%%f&line=%%l',
'sublime' =>'subl://open?url=file://%%f&line=%%l',
'symfony' =>'/_profiler/open?file=%%f&line=%%l#line%%l#'.json_encode(dirname($container->getParameter('kernel.root_dir')).DIRECTORY_SEPARATOR).':""',

Choose a reason for hiding this comment

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

the app root doesn't always match the server root


$filename =dirname($this->kernelRootDir).DIRECTORY_SEPARATOR.$file;

if (preg_match("'(^|[/\\\\])\.\.?([/\\\\]|$)'",$file) || !is_readable($filename)) {

Choose a reason for hiding this comment

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

$filename => $file, we shouldn't leak the kernel root dir

@ro0NL
Copy link
Contributor

@jeremyFreeAgent can we open this page relatively simple in a modal overlay? Not leaving the current page. Simple iframe loading would be just fine i guess..

@fabpot
Copy link
Member

I like this. Can you take@nicolas-grekas comments into account?

@jeremyFreeAgentjeremyFreeAgentforce-pushed thefeature/ide branch 4 times, most recently from41fc036 to6a0340eCompareOctober 3, 2016 12:27
}

$profilerController =$container->getDefinition('web_profiler.controller.profiler');
$profilerController->replaceArgument(6,dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__DIR__)))))))));

Choose a reason for hiding this comment

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

does work with standalone web profiler bundle (from subtree split)

Copy link
Member

Choose a reason for hiding this comment

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

does or does not?

Choose a reason for hiding this comment

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

what about taking the common dir prefix ofkernel.root_dir &__DIR__

Choose a reason for hiding this comment

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

does not!

private$toolbarPosition;
private$cspHandler;
private$kernelRootDir;
private$rootDir;

Choose a reason for hiding this comment

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

baseDir?

returnarray(
$request->getSchemeAndHttpHost().$request->getBaseUrl().$this->urlFormat,
dirname($this->rootDir).DIRECTORY_SEPARATOR,'',
$this->rootDir.DIRECTORY_SEPARATOR,'',

Choose a reason for hiding this comment

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

baseDir?

@nicolas-grekas
Copy link
Member

👍 (failure unrelated, know composer bug)

@jeremyFreeAgent
Copy link
ContributorAuthor

I've made the changes in the Silex WebProfiler PR too.

*/
publicfunctionopenAction(Request$request)
{
if (null ===$this->baseDir) {
Copy link
Member

Choose a reason for hiding this comment

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

Should be much more explicit than that with a bit of context on how to fix this.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Actually the extension replace the argument baseDir should be always set and that exception may not be thrown, ever. Perhaps we can remove that test here. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, let's keep it as is

@fabpot
Copy link
Member

Thank you@jeremyFreeAgent.

@fabpotfabpot merged commitba6bcca intosymfony:masterOct 25, 2016
fabpot added a commit that referenced this pull requestOct 25, 2016
This PR was merged into the 3.2-dev branch.Discussion----------Added a default ide file link web view| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -When having no `framework.ide` configured or `framework.ide = symfony` the file link open the source in a web view (eg `_profiler/open?file=/src/AppBundle/Controller/DefaultController.php&line=50#line50`).![](https://cl.ly/2Z0W2J020p43/feature_ide.png)Commits-------ba6bcca Added a default ide file link web view
fabpot added a commit to silexphp/Silex-WebProfiler that referenced this pull requestOct 27, 2016
…reeAgent)This PR was merged into the 2.0.x-dev branch.Discussion----------Added the Symfony default ide file link web viewThis add the feature added bysymfony/symfony#19973Commits-------7e7f062 Added the Symfony default ide file link web view
@fabpotfabpot mentioned this pull requestOct 27, 2016
javiereguiluz added a commit to symfony/demo that referenced this pull requestDec 14, 2016
…r (jeremyFreeAgent, javiereguiluz)This PR was merged into the master branch.Discussion----------Updated the ide option to use the default open in browserRelated tosymfony/symfony#19973Commits-------2ee69c6 Added help about the framework.ide null value behaviour3f4fcc7 Updated the help note about framework.ide338e423 Updated the ide option to use the default open in browser
@mtibben
Copy link
Contributor

FYI@jeremyFreeAgent I've found a small problem with the open link URL, see#24868

sayjun0505 added a commit to sayjun0505/sym_proj that referenced this pull requestApr 16, 2023
…r (jeremyFreeAgent, javiereguiluz)This PR was merged into the master branch.Discussion----------Updated the ide option to use the default open in browserRelated tosymfony/symfony#19973Commits-------2ee69c6 Added help about the framework.ide null value behaviour3f4fcc7 Updated the help note about framework.ide338e423 Updated the ide option to use the default open in browser
spider-yamet added a commit to spider-yamet/sym_proj that referenced this pull requestApr 16, 2023
…r (jeremyFreeAgent, javiereguiluz)This PR was merged into the master branch.Discussion----------Updated the ide option to use the default open in browserRelated tosymfony/symfony#19973Commits-------2ee69c6 Added help about the framework.ide null value behaviour3f4fcc7 Updated the help note about framework.ide338e423 Updated the ide option to use the default open in browser
frederickboyd pushed a commit to frederickboyd/frederickboyd that referenced this pull requestMay 25, 2025
…r (jeremyFreeAgent, javiereguiluz)This PR was merged into the master branch.Discussion----------Updated the ide option to use the default open in browserRelated tosymfony/symfony#19973Commits-------2ee69c6 Added help about the framework.ide null value behaviour3f4fcc7 Updated the help note about framework.ide338e423 Updated the ide option to use the default open in browser
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@jeremyFreeAgent@ro0NL@fabpot@nicolas-grekas@mtibben@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp