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

Add type validation to factory calls #1282

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

mvorisek
Copy link
Member

No description provided.

@mvorisek mvorisek force-pushed the add_type_validation_to_factory_calls branch 2 times, most recently from 64fbe0a to 00aeaa8 Compare June 15, 2020 17:15
@mvorisek mvorisek force-pushed the add_type_validation_to_factory_calls branch from 00aeaa8 to d0359a9 Compare June 26, 2020 18:48
@mvorisek mvorisek force-pushed the add_type_validation_to_factory_calls branch from d0359a9 to f720bb8 Compare July 7, 2020 22:53
@mvorisek mvorisek force-pushed the add_type_validation_to_factory_calls branch 2 times, most recently from de6be7a to 157d6a9 Compare August 25, 2020 09:37
@mvorisek mvorisek changed the title WIP: Add type validation to factory calls Add type validation to factory calls Aug 25, 2020
@mvorisek mvorisek marked this pull request as ready for review August 25, 2020 09:37
@mvorisek mvorisek added the RTM label Aug 25, 2020
@@ -216,7 +216,7 @@ public function addColumn(?string $name, $columnDecorator = null, $field = null)

if ($field === null) {
// column is not associated with any model field
$columnDecorator = $this->_addUnchecked($this->factory($columnDecorator, ['table' => $this]));
$columnDecorator = $this->_addUnchecked(Table\Column::fromSeed($columnDecorator, ['table' => $this]));
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI: _addUnchecked already checks type, but this is more like side effect because add does not work and it can change in the future...

@mvorisek mvorisek force-pushed the add_type_validation_to_factory_calls branch from 157d6a9 to 7739dcc Compare August 26, 2020 19:09
Copy link
Contributor

@ibelar ibelar left a comment

Choose a reason for hiding this comment

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

LGTM

@mvorisek mvorisek merged commit 55a475a into develop Sep 1, 2020
@mvorisek mvorisek deleted the add_type_validation_to_factory_calls branch September 1, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants