Nextras ORM generator nefunguje
- MKI-Miro
- Člen | 277
Ahojte
Snazim sa pouzit nextras orm generator ale stale mi to hadze chybu.
PHP 8.2
MariaDB 10.05
Fatal error: Uncaught TypeError: Contributte\Nextras\Orm\Generator\Entity\Column::setDefault():
Argument #1 ($default) must be of type string, null given, called in
\vendor\contributte\nextras-orm-generator\src\Analyser\Database\DatabaseAnalyser.php on line 69
and defined in \vendor\contributte\nextras-orm-generator\src\Entity\Column.php:113
Stack trace: #0 \vendor\contributte\nextras-orm-generator\src\Analyser\Database\DatabaseAnalyser.php(69): Contributte\Nextras\Orm\Generator\Entity\Column->setDefault(NULL) #1 \vendor\contributte\nextras-orm-generator\src\Analyser\Database\DatabaseAnalyser.php(48): Contributte\Nextras\Orm\Generator\Analyser\Database\DatabaseAnalyser->analyseColumns(Object(Contributte\Nextras\Orm\Generator\Entity\Table)) #2 \vendor\contributte\nextras-orm-generator\src\Generator.php(87): Contributte\Nextras\Orm\Generator\Analyser\Database\DatabaseAnalyser->analyse() #3 \www\nextras.php(20): Contributte\Nextras\Orm\Generator\Generator->generate() #4 {main} thrown in \vendor\contributte\nextras-orm-generator\src\Entity\Column.php on line 113
pricom kod vyzera nasledovne
use Contributte\Nextras\Orm\Generator\Analyser\Database\DatabaseAnalyser;
use Contributte\Nextras\Orm\Generator\Config\Impl\TogetherConfig;
use Contributte\Nextras\Orm\Generator\SimpleFactory;
require_once DIR . '../../vendor/autoload.php';
$config = [
'output' => DIR . '/model-nextras',
//other options
];
$factory = new SimpleFactory(
new TogetherConfig($config),
new DatabaseAnalyser('....', '.....', '.....')
);
$factory->create()->generate();
Nechce sa mi verit zeby chyba bol v nextras balicku a tak sa chcem spytat ci nerobim nieco zle?
Dakujem
Editoval MKI-Miro (5. 1. 23:08)
- MKI-Miro
- Člen | 277
Chcem sa opytat je to vporiadku ze to generuje nieco taketo?
/**
* @property string $currency {default } {enum self::_*}
* @property string $issueDate {default } {enum self::_*}
* @property string $dueDate {default } {enum self::_*}
* @property string $invoiceNumber {default } {enum self::_*}
* @property string $chargedServices {default } {enum self::_*}
* @property string $servicesWithVat {default } {enum self::_*}
* @property string $collectedCods {default } {enum self::_*}
* @property string $compensation {default } {enum self::_*}
*/
- vsetko je string
- cakal by som ze to uz bude mat podporu pre PHP8..
vdaka