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

[HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler#32818

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:3.4fromArman-Hosseini:patch-6
Sep 8, 2019
Merged

Conversation

@Arman-Hosseini
Copy link
Contributor

QA
Branch?>= 3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32444
LicenseMIT
Doc PRN/A

I had this problem and I noticed that an issue had already been registered.
So I registered the pull request.

@Arman-Hosseini
Copy link
ContributorAuthor

Cover

@nicolas-grekas
Copy link
Member

I'm not sure this is the correct fix. Can you check what "urlFormat" is in the constructor, when this happens? Maybe a callback is passed, and this callback has the bug?

@Arman-Hosseini
Copy link
ContributorAuthor

Arman-Hosseini commentedJul 30, 2019
edited
Loading

I've already reviewed it@nicolas-grekas
The base path was previously created by "FileLinkFormatter::generateUrlFormat" method.

You can also see the "urlFormat" in the following path:
symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml#63

    <service>        <factory method="generateUrlFormat" />        <argument type="service" />        <argument>_profiler_open_file</argument>        <argument>?file=%%f&amp;line=%%l#line%%l</argument>    </service>

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJul 30, 2019
edited
Loading

OK, thanks for the reminder, works for me.
Could you add a test case please?

@Arman-Hosseini
Copy link
ContributorAuthor

A test case with PHPUnit ?
@nicolas-grekas

@nicolas-grekas
Copy link
Member

Yes please

@javiereguiluz
Copy link
Member

@Arman-Hosseini creating a test for this is not a trivial thing so, if you need help, you can copy+paste this test and make the needed changes to test your feature:

publicfunctiontestWhenNoFileLinkFormatAndRequest()

@Arman-Hosseini
Copy link
ContributorAuthor

Hello@nicolas-grekas and@javiereguiluz .
I apologize. I am involved in a project and after that I only register a pull request in free time.
Do I have to create a separate class to do this, or is it enough to do a few tests within that class?

@nicolas-grekas
Copy link
Member

Yes, please do add a method on the class that'd be perfect.

@fabpot
Copy link
Member

Thank you@Arman-Hosseini.

fabpot added a commit that referenced this pull requestSep 8, 2019
…e wrong URL in Profiler (Arman-Hosseini)This PR was merged into the 3.4 branch.Discussion----------[HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler| Q             | A| ------------- | ---| Branch?       | >= 3.4 <!-- see below -->| Bug fix?      | yes| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets |#32444   <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | N/A <!-- required for new features -->I had this problem and I noticed that an issue had already been registered.So I registered the pull request.Commits-------9ed5f03 Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
@fabpotfabpot merged commit9ed5f03 intosymfony:3.4Sep 8, 2019
@Arman-HosseiniArman-Hosseini deleted the patch-6 branchSeptember 9, 2019 16:11
This was referencedOct 7, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@Arman-Hosseini@nicolas-grekas@javiereguiluz@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp