File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66use Doctrine \Bundle \FixturesBundle \Fixture ;
77use Doctrine \Bundle \FixturesBundle \FixtureGroupInterface ;
88use Doctrine \Persistence \ObjectManager ;
9- use Symfony \Component \HttpKernel \KernelInterface ;
109
1110class ReportFixtures extends Fixture implements FixtureGroupInterface
1211{
13- public function __construct (protected ReportImporter $ reportImporter, protected KernelInterface $ kernel )
12+ public function __construct (protected ReportImporter $ reportImporter )
1413 {
1514 }
1615
Original file line number Diff line number Diff line change 66use Doctrine \Bundle \FixturesBundle \Fixture ;
77use Doctrine \Bundle \FixturesBundle \FixtureGroupInterface ;
88use Doctrine \Persistence \ObjectManager ;
9- use Symfony \Component \HttpKernel \KernelInterface ;
109
1110class SystemFixtures extends Fixture implements FixtureGroupInterface
1211{
13- public function __construct (protected SystemImporter $ systemImporter, protected KernelInterface $ kernel )
12+ public function __construct (protected SystemImporter $ systemImporter )
1413 {
1514 }
1615
1716 public function load (ObjectManager $ manager ): void
1817 {
19- $ rootPath = $ this ->kernel ->getProjectDir ();
20- $ this ->systemImporter ->import ($ rootPath .'/example_data/systems.json ' );
18+ $ this ->systemImporter ->import (__DIR__ .'/example_data/systems.json ' );
2119 }
2220
2321 public static function getGroups (): array
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 77
88class ReportImporter extends BaseImporter
99{
10- /**
11- * @throws \Exception
12- */
13- public function import (string $ src , ?ProgressBar $ progressBar = null ): void
10+ public function import (string $ src , ?ProgressBar $ progressBar = null ): void
1411 {
1512 $ json = file_get_contents ($ src );
1613 $ entries = json_decode ($ json );
You can’t perform that action at this time.
0 commit comments