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

[Form][TwigBridge] Add help_attr#27043

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:masterfrommpiot:form_help_attr
Oct 17, 2018
Merged

[Form][TwigBridge] Add help_attr#27043

fabpot merged 1 commit intosymfony:masterfrommpiot:form_help_attr
Oct 17, 2018

Conversation

@mpiot
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRsymfony/symfony-docs#...

Add help_attr to the form_help method.

sstok reacted with heart emoji
@@ -1,3 +1,4 @@
<?phpif (!empty($help)):?>
<p id="<?phpecho$view->escape($id);?>_help" class="help-text"><?phpecho$view->escape(false !==$translation_domain ?$view['translator']->trans($help,array(),$translation_domain) :$help);?></p>
<?php$help_attr['class'] =trim((isset($help_attr['class']) ?$help_attr['class'].' help-text' :'help-text'));?>
Copy link
Member

Choose a reason for hiding this comment

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

you could apply the trimming around the concatenation only, as the other alternative is already trimmed.

@nicolas-grekasnicolas-grekas changed the titleAdd help_attr[Form][TwigBridge] Add help_attrApr 25, 2018
@xabbuh
Copy link
Member

Is this still needed given that#26332 was merged?

@mpiot
Copy link
ContributorAuthor

This follow the last, this PR add a 'help_attr', like 'label_attr' for exemple. That permit to configure the 'help' entry.

@xabbuh
Copy link
Member

@mpiot LGTM, can you please rebase here?

@mpiot
Copy link
ContributorAuthor

@xabbuh yes, I do that on Monday ;-) And I'll see to add a part about that in the doc

xabbuh reacted with thumbs up emoji

@xabbuh
Copy link
Member

We need to update the constraints for the Form component in thecomposer.json file of the Twig bridge to conflict with releases before 4.2.

@mpiot
Copy link
ContributorAuthor

Mmm, sorry I don't really know what to do :-/
Change the:
"require-dev": {
...
"symfony/form": "^4.1",
...
},
"conflict": {
...
"symfony/form": "^4.1",
...
},

I replace all 4.1 per ... ? 4.2 ? But I need to declare somewhere the version change ?

And I need to do the same in the Twig Bridge ?

I'm so sorry, I don't really know how it works.

@mpiot
Copy link
ContributorAuthor

mpiot commentedSep 26, 2018
edited
Loading

@xabbuh Thanks

I try to understand errors with deps=high. On my machine when I do something like:

cd src/Symfony/Bundle/FrameworkBundle/composer update --no-progress --no-suggest --ansiphpunit --exclude-group tty,benchmark,intl-data

And tests are OK, I don't see the difference with Travis, because I use the same commands as in the travis test.

Edit: I try to add the form version requirement in the FrameworkBundle too

@xabbuh
Copy link
Member

@mpiot This is a bit tricky. We use Travis to ensure that 4.1 versions of components work with 4.2 dependencies. The form theme tests are not very flexible as they mainly just compare the rendered HTML. I try to find a way to relax them a bit.

@fabpot
Copy link
Member

I've not reviewed this PR but I've spotted a merge commit in the history.@mpiot Can you rebase to get rid of it (as PR with merge commits cannot be merged)? Thank you.

@mpiot
Copy link
ContributorAuthor

@xabbuh thanks, so there's no way to pass the tests right now?

@xabbuh
Copy link
Member

@mpiot I try to look into it tonight.

mpiot reacted with heart emoji

@xabbuh
Copy link
Member

If I don't miss anything here, tests would pass just when we merge this into themaster branch. Wecould skip the new tests in case the Form component is not available in a compatible version, but that would only be needed for this PR. Afterwards, FrameworkBundle as well as TwigBridge will conflict with these versions of the Form component. So IMO not worth it to me and I vote for just merging as is.

@mpiot
Copy link
ContributorAuthor

mpiot commentedOct 16, 2018
edited
Loading

Thank you for the time you spent watching this :-)

I'll write the doc asap :-)

@fabpot
Copy link
Member

Thank you@mpiot.

sstok reacted with hooray emoji

@fabpotfabpot merged commit42d54b7 intosymfony:masterOct 17, 2018
fabpot added a commit that referenced this pull requestOct 17, 2018
This PR was merged into the 4.2-dev branch.Discussion----------[Form][TwigBridge] Add help_attr| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->Add help_attr to the  form_help method.Commits-------42d54b7 Add help_attr
@xabbuh
Copy link
Member

xabbuh commentedOct 17, 2018
edited
Loading

@mpiot FYI,@nicolas-grekas helped me to spot why the tests where failing (I moved the test method from the Form component to the concrete subclasses in FrameworkBundle and TwigBridge to fix it).

@mpiot
Copy link
ContributorAuthor

@xabbuh Thank you for this feedback, always important to know what was wrong :-)

xabbuh reacted with thumbs up emoji

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestOct 18, 2018
This PR was squashed before being merged into the master branch (closes#10511).Discussion----------[FormType] Add help_attr documentationAdd documentation about the new featuresymfony/symfony#27043Commits-------f6162bc [FormType] Add help_attr documentation
@nicolas-grekasnicolas-grekas modified the milestones:next,4.2Nov 1, 2018
This was referencedNov 3, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

6 participants

@mpiot@xabbuh@fabpot@stof@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp