Tests do not run after upgrading from 4.3 to 4.4

49
December 08, 2019, at 08:30 AM

A project in Symfony 4.3 has a functional test suite with 43 tests that all pass. After upgrading to 4.4 two tests of the suite will run then quit with the error

Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException

The tests are run against a sqlite database. Here's a list of what may include the relevant dependencies. The only difference between the 4.3 and 4.4 installations is with symfony/doctrine-bridge: 4.3 has v4.3.9, 4.4 has v4.4.1. The 4.3 list is

dama/doctrine-test-bundle           v6.2.1
doctrine/annotations                v1.8.0  
doctrine/cache                      1.10.0  
doctrine/collections                1.6.4   
doctrine/common                     v2.11.0 
doctrine/data-fixtures              1.4.0   
doctrine/dbal                       v2.10.0 
doctrine/doctrine-bundle            2.0.2   
doctrine/doctrine-fixtures-bundle   3.3.0   
doctrine/doctrine-migrations-bundle 2.1.2   
doctrine/event-manager              1.1.0   
doctrine/inflector                  1.3.1   
doctrine/instantiator               1.3.0   
doctrine/lexer                      1.2.0   
doctrine/migrations                 2.2.0   
doctrine/orm                        v2.7.0  
doctrine/persistence                1.2.0   
doctrine/reflection                 v1.0.0  
liip/test-fixtures-bundle           1.3.3   
symfony/doctrine-bridge             v4.3.9 
symfony/phpunit-bridge              v5.0.1

The failure quoted above will occur after a single test. A test

namespace App\Tests\Controller;
use Liip\TestFixturesBundle\Test\FixturesTrait;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
 * 
 */
class NonprofitControllerTest extends WebTestCase
{
    use FixturesTrait;
    public function setup(): void
    {
        $this->fixtures = $this->loadFixtures([
                    'App\DataFixtures\Test\OptionsFixture',
                    'App\DataFixtures\Test\NonprofitFixture',
                ])
                ->getReferenceRepository();
        $this->client = static::createClient();
        $this->client->followRedirects();
    }
}

test.log from failed test

