{"id":36252473,"url":"https://github.com/organiseyou/nameservice","last_synced_at":"2026-01-11T07:01:46.545Z","repository":{"id":314177684,"uuid":"603724822","full_name":"OrganiseYou/NameService","owner":"OrganiseYou","description":"PHP library for converting internal names","archived":false,"fork":false,"pushed_at":"2025-10-22T09:23:25.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T11:19:56.204Z","etag":null,"topics":["hacktoberfest","library","php"],"latest_commit_sha":null,"homepage":"","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/OrganiseYou.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-19T11:51:59.000Z","updated_at":"2025-10-22T09:20:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a9478a7-c1bb-4406-a324-54fd8ecfb3e6","html_url":"https://github.com/OrganiseYou/NameService","commit_stats":null,"previous_names":["organiseyou/nameservice"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/OrganiseYou/NameService","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrganiseYou%2FNameService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrganiseYou%2FNameService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrganiseYou%2FNameService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrganiseYou%2FNameService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OrganiseYou","download_url":"https://codeload.github.com/OrganiseYou/NameService/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrganiseYou%2FNameService/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hacktoberfest","library","php"],"created_at":"2026-01-11T07:01:46.345Z","updated_at":"2026-01-11T07:01:46.530Z","avatar_url":"https://github.com/OrganiseYou.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Name service\nThis is a library that convert the names that are used in projects.\n\n## Add service to an project\n```\ncomposer req organiseyou/name-service\n```\n\n## Usage\n### Use it the service\n```php\n$service = new Service('organise_you');\n\n$capitals = $service-\u003etoDatabase();\n//where $value is ORGANISE_YOU\n\n$capitals = $service-\u003etoSlug();\n//where $value is organise-you\n\n$capitals = $service-\u003etoPascalCase();\n//where $value is OrganiseYou\n\n$capitals = $service-\u003etoCamelCase();\n//where $value is organiseYou\n```\n\n#### Overwrite the default transformer\nSometimes we need to overwrite the default transformer\n```php\n$service = new Service(\n    'organise-you',\n    fn (string $slug) =\u003e ConvertService::urlToName($slug)\n);\n\n$value = $service-\u003etoDatabase()\n// where $value is ORGANISE_YOU\n```\n### Use the static functions\n#### Convert an name from url to an internal name\n```\n$internalName = Organiseyou\\NameService\\ConvertService::urlToName($name);\n```\n#### Convert an friendly written name to an internal name\n```\n$internalName = Organiseyou\\NameService\\ConvertService::saveConvert($name);\n```\n### Convert an internal name to an url friendly name\n```\n$urlFriendlyName = ConvertService::convertNameToId($internalName);\n```\n### Convert an internal name to a camelcase name\n```\n$camelCase = ConvertService::toCamelCase($internalName);\n```\n\n## Run tests\nTo run the tests, first clone the project to an repository\n```\ngit clone git@github.com:OrganiseYou/NameService.git\n```\nAnd go to the directory\n```\ncd NameService\n```\nRun composer install\n```\nphp ./vendor/bin/phpunit tests\n```\n\n## Upgrade v1 to v2\nI did changed the class name, change the use case from\n```php\nuse Organiseyou\\NameService\\ConvertService;\n```\nto\n```php\nuse Organiseyou\\NameService\\Convert as ConvertService;\n```\nAnd remove ``Organiseyou\\NameService`` and it is backwards compatible.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forganiseyou%2Fnameservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forganiseyou%2Fnameservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forganiseyou%2Fnameservice/lists"}