Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form] Php doc fixes and cs + optimizations #30879

Merged
merged 1 commit into from Apr 6, 2019

Conversation

HeahDude
Copy link
Contributor

@HeahDude HeahDude commented Apr 6, 2019

Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ~
License MIT
Doc PR ~

Some micro optimizations may target master with some profiling but I would like some reviews first. Thanks!

src/Symfony/Component/Form/Button.php Show resolved Hide resolved
src/Symfony/Component/Form/ButtonBuilder.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/Form.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Show resolved Hide resolved
Copy link
Contributor

@dmaicher dmaicher left a comment

Choose a reason for hiding this comment

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

👍

src/Symfony/Component/Form/AbstractExtension.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/Form.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/Form.php Show resolved Hide resolved
}

if (null === $this->getName() || '' === $this->getName()) {
if (!$this->name) {
Copy link
Contributor

Choose a reason for hiding this comment

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

what if the name is '0'? 😄 Can it happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it can, nice catch!

Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we add a testcase or is there already one?

Copy link
Contributor

@dmaicher dmaicher Apr 6, 2019

Choose a reason for hiding this comment

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

Ok so I would just write if (trim($this->name) === '')

As discussed let's avoid the function call 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No function call :)

src/Symfony/Component/Form/DataTransformerInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/DataTransformerInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormConfigInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormConfigInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Outdated Show resolved Hide resolved
src/Symfony/Component/Form/FormInterface.php Outdated Show resolved Hide resolved
@HeahDude
Copy link
Contributor Author

HeahDude commented Apr 6, 2019

Thanks for the reviews :). Comments addressed, ready for another round!

Copy link
Contributor

@vudaltsov vudaltsov left a comment

Choose a reason for hiding this comment

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

Please, fix chained -> chain

@fabpot
Copy link
Member

fabpot commented Apr 6, 2019

Thank you @HeahDude.

@fabpot fabpot merged commit 56429a6 into symfony:3.4 Apr 6, 2019
fabpot added a commit that referenced this pull request Apr 6, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Php doc fixes and cs + optimizations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Some micro optimizations may target master with some profiling but I would like some reviews first. Thanks!

Commits
-------

56429a6 [Form] various minor fixes
@xabbuh xabbuh mentioned this pull request Apr 6, 2019
xabbuh added a commit that referenced this pull request Apr 6, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30879
| License       | MIT
| Doc PR        |

Commits
-------

83c661d fix tests
This was referenced Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet