{"id":15167219,"url":"https://github.com/o2ps/morozko","last_synced_at":"2026-02-20T17:31:04.840Z","repository":{"id":57031927,"uuid":"115942660","full_name":"o2ps/Morozko","owner":"o2ps","description":"Cache warmup library for Nette Framework","archived":false,"fork":false,"pushed_at":"2018-07-26T09:18:17.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T03:14:13.705Z","etag":null,"topics":["cache","nette-framework","warmup"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/o2ps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-01T19:40:41.000Z","updated_at":"2018-07-26T09:18:18.000Z","dependencies_parsed_at":"2022-08-24T05:40:43.162Z","dependency_job_id":null,"html_url":"https://github.com/o2ps/Morozko","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2ps%2FMorozko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2ps%2FMorozko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2ps%2FMorozko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2ps%2FMorozko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/o2ps","download_url":"https://codeload.github.com/o2ps/Morozko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008598,"owners_count":21032554,"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":["cache","nette-framework","warmup"],"created_at":"2024-09-27T05:41:48.627Z","updated_at":"2025-10-17T02:43:42.970Z","avatar_url":"https://github.com/o2ps.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oops/Morozko\n\n:warning: **THIS PACKAGE IS NO LONGER MAINTAINED.** You can use the AdvancedCache module from [contributte/console-extra](https://github.com/contributte/console-extra) instead.\n\n[![Build Status](https://img.shields.io/travis/o2ps/Morozko.svg)](https://travis-ci.org/o2ps/Morozko)\n[![Downloads this Month](https://img.shields.io/packagist/dm/oops/morozko.svg)](https://packagist.org/packages/oops/morozko)\n[![Latest stable](https://img.shields.io/packagist/v/oops/morozko.svg)](https://packagist.org/packages/oops/morozko)\n\n![Morozko, the impersonation of frost from a 1964 Soviet movie](morozko.jpg)\n\n\u003e Are you warm yet, my little application?\n\nMorozko is a utility for cache warmup in a Nette Framework application.\n\n\n## Installation and requirements\n\n```bash\n$ composer require oops/morozko\n```\n\nOops/Morozko requires PHP \u003e= 7.1.\n\nOops/Morozko provides a Symfony/Console command, thus, **you must also install and configure a Symfony/Console integration package** such as [Kdyby/Console](https://github.com/Kdyby/Console) or [contributte/console](https://github.com/contributte/console).\n\n\n## Usage\n\nRegister the extension in your config file. Don't forget to register a Symfony/Console integration as well:\n\n```yaml\nextensions:\n    morozko: Oops\\Morozko\\DI\\MorozkoExtension\n    console: Kdyby\\Console\\DI\\ConsoleExtension\n```\n\nThen you can directly run the `oops:morozko:warmup` command, or add it to your deploy process.\n\n\n### Default cache warmers\n\nBy default, the `oops:morozko:warmup` command executes one default cache warmer: the `NetteConfiguratorCacheWarmer`, which compiles the DI container.\n\nTo be able to do so, it needs to know how your DI container is configured - you need to provide it with an implementation of `ConfiguratorFactoryInterface` whose `create()` method should return the same `Configurator` as in your application's `bootstrap.php`. Actually, it might be wise to use the implementation in `bootstrap.php` to prevent code duplication.\n\n```php\n\u003c?php\nnamespace My\\Application;\n\nuse Nette\\Configurator;\nuse Oops\\Morozko\\CacheWarmers\\NetteConfiguratorCacheWarmer\\ConfiguratorFactoryInterface;\n\nfinal class ConfiguratorFactory implements ConfiguratorFactoryInterface\n{\n    public function create(): Configurator\n    {\n        $configurator = new Configurator();\n        // ... configure application ...\n        return $configurator;\n    }\n}\n```\n\n```yaml\nmorozko:\n    configuratorFactory: My\\Application\\ConfiguratorFactory\n```\n\n\n**Be aware that in CLI the `%wwwDir%` and `%appDir%` parameters might not actually point to the document root.** For example, if you run console commands via `bin/console.php`, it will likely point to the `bin` directory.\nIf that is your case, you need to set the parameters to the correct values in your configurator factory, otherwise the generated DI container won't match the one actually used in production:\n\n```php\n\u003c?php\n$configurator = new Nette\\Configurator();\n$configurator-\u003eaddParameters([\n    'appDir' =\u003e __DIR__,\n    'wwwDir' =\u003e __DIR__ . '/../www',    \n]);\n\n// ...\n```\n\n\n### Additional cache warmers\n\nThere are currently these official additions to the Morozko's DI container cache warmer:\n\n- [`oops/morozko-latte-bridge`](https://github.com/o2ps/MorozkoLatteBridge) pre-compiles all Latte templates found within a configured directory.\n- [`oops/morozko-doctrine-bridge`](https://github.com/o2ps/MorozkoDoctrineBridge) warms up Doctrine metadata cache and generates entity proxies.\n\n\n### Custom cache warmers\n\nYou can also create your own cache warmers. Simply create a class implementing the `Oops\\Morozko\\CacheWarmer` interface and register it as a service into the DI container.\n\n\n### Third-party cache warmers\n\nIf you have a cache warmer that you'd like to share with others, feel free to add it to this section via a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2ps%2Fmorozko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fo2ps%2Fmorozko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2ps%2Fmorozko/lists"}