{"id":22814431,"url":"https://github.com/68publishers/doctrine-sluggable","last_synced_at":"2025-07-20T19:33:30.582Z","repository":{"id":56938519,"uuid":"211937321","full_name":"68publishers/doctrine-sluggable","owner":"68publishers","description":":abc: Doctrine Sluggable extension","archived":false,"fork":false,"pushed_at":"2023-01-06T00:16:22.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-03T20:06:32.036Z","etag":null,"topics":["doctrine","sluggable"],"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/68publishers.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":"2019-09-30T19:18:55.000Z","updated_at":"2021-11-14T00:42:28.000Z","dependencies_parsed_at":"2023-02-05T00:17:32.065Z","dependency_job_id":null,"html_url":"https://github.com/68publishers/doctrine-sluggable","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/68publishers/doctrine-sluggable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fdoctrine-sluggable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fdoctrine-sluggable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fdoctrine-sluggable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fdoctrine-sluggable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/68publishers","download_url":"https://codeload.github.com/68publishers/doctrine-sluggable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fdoctrine-sluggable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266187255,"owners_count":23889949,"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":["doctrine","sluggable"],"created_at":"2024-12-12T13:08:53.106Z","updated_at":"2025-07-20T19:33:30.560Z","avatar_url":"https://github.com/68publishers.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e :warning: Warning! This package does not have active support, it exists only for the historical needs of the author.\n\n# Doctrine Sluggable\n\n:abc: Doctrine Sluggable extension! \n\nSimple usage and integration into [Nette Framework](https://github.com/nette).\n\n## Installation\n\nThe best way to install `68publishers/doctrine-sluggable` is using Composer:\n\n```bash\n$ composer require 68publishers/doctrine-sluggable\n```\n\nthen register `SluggableEventSubscriber` into `EventManager` like this:\n\n```php\n\u003c?php\n\n/** @var Doctrine\\ORM\\EntityManager $em */\n/** @var Doctrine\\Common\\Annotations\\Reader $reader */\n\n$subscriber = new SixtyEightPublishers\\DoctrineSluggable\\SluggableEventSubscriber(\n\tnew SixtyEightPublishers\\DoctrineSluggable\\DefinitionStorage\\AnnotationSluggableDefinitionStorage($reader)\n);\n\n$em-\u003egetEventManager()-\u003eaddEventSubscriber($subscriber);\n```\n\nbut you'd better use compiler extension if you are using `Nette` Framework:\n\n```yaml\nextensions:\n    sluggable: SixtyEightPublishers\\DoctrineSluggable\\Bridge\\Nette\\SluggableExtension\n```\n\n## Usage\n\nExample entity:\n\n```php\n\u003c?php\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse SixtyEightPublishers\\DoctrineSluggable\\Annotation as Sluggable;\n\n/**\n * @ORM\\Entity\n */\nclass Product {\n\t/**\n\t * @ORM\\Column(type=\"string\", length=255)\n\t *\n\t * @var string\n\t */\n\tprivate $name;\n\n\t/**\n\t * @ORM\\ManyToOne(targetEntity=\"Category\")\n\t *\n\t * @var Category\n\t */\n\tprivate $category;\n\n\t/**\n\t * @Sluggable\\Slug(\n\t *      strategy=\"SixtyEightPublishers\\DoctrineSluggable\\Strategy\\GenerateOnInsertStrategy\",\n\t *      strategyOptions={\n\t *            \"fields\": {\"name\"}, \n\t *            \"checkOnUpdate\": true\n\t *      },\n\t *      finder=\"SixtyEightPublishers\\DoctrineSluggable\\Finder\\FieldBasedSimilarSlugFinder\",\n\t *      finderOptions={\n\t *            \"field\": \"category\", \n\t *            \"type\": \"outer\"\n\t *      },\n\t *      transliterator=\"SixtyEightPublishers\\DoctrineSluggable\\Transliterator\\CamelCaseTransliterator\"\n\t * )\n\t * @ORM\\Column(type=\"string\", length=255)\n\t *\n\t * @var string\n\t */\n\tprivate $slug;\n\n\t/**\n\t * @return string\n\t */\n\tpublic function getSlug() : string\n\t{\n\t\t# slug is generated on EntityManager's onFlush event\n\t\tif (NULL === $this-\u003eslug) {\n\t\t\tthrow new RuntimeException('Slug is not set.');\n\t\t}\n\n\t\treturn $this-\u003eslug;\n\t}\n}\n```\n\n## Options\n\n@todo\n\n## Contributing\n\nBefore committing any changes, don't forget to run\n\n```bash\n$ vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run\n```\n\nand\n\n```bash\n$ vendor/bin/tester ./tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F68publishers%2Fdoctrine-sluggable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F68publishers%2Fdoctrine-sluggable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F68publishers%2Fdoctrine-sluggable/lists"}