Is new TableName() still supported?

In previous PHPMaker versions, I was able to create an instance of a generated table class directly, for example:

$table = new TableName();

$rsnew = [
    "Field1" => "value1",
    "Field2" => "value2"
];

$result = $table->Insert($rsnew);

In PHPMaker 2026,

$table = new TableName();

causes an error such as:

Too few arguments to function TableName::__construct(),
0 passed and exactly 6 expected

How can I use the generated PHPMaker 2026 table class rather than writing raw SQL directly.

No, don't use <TableName>() anymore, you should use entity instead, read Doctrine ORM.

Thanks. I understand that in PHPMaker 2026 I should use the Doctrine entity/repository, for example:

$table = EntityManager()->getRepository(
    Db\Entity\User::class
);

However, what I am trying to understand is how to use the PHPMaker generated table methods from a Custom File.

For example, in the generated table class, PHPMaker 2026 still has methods such as:

$this->insert($data);

or:

public function insert(array $data, array $types = []): int|string

Previously I could do something like:

$table = new User();

$result = $table->Insert([
    "Field1" => "Value1",
    "Field2" => "Value2"
]);

With Doctrine repository:

$table = EntityManager()->getRepository(
    Db\Entity\User::class
);

this does not work:

$table->Insert($rs);

because the repository does not have the PHPMaker table insert() method.

So my question is:

If the generated PHPMaker 2026 table class still contains insert(), update(), etc., what is the correct way to obtain that generated table object from a Custom File?

for example:

$table->insert($rs);

You may read Global Functions -> Container(). You can use the, e.g. Container("MyTableName"). However, note that the insert() function signature is:

    /**
     * Inserts a table row with specified data
     *
     * Table expression and columns are not escaped and are not safe for user-input.
     *
     * @param array<string, mixed> $data (unquoted column name as key)
     * @param array<string, ParameterType> $types (quoted column name as key)
     *
     * @return int|numeric-string The number of affected rows.
     *
     * @throws Exception
     */
    public function insert(array $data, array $types = []): int|string

You may need to pass the parameter type for some fields if the data your provided needs conversion. It is much better (safer and easier) to use entity. As explained in Doctrine ORM, you simply do:

$entity = new Entity\MyTable; // See note below
$entity->setField1('value1');
$entity->setField2('value2');
$em = EntityManager(); // Get EntityManager of the main database (assume `MyTable` is from main database)
// $em->persist($user); // Optional for insert
$em->flush();

Note: The entity class name is basically the singular form of the table name in Pascal case, e.g. if the table name is "Users", then the entity class name is User . If the table name cannot be singularized, the original table name will be used.