{"id":15478453,"url":"https://github.com/creativestyle/symfony-vagrant-kernel","last_synced_at":"2026-05-13T12:46:34.916Z","repository":{"id":21445453,"uuid":"24763802","full_name":"creativestyle/symfony-vagrant-kernel","owner":"creativestyle","description":null,"archived":false,"fork":false,"pushed_at":"2014-10-06T09:33:25.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-08T22:49:05.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/creativestyle.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}},"created_at":"2014-10-03T15:36:59.000Z","updated_at":"2018-11-21T07:03:14.000Z","dependencies_parsed_at":"2022-08-05T12:15:28.575Z","dependency_job_id":null,"html_url":"https://github.com/creativestyle/symfony-vagrant-kernel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fsymfony-vagrant-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fsymfony-vagrant-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fsymfony-vagrant-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fsymfony-vagrant-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativestyle","download_url":"https://codeload.github.com/creativestyle/symfony-vagrant-kernel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246042013,"owners_count":20714147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-02T04:04:26.902Z","updated_at":"2025-10-27T02:15:03.048Z","avatar_url":"https://github.com/creativestyle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Symfony Vagrant Kernel\n======================\n\nThis package can speed up your Symfony dev installation when you're using Vagrant.\n\nIf your application is residing on your host os' drive and it's shared with Vagrant box over network then symfony\ncache and logs IO will kill your performance. This kernel extension configures your application to store cache\nand logs in /dev/shm.\n\nThe only drawback I can think of is that the whole cache (possible including sessions) will be lost once you\npower down the Vagrant box. Oh, and /dev/shm was probably designed for sharing...\n\nWARNING! This is not for production. Use at your own risk!\nWARNING! The logs will be in /dev/shm/(symfony2|projectname)/logs.\n\n## Installation\n\nAdd  `\"cs/symfony-vagrant-kernel\": \"1.0\",` to your `composer.json`.\n\nChange the line `use Symfony\\Component\\HttpKernel\\Kernel;` to `use CS\\Vagrant\\Kernel;` in your `app/AppKernel.php`.\n\n### Multiple projects on the same Vagrant box\n\nIf you have multiple projects running on the same vagrant box then you should define your \"project name\" which is\nbasically the name of `/dev/shm` subdirectory which will be used to store your cache. If you don't do this then\nprepare for chaos to ensue.\n\nOverride the method `getProjectName`, so it looks sth like this:\n\n```php\nprotected function getProjectName()\n{\n    return 'some_unique_string_preferably_the_name_of_your_project';\n}\n```\n\n### Configure when to attempt to use the memory cache.\n\nBy default the kernel will enable `/dev/shm` caching when following conditions are met:\n* You have a writable `/dev/shm` directory.\n* `/home/vagrant` exists in your filesystem.\n\nYou can change the last condition by overriding the method `useMemoryCaching` in your kernel.\nFor example if you want this feature to be used always in your dev environment do sth like this:\n\n```php\nprotected function useMemoryCaching()\n{\n    return $this-\u003egetEnvironment() === 'dev';\n}\n```\n\n## Other considerations\n\nI suppose you could use `/tmp` but doesn't memory cache sound better?\n\n## Acknowledgment\n\nThis code is based on the idea presented by [Benjamin Eberlei](http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html) and later expanded by [Jakub Kanclerz](https://gist.github.com/jkanclerz/d97bc7fd7e395688240a).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativestyle%2Fsymfony-vagrant-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativestyle%2Fsymfony-vagrant-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativestyle%2Fsymfony-vagrant-kernel/lists"}