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

Ignore missing 'debug.file_link_formatter' service in Debug bundle#21292

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
nicolas-grekas merged 1 commit intosymfony:3.2fromcore23:patch/debug-ignore
Feb 6, 2017

Conversation

@core23
Copy link
Contributor

QA
Branch?3.2
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsN/A
LicenseMIT
Doc PRN/A

The newHtmlDumper requires thedebug.file_link_formatter service which isn't available in older versions of theDebugBundle

@core23core23 changed the base branch frommaster to3.2January 14, 2017 15:19
@core23core23 changed the titlePatch/debug ignoreIgnore missing 'debug.file_link_formatter' service in Debug bundleJan 14, 2017
<callmethod="setDisplayOptions">
<argumenttype="collection">
<argumentkey="fileLinkFormat"type="service"id="debug.file_link_formatter"></argument>
<argumentkey="fileLinkFormat"type="service"id="debug.file_link_formatter"on-invalid="ignore"></argument>
Copy link
Member

Choose a reason for hiding this comment

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

If the service is invalid then the call still occurs with an empty collection as argument. I suggest to remove the call entirely and add it conditionally in DebugExtension instead

@nicolas-grekasnicolas-grekas added this to the3.2 milestoneJan 16, 2017
@nicolas-grekas
Copy link
Member

@core23 can you look at@chalasr's comment please?

@core23
Copy link
ContributorAuthor

I'm a little bit busy right now. Hope I can have a look at this next weekend.

@core23core23force-pushed thepatch/debug-ignore branch 3 times, most recently fromf93ce7e tobdd59aeCompareJanuary 28, 2017 19:02
/**
* {@inheritdoc}
*/
publicfunctiongetXsdValidationBasePath()
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 removed

/**
* {@inheritdoc}
*/
publicfunctiongetNamespace()
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 removed

*/
publicfunctionprocess(ContainerBuilder$container)
{
if (!$container->hasDefinition('var_dumper.html_dumper')) {
Copy link
Member

Choose a reason for hiding this comment

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

could be!$container->hasDefinition('var_dumper.html_dumper') || !$container->hasDefinition('debug.file_link_formatter'), removing the next check

core23 reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch


$dumperDefinition->addMethodCall('setDisplayOptions',array(
array(
'fileLinkFormat' =>$formatterDefintion,
Copy link
Member

Choose a reason for hiding this comment

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

this is wrong. You must use a reference, not an inline definition (which would create another instance of the class, as it would be a different service)

<argument>0</argument><!-- flags-->
<callmethod="setDisplayOptions">
<argumenttype="collection">
<argumentkey="fileLinkFormat"type="service"id="debug.file_link_formatter"></argument>
Copy link
Member

Choose a reason for hiding this comment

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

much simpler would be to useon-invalid="ignore" instead of changing it in a compiler pass

Copy link
Member

@chalasrchalasrFeb 2, 2017
edited
Loading

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I agree with@stof. Looks like overkill to me.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This was my first implementation#21292 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

@core23 I know. and a community review asked you to change it, but several core team members looking at your PR are preferring the first implementation until now (and other core team members have not said what they prefer).

Copy link
Member

Choose a reason for hiding this comment

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

sorry about the bad suggestion!

@stof
Copy link
Member

stof commentedFeb 2, 2017

status: needs work

@core23
Copy link
ContributorAuthor

Fixed :)

@chalasr
Copy link
Member

Looks good to me 👍

Status: needs review

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

@xabbuh
Copy link
Member

👍

@core23core23force-pushed thepatch/debug-ignore branch 2 times, most recently fromef86dc8 to2d60309CompareFebruary 6, 2017 16:23
@xabbuh
Copy link
Member

Rereading the discussion at#21292 (comment) I think it would indeed be simpler to use theon-invalid attribute and drop the compiler pass.

@core23
Copy link
ContributorAuthor

Fixed that

@nicolas-grekas
Copy link
Member

Thank you@core23.

@nicolas-grekasnicolas-grekas merged commit2201fbe intosymfony:3.2Feb 6, 2017
nicolas-grekas added a commit that referenced this pull requestFeb 6, 2017
…g bundle (core23)This PR was merged into the 3.2 branch.Discussion----------Ignore missing 'debug.file_link_formatter' service in Debug bundle| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | N/A| License       | MIT| Doc PR        | N/AThe new `HtmlDumper` requires the `debug.file_link_formatter` service which isn't available in older versions of the `DebugBundle`Commits-------2201fbe Ignore missing 'debug.file_link_formatter' service in Debug bundle
@core23core23 deleted the patch/debug-ignore branchFebruary 6, 2017 16:43
@fabpotfabpot mentioned this pull requestFeb 17, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@chalasrchalasrchalasr requested changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof approved these changes

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.2

Development

Successfully merging this pull request may close these issues.

7 participants

@core23@nicolas-grekas@stof@chalasr@xabbuh@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp