Closed s-malinowski closed 2 years ago
@Kapustaa Can you please provide your code example to replicate this issue?
`<?php require 'vendor/autoload.php';
// Create a tournament $tournament = new TournamentGenerator\Preset\SingleElimination('Tournament name');
// Set tournament lengths - could be omitted $tournament ->setPlay(7) // SET GAME TIME TO 7 MINUTES ->setGameWait(2) // SET TIME BETWEEN GAMES TO 2 MINUTES ->setRoundWait(0); // SET TIME BETWEEN ROUNDS TO 0 MINUTES
// CREATE 6 TEAMS for ($i = 1; $i <= 6; $i++) { $tournament->team('Team ' . $i); }
// GENERATE ALL GAMES $tournament->generate();
// Simulate games $tournament->genGamesSimulate(); // Simulate only games for example to only save bracket to DB $tournament->genGamesSimulateReal(); // Simulate games with results like a real tournament
// GET ALL TEAMS $teams = $tournament->getTeams(true); // TRUE to get teams ordered by their results`
I have tried this example, but I cannot replicate this error. Is there something else you do with it? What version of the library / PHP are you using?
Got php 7.3.31
That version is no longer supported. I would recommend for you to upgrade to at least PHP 7.4 and download the latest version of the library.
It's working now, thanks
Fatal error: Nesting level too deep - recursive dependency? in \vendor\heroyt\tournament-generator\src\TournamentGenerator\Tournament.php on line 163