doctrine.DEBUG: CREATE TABLE usertable (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, roles CLOB NOT NULL --(DC2Type:array) , password VARCHAR(255) NOT NULL, email VARCHAR(180) NOT NULL, fname VARCHAR(255) NOT NULL, sname VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, token_expires_at DATETIME DEFAULT NULL, locked BOOLEAN NOT NULL, enabled BOOLEAN NOT NULL, type VARCHAR(255) NOT NULL) [] []
doctrine.DEBUG: CREATE UNIQUE INDEX UNIQ_D18DB394E7927C74 ON usertable (email) [] []
doctrine.DEBUG: CREATE TABLE admin (id INTEGER NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_880E0D76BF396750 FOREIGN KEY (id) REFERENCES usertable (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) [] []
doctrine.DEBUG: CREATE TABLE focus (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, focus VARCHAR(45) DEFAULT NULL, enabled BOOLEAN NOT NULL) [] []
doctrine.DEBUG: CREATE TABLE new_opp_email (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, volunteer_email CLOB NOT NULL --(DC2Type:json_array) , date_added DATE NOT NULL, sent BOOLEAN NOT NULL, n_volunteers INTEGER DEFAULT NULL, n_opportunities INTEGER DEFAULT NULL) [] []
doctrine.DEBUG: CREATE TABLE nonprofit (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, orgName VARCHAR(255) DEFAULT NULL, address VARCHAR(50) DEFAULT NULL, city VARCHAR(50) DEFAULT NULL, state VARCHAR(50) DEFAULT NULL, zip VARCHAR(10) DEFAULT NULL, phone VARCHAR(50) DEFAULT NULL, website VARCHAR(50) DEFAULT NULL, active BOOLEAN DEFAULT NULL, add_date DATETIME NOT NULL, areacode INTEGER DEFAULT NULL, ein VARCHAR(255) NOT NULL, json_focus CLOB NOT NULL --(DC2Type:json_array) , staff_id INTEGER DEFAULT NULL) [] []
doctrine.DEBUG: CREATE UNIQUE INDEX UNIQ_E4924055D4D57CD ON nonprofit (staff_id) [] []
doctrine.DEBUG: CREATE TABLE org_focus (orgId INTEGER NOT NULL, focusId INTEGER NOT NULL, PRIMARY KEY(orgId, focusId)) [] []
doctrine.DEBUG: CREATE TABLE opportunity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, oppName VARCHAR(66) DEFAULT NULL, add_date DATE DEFAULT NULL, lastUpdate DATETIME DEFAULT NULL, minAge CLOB DEFAULT NULL, active BOOLEAN DEFAULT NULL, group_ok BOOLEAN DEFAULT NULL, expireDate DATE DEFAULT NULL, description CLOB DEFAULT NULL, background BOOLEAN DEFAULT NULL, json_skill CLOB NOT NULL --(DC2Type:json_array) , orgId INTEGER DEFAULT NULL) [] []
doctrine.DEBUG: CREATE INDEX IDX_8389C3D73A8AF33E ON opportunity (orgId) [] []
doctrine.DEBUG: CREATE TABLE opp_skill (oppId INTEGER NOT NULL, skillId INTEGER NOT NULL, PRIMARY KEY(oppId, skillId)) [] []
doctrine.DEBUG: CREATE TABLE skill (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, skill VARCHAR(45) DEFAULT NULL, enabled BOOLEAN NOT NULL) [] []
doctrine.DEBUG: CREATE TABLE staff (id INTEGER NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_426EF392BF396750 FOREIGN KEY (id) REFERENCES usertable (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) [] []
doctrine.DEBUG: CREATE TABLE volunteer (id INTEGER NOT NULL, receive_email BOOLEAN DEFAULT NULL, json_focus CLOB NOT NULL --(DC2Type:json_array) , json_skill CLOB NOT NULL --(DC2Type:json_array) , PRIMARY KEY(id), CONSTRAINT FK_5140DEDBBF396750 FOREIGN KEY (id) REFERENCES usertable (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) [] []
doctrine.DEBUG: CREATE TABLE vol_focus (volId INTEGER NOT NULL, focusId INTEGER NOT NULL, PRIMARY KEY(volId, focusId)) [] []
doctrine.DEBUG: CREATE TABLE vol_skill (volId INTEGER NOT NULL, skillId INTEGER NOT NULL, PRIMARY KEY(volId, skillId)) [] []
doctrine.DEBUG: "START TRANSACTION" [] []
doctrine.DEBUG: DELETE FROM vol_focus [] []
doctrine.DEBUG: DELETE FROM vol_skill [] []
doctrine.DEBUG: DELETE FROM org_focus [] []
doctrine.DEBUG: DELETE FROM opp_skill [] []
doctrine.DEBUG: DELETE FROM opportunity [] []
doctrine.DEBUG: DELETE FROM nonprofit [] []
doctrine.DEBUG: DELETE FROM usertable [] []
doctrine.DEBUG: DELETE FROM admin [] []
doctrine.DEBUG: DELETE FROM volunteer [] []
doctrine.DEBUG: DELETE FROM focus [] []
doctrine.DEBUG: DELETE FROM new_opp_email [] []
doctrine.DEBUG: DELETE FROM staff [] []
doctrine.DEBUG: DELETE FROM skill [] []
doctrine.DEBUG: INSERT INTO skill (skill, enabled) VALUES (?, ?) {"1":"Administrative Support","2":true} []
doctrine.DEBUG: INSERT INTO skill (skill, enabled) VALUES (?, ?) {"1":"Board Member","2":true} []
doctrine.DEBUG: INSERT INTO skill (skill, enabled) VALUES (?, ?) {"1":"Computers & IT","2":true} []
doctrine.DEBUG: INSERT INTO focus (focus, enabled) VALUES (?, ?) {"1":"Seniors","2":true} []
doctrine.DEBUG: INSERT INTO focus (focus, enabled) VALUES (?, ?) {"1":"Education","2":true} []
doctrine.DEBUG: INSERT INTO focus (focus, enabled) VALUES (?, ?) {"1":"Health","2":true} []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_VOLUNTEER","ROLE_STAFF","ROLE_ADMIN"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"admin@bogus.info","4":"Benny","5":"Borko","6":null,"7":null,"8":null,"9":false,"10":true,"11":"admin"} []
doctrine.DEBUG: INSERT INTO admin (id) VALUES (?) {"1":1} []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_VOLUNTEER"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"random@bogus.info","4":"Random","5":"Bogus","6":null,"7":"abcdef","8":"2029-12-07 11:16:19","9":false,"10":false,"11":"volunteer"} []
doctrine.DEBUG: INSERT INTO volunteer (id, receive_email, json_focus, json_skill) VALUES (?, ?, ?, ?) {"1":2,"2":true,"3":[],"4":[]} []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_VOLUNTEER"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"pseudo@bogus.info","4":"Very","5":"Bogus","6":null,"7":"ghijkl","8":"2029-12-07 11:16:19","9":false,"10":true,"11":"volunteer"} []
doctrine.DEBUG: INSERT INTO volunteer (id, receive_email, json_focus, json_skill) VALUES (?, ?, ?, ?) {"1":3,"2":true,"3":[],"4":[]} []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_VOLUNTEER"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"garbled@bogus.info","4":"Very","5":"Bogus","6":null,"7":"fedcba","8":"2019-12-07 08:16:19","9":false,"10":false,"11":"volunteer"} []
doctrine.DEBUG: INSERT INTO volunteer (id, receive_email, json_focus, json_skill) VALUES (?, ?, ?, ?) {"1":4,"2":true,"3":[],"4":[]} []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_VOLUNTEER"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"volunteer@bogus.info","4":"Exceptionally","5":"Bogus","6":null,"7":null,"8":null,"9":false,"10":true,"11":"volunteer"} []
doctrine.DEBUG: INSERT INTO volunteer (id, receive_email, json_focus, json_skill) VALUES (?, ?, ?, ?) {"1":5,"2":true,"3":[1,3],"4":[1,2]} []
doctrine.DEBUG: INSERT INTO vol_focus (volId, focusId) VALUES (?, ?) [5,1] []
doctrine.DEBUG: INSERT INTO vol_focus (volId, focusId) VALUES (?, ?) [5,3] []
doctrine.DEBUG: INSERT INTO vol_skill (volId, skillId) VALUES (?, ?) [5,1] []
doctrine.DEBUG: INSERT INTO vol_skill (volId, skillId) VALUES (?, ?) [5,2] []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_STAFF"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"unknown@bogus.info","4":"Unknown","5":"Bogus","6":null,"7":"tuvxyz","8":"2029-12-07 11:16:20","9":false,"10":false,"11":"staff"} []
doctrine.DEBUG: INSERT INTO staff (id) VALUES (?) {"1":6} []
doctrine.DEBUG: INSERT INTO usertable (roles, password, email, fname, sname, last_login, confirmation_token, token_expires_at, locked, enabled, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":["ROLE_STAFF"],"2":"$argon2id$v=19$m=65536,t=4 [...]","3":"staff@bogus.info","4":"Misfit","5":"Bogus","6":null,"7":null,"8":null,"9":false,"10":true,"11":"staff"} []
doctrine.DEBUG: INSERT INTO staff (id) VALUES (?) {"1":7} []
doctrine.DEBUG: INSERT INTO nonprofit (orgName, address, city, state, zip, phone, website, active, add_date, areacode, ein, json_focus, staff_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":"Marmot Fund","2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":false,"9":"2019-12-07 11:16:20","10":null,"11":"123456789","12":[],"13":6} []
doctrine.DEBUG: INSERT INTO nonprofit (orgName, address, city, state, zip, phone, website, active, add_date, areacode, ein, json_focus, staff_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":"Turkey Fund","2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":true,"9":"2019-12-07 11:16:20","10":null,"11":"321654978","12":[3],"13":7} []
doctrine.DEBUG: INSERT INTO opportunity (oppName, add_date, lastUpdate, minAge, active, group_ok, expireDate, description, background, json_skill, orgId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {"1":"Feeder","2":"2020-03-07 11:16:21","3":null,"4":null,"5":true,"6":null,"7":"2020-03-07 11:16:21","8":"Get them to eat","9":null,"10":[1],"11":2} []
doctrine.DEBUG: INSERT INTO opp_skill (oppId, skillId) VALUES (?, ?) [1,1] []
doctrine.DEBUG: INSERT INTO org_focus (orgId, focusId) VALUES (?, ?) [2,3] []
doctrine.DEBUG: INSERT INTO new_opp_email (volunteer_email, date_added, sent, n_volunteers, n_opportunities) VALUES (?, ?, ?, ?, ?) {"1":{"5":[1]},"2":"2019-12-07 11:16:21","3":false,"4":null,"5":null} []
doctrine.DEBUG: "COMMIT" [] []
request.INFO: Matched route "opp_search". {"route":"opp_search","route_parameters":{"_route":"opp_search","_controller":"App\\Controller\\OpportunityController::search"},"request_uri":"http://localhost/opportunity/search","method":"GET"} []
security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"main","authenticators":1} []
security.DEBUG: Checking support on guard authenticator. {"firewall_key":"main","authenticator":"App\\Security\\LoginFormAuthenticator"} []
security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"main","authenticator":"App\\Security\\LoginFormAuthenticator"} []
security.INFO: Populated the TokenStorage with an anonymous Token. [] []
doctrine.DEBUG: "START TRANSACTION" [] []
doctrine.DEBUG: SELECT t0.id AS id_1, t0.focus AS focus_2, t0.enabled AS enabled_3 FROM focus t0 [] []
request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: "An exception occurred while executing 'SELECT t0.id AS id_1, t0.focus AS focus_2, t0.enabled AS enabled_3 FROM focus t0':  SQLSTATE[HY000]: General error: 1 no such table: focus" at G:\Documents\workspace\found\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractSQLiteDriver.php line 43 {"exception":"[object] (Doctrine\\DBAL\\Exception\\TableNotFoundException(code: 0): An exception occurred while executing 'SELECT t0.id AS id_1, t0.focus AS focus_2, t0.enabled AS enabled_3 FROM focus t0':\n\nSQLSTATE[HY000]: General error: 1 no such table: focus at G:\\Documents\\workspace\\found\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\AbstractSQLiteDriver.php:43, Doctrine\\DBAL\\Driver\\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1 no such table: focus at G:\\Documents\\workspace\\found\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:80, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1 no such table: focus at G:\\Documents\\workspace\\found\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:75)"} []
READ ALSO
how can i limit the returned items into my second object

how can i limit the returned items into my second object

suppose that i have an object Discussions contain many messagesthe question here that i want to return a list discussion with the last message

53
Variable column name php sql select statement [duplicate]

Variable column name php sql select statement [duplicate]

So I am trying to get a specific row and column, but I am having trouble with inserting the variable into the SQL statementThis is what I have right now:

23
Can't send the Get id with the login validation id in header [closed]

Can't send the Get id with the login validation id in header [closed]

Want to improve this question? Update the question so it's on-topic for Stack Overflow

53
How to optimise the array calcuation using loops?

How to optimise the array calcuation using loops?

Hey i have array calculation where i need to refactor this code using loops please suggest

42