-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment() #3501
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
morozov
commented
Mar 29, 2019
morozov
changed the title
Reworked
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment() removed ::removeDoctrineTypeFromComment()
Mar 29, 2019
AbstractSchemaManager::extractDoctrineTypeFromComment()
removed ::removeDoctrineTypeFromComment()
morozov
changed the title
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment() removed ::removeDoctrineTypeFromComment()
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
Mar 29, 2019
greg0ire
reviewed
Mar 30, 2019
morozov
force-pushed
the
extract-type-from-comment
branch
3 times, most recently
from
April 3, 2019 23:54
735b62d
to
2650cd3
Compare
…moved `::removeDoctrineTypeFromComment()`
morozov
force-pushed
the
extract-type-from-comment
branch
from
April 6, 2019 18:07
2650cd3
to
1732869
Compare
Hmm, I'm not a native speaker so my perception of this may be wrong. I don't really have anything else to say except the naming. |
Majkl578
approved these changes
Apr 13, 2019
morozov
added a commit
that referenced
this pull request
Apr 16, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
May 6, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
May 23, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
to morozov/dbal
that referenced
this pull request
May 31, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
to morozov/dbal
that referenced
this pull request
May 31, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
Jun 13, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
Jun 27, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
Jun 27, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
Jun 27, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
to morozov/dbal
that referenced
this pull request
Aug 26, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
to morozov/dbal
that referenced
this pull request
Aug 27, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
morozov
added a commit
that referenced
this pull request
Nov 2, 2019
Reworked AbstractSchemaManager::extractDoctrineTypeFromComment(), removed ::removeDoctrineTypeFromComment()
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently,
AbstractSchemaManager::extractDoctrineTypeFromComment()
and::removeDoctrineTypeFromComment()
have to be called separately, one after the other, and duplicate implementation, however they are parts of a single whole: extracting a Doctrine type from the column comment.The fact that the former requires passing
$currentType
makes it hard to use when the type is not yet known (seeSqliteSchemaManager
) and hard to guess if the type was actually extracted (it takes passing a knowingly wrong type and compare it with the result).The proposed implementation makes the usage more straightforward. I would like to keep
testExtractDoctrineTypeFromComment
in place but I don't think the method is worth extraction into a separate class. Therefore, reflection is used in the test.It's still unclear to me whether column comments should be nullable or not in general (I'd love them to not be), but making a decision requires a larger effort which will be made later.It's actually not being currently changed.