FriendsOfSymfony1 / doctrine1

[DEPRECATED -- Use Doctrine2 instead] Doctrine 1 Object Relational Mapper.
http://www.doctrine-project.org
GNU Lesser General Public License v2.1
40 stars 75 forks source link

fix(Table): support for index declared with single field as string #133

Open alquerci opened 6 months ago

alquerci commented 6 months ago

fixes #132

alquerci commented 6 months ago

On PHP 7.4 a fatal error occured

Fatal error: Uncaught TypeError: Argument 1 passed to Doctrine_Export_Sqlite::getIndexFieldDeclarationList() must be of the type array, string given, called in /app/lib/Doctrine/Export/Sqlite.php on line 122 and defined in /app/lib/Doctrine/Export/Sqlite.php:134
Stack trace:
#0 /app/lib/Doctrine/Export/Sqlite.php(122): Doctrine_Export_Sqlite->getIndexFieldDeclarationList('some_column_nam...')
#1 /app/lib/Doctrine/Export/Sqlite.php(232): Doctrine_Export_Sqlite->createIndexSql('index_declared_...', 'single_field_in...', Array)
#2 /app/lib/Doctrine/Export.php(1263): Doctrine_Export_Sqlite->createTableSql('index_declared_...', Array, Array)
#3 /app/lib/Doctrine/Export.php(1120): Doctrine_Export->exportClassesSql(Array)
#4 /app/lib/Doctrine/Export.php(1205): Doctrine_Export->exportSortedClassesSql(Array)
#5 /app/tests/DoctrineTest/Doctrine_UnitTestCase.php(229): Doctrine_Export->exportClasses(Array)
#6 /app/tests/Table/IndexesUsingSingleFieldStringTestCase.php(9): Doctrine_UnitTestCase->prepareTables()
#7 /app/tests/DoctrineTe in /app/lib/Doctrine/Export/Sqlite.php on line 134