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

Bug with PostgreSQL schema manager after update on 2.11.2 #4359

Closed
andreybolonin opened this issue Oct 19, 2020 · 11 comments · Fixed by #4364
Closed

Bug with PostgreSQL schema manager after update on 2.11.2 #4359

andreybolonin opened this issue Oct 19, 2020 · 11 comments · Fixed by #4364

Comments

@andreybolonin
Copy link
Contributor

Screen Shot 2020-10-19 at 10 39 12 AM

@andreybolonin andreybolonin changed the title Bug with dsv after update Bug with dsv after update on 2.11.2 Oct 19, 2020
@sasule
Copy link

sasule commented Oct 19, 2020

I have the same problem.
My configuration: Postgre13 and php 7.4.11.

@digitv
Copy link

digitv commented Oct 19, 2020

I confirm the same behavior on our app (Laravel 6) deploy with bitbucket pipepines.
PHP 7.4.5
PostgreSQL10

I my case it happens during migrations apply.

@shEtendard
Copy link

assert(preg_match(
            '/FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)/',
            $tableForeignKey['condef'],
            $values
        ) !== 0);

https://www.php.net/manual/en/function.preg-match.php
preg_match() returns 1 if the pattern matches given subject, 0 if it does not, or FALSE if an error occurred.

@agustingomes
Copy link

I can confirm the same error in the PostgreSqlSchemaManager.php.

In my case it was with php 7.4.11 and Postgres 10.6

@SindlaXYZ
Copy link

Same error after 2.11.2 update (from 2.11.1).

PHP 7.4.11 & PostgreSQL 12.4

@pelikan7
Copy link

The code inside assert() does not run at all, leaving $values as undefined variable

@bensquire
Copy link

bensquire commented Oct 19, 2020

Can also confirm the problem, 2.11.2 from 2.11.1, PostgresSQL, PHP 7.4.11.

@jarofgreen
Copy link

Confirmed, downgrading to 2.11.1 fixes it fine.

In my case I got it in Symfony 5.1 when running:

./bin/console doctrine:schema:drop --force --quiet

@morozov
Copy link
Member

morozov commented Oct 20, 2020

The issue is reproducible via the existing test suite with disabled assertions (zend.assertions=-1):

$ phpunit -c pdo-pgsql.phpunit.xml tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php

PHPUnit 9.4.0 by Sebastian Bergmann and contributors.

......EE.E...EEE...............E.......EEE....EE.....E.E.S...........S........... 81 / 85 ( 95%)
..S.                                                                              85 / 85 (100%)

Time: 00:07.376, Memory: 18.00 MB

There were 14 errors:

1) Doctrine\Tests\DBAL\Functional\Schema\PostgreSqlSchemaManagerTest::testTableWithSchema
Exception: [PHPUnit\Framework\Error\Notice] Undefined variable: values
...

@morozov morozov changed the title Bug with dsv after update on 2.11.2 Bug with PostgreSQL schema manager after update on 2.11.2 Oct 20, 2020
@EdgarSedov
Copy link

Holy shit, i've spent so many hours trying to find this thread via google, but found only after i've looked into blame for file)

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.