{"id":20338211,"url":"https://github.com/openclassrooms/akismetbundle","last_synced_at":"2026-03-05T09:33:21.998Z","repository":{"id":33548705,"uuid":"37194891","full_name":"OpenClassrooms/AkismetBundle","owner":"OpenClassrooms","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-20T14:15:16.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-11T23:11:43.170Z","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/OpenClassrooms.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-06-10T12:09:01.000Z","updated_at":"2025-03-20T14:14:55.000Z","dependencies_parsed_at":"2022-08-07T22:01:02.333Z","dependency_job_id":"6a961d5a-c9ab-4c93-80d0-9191fb282fa1","html_url":"https://github.com/OpenClassrooms/AkismetBundle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FAkismetBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FAkismetBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FAkismetBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FAkismetBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenClassrooms","download_url":"https://codeload.github.com/OpenClassrooms/AkismetBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492877,"owners_count":21113163,"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-11-14T21:12:03.158Z","updated_at":"2026-03-05T09:33:21.922Z","avatar_url":"https://github.com/OpenClassrooms.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"AkismetBundle\n-------------\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/243552ac-5d33-4e9c-b05a-186fc6f507ea/mini.png)](https://insight.sensiolabs.com/projects/243552ac-5d33-4e9c-b05a-186fc6f507ea)\n[![Build Status](https://travis-ci.org/OpenClassrooms/AkismetBundle.svg)](https://travis-ci.org/OpenClassrooms/AkismetBundle)\n[![Coverage Status](https://coveralls.io/repos/OpenClassrooms/AkismetBundle/badge.svg?branch=master)](https://coveralls.io/r/OpenClassrooms/AkismetBundle?branch=master)\n\nThe AkismetBundle offers integration of the Akismet Library.\nAkismet Library is a PHP5 library that provides [Akismet Spam Protection service](https://akismet.com/) functionality in your application.\nSee [Akismet](https://github.com/OpenClassrooms/Akismet) for full details.\n\n## Installation\nThis bundle can be installed using composer:\n\n```composer require openclassrooms/akismet-bundle```\n\nor by adding the package to the composer.json file directly:\n\n```json\n{\n    \"require\": {\n        \"openclassrooms/akismet-bundle\": \"*\"\n    }\n}\n```\n\nAfter the package has been installed, add the bundle to the AppKernel.php file:\n```php\n// in AppKernel::registerBundles()\n$bundles = array(\n    // ...\n    new OpenClassrooms\\Bundle\\AkismetBundle\\OpenClassroomsAkismetBundle(),\n    // ...\n);\n```\n\n## Configuration\n```yml\n# app/config/config.yml\n\nopenclassrooms_akismet:\n    key:  %akismet.key%\n    blog: %akismet.blog%\n```\n\n## Usage\n### Default Service\n```php\n$commentBuilder = $container-\u003eget('openclassrooms.akismet.models.comment_builder');\n$akismet = $container-\u003eget('openclassrooms.akismet.services.default_akismet_service');\n\n$comment = $commentBuilder-\u003ecreate()\n                          ...\n                          -\u003ebuild();\n               \nif ($akismet-\u003ecommentCheck($comment)) {\n // store the comment and mark it as spam (in case of a mis-diagnosis).\n} else {\n // store the comment normally\n}\n\n// and\n\n$akismet-\u003esubmitSpam($comment);\n\n// and\n\n$akismet-\u003esubmitHam($comment);\n```\n\n### Bridge Service\nThe Bundle integrates a bridge service which gets the Symfony2 requestStack to automatically set the UserIP, UserAgent and Referrer.\n```xml\n\u003cservice id=\"openclassrooms.akismet.services.akismet_service\" class=\"OpenClassrooms\\Bundle\\AkismetBundle\\Services\\Impl\\AkismetServiceImpl\"\u003e\n    \u003ccall method=\"setAkismet\"\u003e\n        \u003cargument type=\"service\" id=\"openclassrooms.akismet.services.default_akismet_service\"/\u003e\n    \u003c/call\u003e\n    \u003ccall method=\"setRequestStack\"\u003e\n        \u003cargument type=\"service\" id=\"request_stack\"/\u003e\n    \u003c/call\u003e\n\u003c/service\u003e\n```\n\nYou can use it by getting this service id:\n```php\n$akismet = $container-\u003eget('openclassrooms.akismet.services.akismet_service');\n\n```\ninstead of:\n```php\n$akismet = $container-\u003eget('openclassrooms.akismet.services.default_akismet_service');\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclassrooms%2Fakismetbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenclassrooms%2Fakismetbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclassrooms%2Fakismetbundle/lists"}