Skip to content

[Config] added EnumNode #4420

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

Merged
merged 1 commit into from
May 26, 2012
Merged

[Config] added EnumNode #4420

merged 1 commit into from
May 26, 2012

Conversation

schmittjoh
Copy link
Contributor

This adds an EnumNode which should be used instead of a Closure and manual validation.

The benefit is that you can retrieve the allowed values. It is also a bit shorter, but that is not the main point here.

@travisbot
Copy link

This pull request passes (merged 8308aea into ff4d446).

fabpot added a commit that referenced this pull request May 26, 2012
Commits
-------

8308aea [Config] added EnumNode

Discussion
----------

[Config] added EnumNode

This adds an EnumNode which should be used instead of a Closure and manual validation.

The benefit is that you can retrieve the allowed values. It is also a bit shorter, but that is not the main point here.

---------------------------------------------------------------------------

by travisbot at 2012-05-26T03:52:50Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1439264) (merged 8308aea into ff4d446).
@fabpot fabpot merged commit 8308aea into symfony:master May 26, 2012
throw new \InvalidArgumentException('->values() must be called with at least two distinct values.');
}

$this->values = $values;
Copy link

Choose a reason for hiding this comment

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

Missing: return $this;

Copy link

Choose a reason for hiding this comment

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

I recommend, that you do a PR if this is till an issue. Also note, that you have to do a PR against the branch this feature was introduced in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants