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

[Console] application/command as text/xml/whatever decoupling#7454

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

Closed
jfsimon wants to merge24 commits intosymfony:masterfromjfsimon:console-descriptor

Conversation

@jfsimon
Copy link
Contributor

This PR removes description generation fromCommand,Application andInputDefinition classes and delegate it to specialized descriptor classes, making it dead simple to add new output formats.

Maybe this could include other commands, likerouter:debug orcontainer:debug (see#5740)?

  • Add aDescriptorProvider which usesDescriptorInterface objects to describe things.
  • Addtxt descriptors.
  • Addxml descriptors.
  • Addjson descriptors.
  • Addmd descriptors.
  • Remove obsolete methods.
  • Repair tests.
QA
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#6339

Copy link
Member

Choose a reason for hiding this comment

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

it should be@param object if$object can only be an object. And if it can be something else (a scalar or an array), the argument should be renamed)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

changed, thanks

@igorw
Copy link
Contributor

This PR is massive. It should be broken down into smaller commits that can be reviewed more easily. If possible perhaps even into separate smaller PRs that can be applied atomically without breaking stuff.

@jfsimon
Copy link
ContributorAuthor

@igorw I just unsquashed my commits for you.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be a lot simpler if the application text descriptor itself were responsible for rendering its elements? I think it would simplify the design and lead to less implicit dependency on the order of the descriptors.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I'm not sure to understand, this class just acts as a "descriptor selector".

@igorw
Copy link
Contributor

I'm not sure if introducing theDocument is worth the amount of code it introduces. If#6339 can produce the same result with only 342 new LOC, maybe we should aim for something more similar to it.

@jfsimon
Copy link
ContributorAuthor

@igorw do you think the markdown formatter is overkill?
(I guess the generated documents will change in the future and become more complex).

@igorw
Copy link
Contributor

Possibly. I guess re-implementing pandoc inside of symfony seems like a bit much.

Copy link
Member

Choose a reason for hiding this comment

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

Removing the public method is a BC break. you should provide a BC layer

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I guessasXml() methods should be present too and must be tagged as@deprecated.

Copy link
Member

Choose a reason for hiding this comment

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

right

@jfsimon
Copy link
ContributorAuthor

@igorw I think your right, I'll simplify the markdown descriptor.

Copy link
Member

Choose a reason for hiding this comment

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

Relying on reflection to get the definition looks like a hack

@stof
Copy link
Member

I don't like the hard coupling of descriptors, where each descriptor creates new instances of other descriptors. I leads to several issues:

  • this spawned descriptors don't respect the options set in the DescriptorSelector
  • replacing one of the descriptors in the DescriptorSelector would not be taken into account for nested descriptions.

You should retrieve the needed descriptor from the selector IMO

@jfsimon
Copy link
ContributorAuthor

@stof@igorw could you please take a look at the last commit, I'm not sure to do it the best way.
Actually, I begin to doubt of the entire feature design.

@fabpot
Copy link
Member

#5740 should indeed use this framework.@jfsimon Can you update this PR accordingly?

@jfsimon
Copy link
ContributorAuthor

@fabpot absolutely. Should I do the same withRouterDebugCommand? Shouldn't this be done in separate PRs?

@fabpot
Copy link
Member

Let's do that in the same PR (and indeed the router debug command should also be updated).

@fabpot
Copy link
Member

Can you also removed the*~ files that were committed by mistake?

Copy link
Member

Choose a reason for hiding this comment

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

Can you remove the blank lines between@param lines?

fabpot added a commit that referenced this pull requestOct 1, 2013
…fsimon)This PR was squashed before being merged into the master branch (closes#7887).Discussion----------[FrameworkBundle] adds routing/container descriptorsThe goal of this PR is to add descriptors (as in#7454) for routing and container. This will permit add a `--format` option to `router:debug` and `container:debug` commands (with `txt`, `json`, `xml` and `md` formats).Commits-------22f9bc8 [FrameworkBundle] adds routing/container descriptors
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@jfsimon@igorw@stof@fabpot@RobLoach@staabm

[8]ページ先頭

©2009-2025 Movatter.jp