diff --git a/DependencyInjection/KimaiHeatmapExtension.php b/DependencyInjection/KimaiHeatmapExtension.php new file mode 100644 index 0000000..f68dedf --- /dev/null +++ b/DependencyInjection/KimaiHeatmapExtension.php @@ -0,0 +1,17 @@ +load('services.yaml'); + } +} diff --git a/Resources/config/services.yaml b/Resources/config/services.yaml new file mode 100644 index 0000000..123293a --- /dev/null +++ b/Resources/config/services.yaml @@ -0,0 +1,3 @@ +services: + KimaiPlugin\KimaiHeatmapBundle\KimaiHeatmapBundle: + tags: ['App\Plugin\PluginInterface'] diff --git a/dev/setup.sh b/dev/setup.sh index 85a3cf5..847369e 100755 --- a/dev/setup.sh +++ b/dev/setup.sh @@ -61,7 +61,22 @@ echo "==> Symlinking plugin..." mkdir -p var/plugins ln -sfn "$PROJECT_DIR" var/plugins/KimaiHeatmapBundle -# Step 9: Clear cache +# Step 9: Exclude recursive symlink from autoloader classmap +# The plugin symlink points to project root which contains dev/kimai/ creating a loop. +# Tell Composer to skip scanning the dev/ directory inside the plugin symlink. +cd "$KIMAI_DIR" +php -r ' +$f = "composer.json"; +$j = json_decode(file_get_contents($f), true); +$exclude = "var/plugins/KimaiHeatmapBundle/dev/"; +if (!in_array($exclude, $j["autoload"]["exclude-from-classmap"] ?? [])) { + $j["autoload"]["exclude-from-classmap"][] = $exclude; + file_put_contents($f, json_encode($j, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n"); +} +' +composer dump-autoload + +# Step 10: Clear cache bin/console cache:clear # Stop MariaDB diff --git a/flake.nix b/flake.nix index 915666d..2dda84b 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ pkgs = nixpkgs.legacyPackages.${system}; php = pkgs.php82.buildEnv { extensions = { enabled, all }: enabled ++ (with all; [ xsl pdo_mysql ]); - extraConfig = "memory_limit = 512M"; + extraConfig = "memory_limit = 1G"; }; in {