propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 393 forks source link

FATAL ERROR: Class "Propel\Runtime\Propel\Runtime\Map\TableMap" not found in Collection.php #1918

Closed jaredkail closed 1 year ago

jaredkail commented 1 year ago

// $bookmarkedMatches is type Propel\Runtime\Collection\Collection When I call $bookmarkedMatches->toArray() I get the following error:

` FATAL ERROR: Class "Propel\Runtime\Propel\Runtime\Map\TableMap" not found D:\cmp\ct\htdocs\app\v1\lib\vendor\propel\propel\src\Propel\Runtime\Collection\Collection.php : 632 Full Trace:

0 D:\cmp\ct\htdocs\app\v1\actions\BaseAction.php(92): Propel\Runtime\Collection\Collection->__call('toArray', Array)

` ...

In testing Collection.php, if I change the original line:

$keyType = $params[2] ?? Propel\Runtime\Map\TableMap::TYPE_PHPNAME;

to:

$keyType = $params[2] ?? TableMap::TYPE_PHPNAME;

The method works.

jaredkail commented 1 year ago

Please ignore; a copy/paste operation went wild.