{"id":22624576,"url":"https://github.com/partikus/symfony-multiple-kernels","last_synced_at":"2026-04-28T17:34:03.282Z","repository":{"id":68296142,"uuid":"90390881","full_name":"partikus/symfony-multiple-kernels","owner":"partikus","description":"Repository presents Symfony project with multiple kernel approach.","archived":false,"fork":false,"pushed_at":"2017-05-06T15:09:08.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T02:05:26.165Z","etag":null,"topics":["kernel","multiple","multiple-kernels","php","symfony"],"latest_commit_sha":null,"homepage":"https://kruczek.it","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/partikus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-05T15:33:07.000Z","updated_at":"2017-05-09T05:07:01.000Z","dependencies_parsed_at":"2023-02-26T01:30:41.144Z","dependency_job_id":null,"html_url":"https://github.com/partikus/symfony-multiple-kernels","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/partikus/symfony-multiple-kernels","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/partikus%2Fsymfony-multiple-kernels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/partikus%2Fsymfony-multiple-kernels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/partikus%2Fsymfony-multiple-kernels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/partikus%2Fsymfony-multiple-kernels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/partikus","download_url":"https://codeload.github.com/partikus/symfony-multiple-kernels/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/partikus%2Fsymfony-multiple-kernels/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32392298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kernel","multiple","multiple-kernels","php","symfony"],"created_at":"2024-12-09T00:16:34.608Z","updated_at":"2026-04-28T17:34:03.266Z","avatar_url":"https://github.com/partikus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Symfony Multiple Kernels\n========================\n\nRepository presents [Symfony](http://symfony.com/doc/current/index.html) project with multiple kernel approach.\n\n## Multiple Kernels\n\nSymfony [Multiple Kernels](http://symfony.com/doc/current/configuration/multiple_kernels.html) allows you create many independent Kernels. Thanks to that you can: manage the bundles you use and separate configuration for every kernel.\n   \n## Introduction\n\nLet's assume your project has two parts:\n\n - `api`\n - `admin`\n\nAnd just only for `admin` version you need to use `Twig` which is useless for `api` part. To achieve this you have to create two instances of `AppKernel`:\n\n- [`ApiKernel`](app/ApiKernel.php)\n- [`AdminKernel`](app/AdminKernel.php)\n\nThose two classes extend from [`AppKernel`](app/AppKernel.php). This way you can get separate bundle list for each kernel.\n    \n## Configs, Sessions, Caches \u0026 Logs\n\nTo separate configuration, sessions, caches and logs you need overwrite `AppKernel.php` methods;\n\n - [`getCacheDir`](app/AppKernel.php#L42)\n - [`getLogDir`](app/AppKernel.php#L47)\n - [`getKernelParameters`](app/AppKernel.php#L52)\n - [`registerContainerConfiguration`](app/AppKernel.php#L62)\n \n\n## New directory structure \n\n### app\n```\napp/\n├── .htaccess\n├── AdminKernel.php\n├── ApiKernel.php\n├── AppCache.php\n├── AppKernel.php\n├── KernelFactory.php\n├── Resources\n│   └── views\n├── autoload.php\n└── config\n    ├── admin\n    └── api\n\n```\n\n### cache\n```\nvar/cache/\n├── .gitkeep\n├── admin\n│   └── dev\n└── api\n    └── dev\n```\n\n### sessions\n\n```\nvar/sessions/\n├── .gitkeep\n├── admin\n│   └── dev\n└── api\n    └── dev\n```\n\n### logs\n\n```\nvar/logs\n├── .gitkeep\n├── admin\n│   ├── dev.log\n│   └── prod.log\n└── api\n    ├── dev.log\n    └── prod.log\n```\n\n## Multiple parameters.yml \n\nSeparate parameters require [custom parameters builder](src/MultipleKernels/Composer/ScriptHandler.php),\nand replacement in [composer.json](composer.json#L45).\n\n## Switch between Multiple App Kernels\n\nThis action can be handle by exporting `APP_NAME` env like `SYMFONY_ENV` or by adding `-a admin` or `--app-name=admin` command's options. e.g. `bin/console --app-name=admin`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpartikus%2Fsymfony-multiple-kernels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpartikus%2Fsymfony-multiple-kernels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpartikus%2Fsymfony-multiple-kernels/lists"}