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

[CssSelector] remove ConverterInterface#15988

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 2 commits intosymfony:2.8fromfabpot:interfaces-deprecation
Sep 30, 2015

Conversation

@fabpot
Copy link
Member

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#15934
LicenseMIT
Doc PRn/a

@fabpot
Copy link
MemberAuthor

TheConverter name is probably not the best one. I'm not a big fan ofCssToXPathConverter either and I think the best one is stillCssSelector (which implements the static interface). Not sure what to do here. ping @symfony/deciders

@xabbuh
Copy link
Member

👍

Status: Reviewed

About the class name: We could merge theConverter and theCssSelector class and only deprecate the static method.

Copy link
Member

Choose a reason for hiding this comment

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

@fabpot is the phpdoc the right place to put the license of the ported library ? This class is not even ported from the Python library (the classes porting the Pythin library are all the internal classes)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

moved to the README file instead

@fabpot
Copy link
MemberAuthor

@xabbuhtoXPath() are in both the new and the old class (one is static, the other one is not).

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be calledTransformer? As this transforms one convention to another ;)

@xabbuh
Copy link
Member

@fabpot We could rename the new method toasXPath() or something like that or choose a class name likeCssTransformer.

@Tobion
Copy link
Contributor

I thinkCssSelector would be the wrong name for a non-static class. In OOP I would image an API of a CssSelector like(new CssSelector($css))->toXPath(). So the CssSelector represents a single css expression. But that is not the API we have here right now. So Converter/Transformer (but more specific) makes alot more sense, as you only need one converter to transform alot of css expressions.

But again justConverter is too generic, as I wouldn't know what the purpose of this class is when I seenew Converter().

@weaverryan
Copy link
Member

How about any ofCssConverter,CssTransformer orCssTranslator?

@jakzal
Copy link
Contributor

orCssSelectorConverter ?

@Tobion
Copy link
Contributor

+1 forCssSelectorConverter as we are converting a selector and not css code

@fabpotfabpotforce-pushed theinterfaces-deprecation branch 2 times, most recently fromfd6c763 toac17232CompareSeptember 30, 2015 06:26
@fabpot
Copy link
MemberAuthor

Renamed and fixed the README to use the new API.

@xabbuh
Copy link
Member

👍

@fabpotfabpot merged commit8b8b634 intosymfony:2.8Sep 30, 2015
fabpot added a commit that referenced this pull requestSep 30, 2015
This PR was merged into the 2.8 branch.Discussion----------[CssSelector] remove ConverterInterface| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#15934| License       | MIT| Doc PR        | n/aCommits-------8b8b634 [CssSelector] updated READMEfd3fefb [CssSelector] remove ConverterInterface
@stof
Copy link
Member

This is broken. You forgot to use the new class name in the DomCrawler component (why do we have a red flag on Travis and AppVeyor if nobody look at the test failures ?)

@fabpot
Copy link
MemberAuthor

Indeed, sorry about that, doing a PR right now.

@fabpot
Copy link
MemberAuthor

see#16012

@xabbuh
Copy link
Member

We need to make sure that our testsuite gets back to green asap so that we spot things like this faster. :/

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

8 participants

@fabpot@xabbuh@Tobion@weaverryan@jakzal@stof@stloyd@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp