{"id":16225733,"url":"https://github.com/macfja/symfony-console-filechooser","last_synced_at":"2025-03-19T12:31:05.118Z","repository":{"id":29538303,"uuid":"33077276","full_name":"MacFJA/Symfony-Console-Filechooser","owner":"MacFJA","description":"Filechooser Helper for Symfony console (with autocompletion support)","archived":false,"fork":false,"pushed_at":"2018-10-21T12:15:52.000Z","size":11,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T21:49:01.137Z","etag":null,"topics":["autocomplete","autocompletion","chooser","console","file","filesystem","interactive","symfony"],"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/MacFJA.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":"2015-03-29T15:04:00.000Z","updated_at":"2023-12-01T07:33:17.000Z","dependencies_parsed_at":"2022-09-22T05:29:00.816Z","dependency_job_id":null,"html_url":"https://github.com/MacFJA/Symfony-Console-Filechooser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FSymfony-Console-Filechooser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FSymfony-Console-Filechooser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FSymfony-Console-Filechooser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FSymfony-Console-Filechooser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacFJA","download_url":"https://codeload.github.com/MacFJA/Symfony-Console-Filechooser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989576,"owners_count":20379648,"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":["autocomplete","autocompletion","chooser","console","file","filesystem","interactive","symfony"],"created_at":"2024-10-10T12:46:03.776Z","updated_at":"2025-03-19T12:31:04.893Z","avatar_url":"https://github.com/MacFJA.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"File chooser\n============\n\nThe library provide a file selector capacity to any symfony console application.\nIt's support autocomplete functionality for navigating in directory.\n\nInstallation\n------------\n\n### Composer\n\n```sh\ncomposer require macfja/symfony-console-filechooser\n```\n\n### Usage\n\n```php\nuse MacFJA\\Symfony\\Console\\Filechooser\\FilechooserHelper;\nuse Symfony\\Component\\Console\\Application;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\n$app = new Application();\n\n// Adding the helper to Symfony Console Application\n$app-\u003egetHelperSet()-\u003eset(new FilechooserHelper());\n\n$app-\u003eregister('ask-path')-\u003esetCode(function (InputInterface $input, OutputInterface $output) use ($app) {\n    // ask and validate the answer\n    $dialog = $app-\u003egetHelperSet()-\u003eget('filechooser');\n    $filter = new \\MacFJA\\Symfony\\Console\\Filechooser\\FileFilter('Where is your file? ');\n    $path = $dialog-\u003eask($input, $output, $filter);\n    $output-\u003ewriteln(sprintf('You have just entered: %s', $path));\n});\n\n$app-\u003erun();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacfja%2Fsymfony-console-filechooser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacfja%2Fsymfony-console-filechooser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacfja%2Fsymfony-console-filechooser/lists"}