Skip to content

Allow EnumNode name to be null #25048

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

Closed
wants to merge 3 commits into from
Closed

Allow EnumNode name to be null #25048

wants to merge 3 commits into from

Conversation

MatTheCat
Copy link
Contributor

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25046
License MIT

@nicolas-grekas
Copy link
Member

Thanks, could you add a test case please?

@MatTheCat
Copy link
Contributor Author

MatTheCat commented Nov 20, 2017

Yep, guess 74b9fb1 will be enough?

@@ -43,6 +43,11 @@ public function testConstructionWithOneDistinctValue()
$this->assertSame('foo', $node->finalize('foo'));
}

public function testConstructionWithNullName()
{
new EnumNode(null, null, array('foo'));
Copy link
Member

Choose a reason for hiding this comment

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

please call ->finalize() or so to make the test not risky

@chalasr chalasr added this to the 4.0 milestone Nov 20, 2017
@chalasr chalasr added the Config label Nov 20, 2017
public function testConstructionWithNullName()
{
$node = new EnumNode(null, null, array('foo'));
$node->finalize('foo');
Copy link
Member

Choose a reason for hiding this comment

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

please assert it (sorry I've been unclear) :)

@MatTheCat
Copy link
Contributor Author

Woops sorry 😓

@nicolas-grekas
Copy link
Member

Thank you @MatTheCat.

nicolas-grekas added a commit that referenced this pull request Nov 20, 2017
This PR was squashed before being merged into the 4.0-dev branch (closes #25048).

Discussion
----------

Allow EnumNode name to be null

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25046
| License       | MIT

Commits
-------

57d0636 Allow EnumNode name to be null
@MatTheCat MatTheCat deleted the ticket_25046 branch November 21, 2017 09:45
@fabpot fabpot mentioned this pull request Nov 21, 2017
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.

7 participants