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

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

Conversation

Ocramius
Copy link

@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
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
Author

Ocramius commented Apr 3, 2018

@morozov can do once at the office

@morozov
Copy link
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
@@ -183,7 +183,7 @@ public function trackLastInsertId() : void
*
* @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
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
Author

Ocramius commented Apr 3, 2018

@morozov rebased 👍

@@ -13,7 +13,7 @@ class LastInsertIdTest extends DbalFunctionalTestCase
/** @var Connection */
private $testConnection;

protected function setUp()
protected function setUp() : void
Copy link
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

@@ -47,27 +47,27 @@ private function createTable($tableName)
$connection->getSchemaManager()->createTable($table);
}

public function testLastInsertIdNoInsert()
public function testLastInsertIdNoInsert() : void
Copy link
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
2 participants