{"id":17857184,"url":"https://github.com/caferrari/cafdoctrineoperationslogger","last_synced_at":"2025-04-02T18:21:48.816Z","repository":{"id":16619159,"uuid":"19374101","full_name":"caferrari/CafDoctrineOperationsLogger","owner":"caferrari","description":"ZF2 Module that logs doctrine operations (CRUD)","archived":false,"fork":false,"pushed_at":"2014-05-16T14:48:03.000Z","size":152,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T08:47:36.588Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caferrari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-02T12:03:46.000Z","updated_at":"2016-02-26T11:46:33.000Z","dependencies_parsed_at":"2022-09-24T08:54:08.413Z","dependency_job_id":null,"html_url":"https://github.com/caferrari/CafDoctrineOperationsLogger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FCafDoctrineOperationsLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FCafDoctrineOperationsLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FCafDoctrineOperationsLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FCafDoctrineOperationsLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caferrari","download_url":"https://codeload.github.com/caferrari/CafDoctrineOperationsLogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866198,"owners_count":20846525,"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-28T03:11:48.578Z","updated_at":"2025-04-02T18:21:48.765Z","avatar_url":"https://github.com/caferrari.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doctrine Entity Logger\n\nThis module have the responsability to log Doctrine Operations on Entities like Insert, Update and Delete\n\nTo enable the module, just copy the dist configuration to your config/autoload directory and edit the configurations as you like\n\n```bash\ncp vendor/caferrari/caf-doctrine-logger/config/module.config.php.dist config/autoload/doctrine_logger.global.php\n```\n\nAfter that, add the module to your 'config/application.config.php'\n\n```php\n\u003c?php\n// ...\n'modules' =\u003e array(\n    // ...\n    'CafDoctrineLogger'\n)\n```\n\nTo enable the logging on your entities, just implement the interface `CafDoctrineLogger\\Loggable`:\n\n```php\n\u003c?php\n\nnamespace Application\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse CafDoctrineLogger\\Loggable;\n\n/**\n * @ORM\\Entity\n * @ORM\\Table(name=\"category\")\n * @ORM\\HasLifecycleCallbacks\n */\nclass Category implements Loggable\n{\n\n    /**\n     * @ORM\\Id\n     * @ORM\\Column(type=\"integer\")\n     * @ORM\\GeneratedValue\n     */\n    protected $id;\n\n    /**\n     * @ORM\\Column(type=\"string\", length=50, nullable=false)\n     */\n    protected $name;\n\n    public function toArray()\n    {\n        return [\n            'id' =\u003e $this-\u003eid,\n            'name' =\u003e $this-\u003ename\n        ];\n    }\n}\n```\n\nMake sure that the php has permissions to write in the query log directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaferrari%2Fcafdoctrineoperationslogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaferrari%2Fcafdoctrineoperationslogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaferrari%2Fcafdoctrineoperationslogger/lists"}