{"id":15021943,"url":"https://github.com/marvin255/random-string-generator","last_synced_at":"2025-07-14T04:31:29.883Z","repository":{"id":43263728,"uuid":"319099512","full_name":"marvin255/random-string-generator","owner":"marvin255","description":"Random string generator for Symfony","archived":false,"fork":false,"pushed_at":"2024-02-24T21:40:47.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-25T01:20:34.759Z","etag":null,"topics":["php","random-generation","symfony","symfony-bundle"],"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/marvin255.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}},"created_at":"2020-12-06T18:12:15.000Z","updated_at":"2024-06-08T13:59:34.221Z","dependencies_parsed_at":"2023-02-02T20:15:54.214Z","dependency_job_id":"254e5dc5-8b19-4e5b-850f-9174c2974203","html_url":"https://github.com/marvin255/random-string-generator","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"3b8c5c55e69a6fd2f29ad44db8a270d664a4ac31"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin255%2Frandom-string-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin255%2Frandom-string-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin255%2Frandom-string-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin255%2Frandom-string-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marvin255","download_url":"https://codeload.github.com/marvin255/random-string-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225948768,"owners_count":17550172,"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":["php","random-generation","symfony","symfony-bundle"],"created_at":"2024-09-24T19:57:14.738Z","updated_at":"2024-11-22T18:42:28.122Z","avatar_url":"https://github.com/marvin255.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Random string generator for Symfony\n===================================\n\n[![Latest Stable Version](https://poser.pugx.org/marvin255/random-string-generator/v)](https://packagist.org/packages/marvin255/random-string-generator)\n[![Total Downloads](https://poser.pugx.org/marvin255/random-string-generator/downloads)](https://packagist.org/packages/marvin255/random-string-generator)\n[![License](https://poser.pugx.org/marvin255/random-string-generator/license)](https://packagist.org/packages/marvin255/random-string-generator)\n[![Build Status](https://github.com/marvin255/random-string-generator/workflows/random_string_generator/badge.svg)](https://github.com/marvin255/random-string-generator/actions?query=workflow%3A%22random_string_generator%22)\n\nInstallation\n------------\n\nInstall package via composer:\n\n```bash\ncomposer req marvin255/random-string-generator\n```\n\nIt will be configured automatically.\n\n\nUsage\n-----\n\nInject the generator to a service or a controller via DI:\n\n```php\nuse Marvin255\\RandomStringGenerator\\Generator\\RandomStringGenerator;\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\n\nclass SiteController extends AbstractController\n{\n    public function __construct(private readonly RandomStringGenerator $randomStringGenerator)\n    {\n    }\n}\n```\n\nUse one of the generators methods:\n\n```php\n$this-\u003erandomStringGenerator-\u003ealphanumeric(10);  // 10 symbols of latin alphabet or digits\n$this-\u003erandomStringGenerator-\u003ealpha(10);         // 10 symbols of latin alphabet\n$this-\u003erandomStringGenerator-\u003enumeric(10);       // 10 symbols of digits\n$this-\u003erandomStringGenerator-\u003epassword(10);      // 10 symbols that can be used as password\n$this-\u003erandomStringGenerator-\u003estring(10, 'qwe'); // 10 symbols of provided vocabulary\n```\n\n\nMock strings for testing\n------------------------\n\nBundle can be configured to return a mock string in the test environment.\n\n```yaml\n# config/packages/test/marvin255_random_string_generator.yaml\nmarvin255_random_string_generator:\n    dummy: true\n    dummy_string: mock_string\n```\n\nAll methods calls will return `mock_string`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvin255%2Frandom-string-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarvin255%2Frandom-string-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvin255%2Frandom-string-generator/lists"}