Skip to content

#3074 #2765 Applying CS and adding lacking types wherever holes have been forgotten#1

Merged
morozov merged 1 commit intomorozov:fix-last-insert-id-consistencyfrom
Ocramius:chore/fix-last-insert-id-consistency
Apr 3, 2018
Merged

#3074 #2765 Applying CS and adding lacking types wherever holes have been forgotten#1
morozov merged 1 commit intomorozov:fix-last-insert-id-consistencyfrom
Ocramius:chore/fix-last-insert-id-consistency

Conversation

@Ocramius
Copy link
Copy Markdown

@Ocramius Ocramius commented Apr 2, 2018

Applies to doctrine#2765 and doctrine#3074

@morozov morozov force-pushed the fix-last-insert-id-consistency branch 4 times, most recently from 5746e9f to 8d1ebf7 Compare April 3, 2018 06:36
@morozov
Copy link
Copy Markdown
Owner

morozov commented Apr 3, 2018

@Ocramius sorry, didn't notice your PR and fixed CS violations by rebasing. Do you want to rebase on top and keep your type changes? The code style build is green now.

@Ocramius
Copy link
Copy Markdown
Author

Ocramius commented Apr 3, 2018

@morozov can do once at the office

@morozov
Copy link
Copy Markdown
Owner

morozov commented Apr 3, 2018

Feel free to push into my branch. I'm tired restarting errored MySQL builds on Travis :-\

@Ocramius Ocramius force-pushed the chore/fix-last-insert-id-consistency branch from e9daa7b to b05053c Compare April 3, 2018 16:47
* @return string The last insert ID or '0' in case the last insert ID generated on this connection is unknown.
*
* @throws PDOException
* @throws \PDOException
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Exception type changed to base exception here, since the wrapped connection is accessed directly.

@Ocramius
Copy link
Copy Markdown
Author

Ocramius commented Apr 3, 2018

@morozov rebased 👍

private $testConnection;

protected function setUp()
protected function setUp() : void
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should we enforce this in the code style? Or maybe recommend to PHPUnit? Seems working even on PHP 7.2: https://3v4l.org/4QqdS

}

public function testLastInsertIdNoInsert()
public function testLastInsertIdNoInsert() : void
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This also could be enforced in the code style.

@morozov morozov merged commit eb85408 into morozov:fix-last-insert-id-consistency Apr 3, 2018
morozov added a commit that referenced this pull request Jun 7, 2019
The new version contains some improvements in handling mocks (sebastianbergmann/phpunit#3602) and will help identify some existing issues in DBAL 3.0 tests:

There were 2 warnings:

1) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #0 (array('test', null, 'value'))
Method bindValue may not return value of type boolean

2) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #1 (array(null, 'test', 'value'))
Method bindValue may not return value of type boolean
morozov added a commit that referenced this pull request Jun 7, 2019
The new version contains some improvements in handling mocks (sebastianbergmann/phpunit#3602) and will help identify some existing issues in DBAL 3.0 tests:

There were 2 warnings:

1) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #0 (array('test', null, 'value'))
Method bindValue may not return value of type boolean

2) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #1 (array(null, 'test', 'value'))
Method bindValue may not return value of type boolean
morozov added a commit that referenced this pull request Jun 10, 2019
The new version contains some improvements in handling mocks (sebastianbergmann/phpunit#3602) and will help identify some existing issues in DBAL 3.0 tests:

There were 2 warnings:

1) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #0 (array('test', null, 'value'))
Method bindValue may not return value of type boolean

2) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #1 (array(null, 'test', 'value'))
Method bindValue may not return value of type boolean
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants