Skip to content

Made the OCI8Statement class final#3820

Merged
Ocramius merged 2 commits intodoctrine:masterfrom
morozov:finalize-oci8-statement
Jan 13, 2020
Merged

Made the OCI8Statement class final#3820
Ocramius merged 2 commits intodoctrine:masterfrom
morozov:finalize-oci8-statement

Conversation

@morozov
Copy link
Copy Markdown
Member

@morozov morozov commented Jan 12, 2020

Q A
Type improvement
BC Break yes
Fixed issues #3818
Depends on #3809

The OCI8Statement::convertPositionalToNamedPlaceholders() method is extracted to an internal utility class in order to enable making the class final. The corresponding test methods are extracted from UtilTest and OCI8StatementTest to the dedicated test class.

OCI8StatementTest has been removed since it doesn't contain any more tests which is a good sign: we're not testing any driver-specific implementation details on the driver class itself.

Copy link
Copy Markdown
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

LGTM 👍


## BC BREAK: Dropped handling of one-based numeric arrays of parameters in `Statement::execute()`

The statement implementations no longer detect whether `$params` is a zero- or one-based array. A zero-based numeric array is expected.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should probably start adding @psalm-param list<T> for these

Copy link
Copy Markdown
Member Author

@morozov morozov Jan 13, 2020

Choose a reason for hiding this comment

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

Should we add Psalm to the build pipeline first? Consumers using Psalm will benefit from those annotations regardless but we want to make sure those annotations are valid and kept up to date.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure thing - it's a big amount of work to get it to "like" our codebase though 😅

@Ocramius Ocramius added this to the 3.0.0 milestone Jan 13, 2020
@Ocramius Ocramius self-assigned this Jan 13, 2020
@Ocramius Ocramius removed the WIP label Jan 13, 2020
@Ocramius Ocramius merged commit 04db0ef into doctrine:master Jan 13, 2020
@morozov morozov deleted the finalize-oci8-statement branch January 13, 2020 02:57
@morozov morozov mentioned this pull request Oct 19, 2020
2 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants