{"id":22397157,"url":"https://github.com/putyourlightson/craft-autocomplete","last_synced_at":"2025-07-31T12:31:48.779Z","repository":{"id":57045953,"uuid":"386260490","full_name":"putyourlightson/craft-autocomplete","owner":"putyourlightson","description":"Provides autocompletion for Craft CMS and plugins in Twig templates.","archived":false,"fork":false,"pushed_at":"2021-08-09T16:58:40.000Z","size":37,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"v1","last_synced_at":"2024-11-29T11:07:45.994Z","etag":null,"topics":[],"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/putyourlightson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-07-15T11:09:48.000Z","updated_at":"2023-12-12T02:02:47.000Z","dependencies_parsed_at":"2022-08-24T03:40:21.057Z","dependency_job_id":null,"html_url":"https://github.com/putyourlightson/craft-autocomplete","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/putyourlightson","download_url":"https://codeload.github.com/putyourlightson/craft-autocomplete/tar.gz/refs/heads/v1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228242556,"owners_count":17890481,"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-12-05T06:11:02.906Z","updated_at":"2024-12-05T06:11:03.605Z","avatar_url":"https://github.com/putyourlightson.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Stable Version](https://img.shields.io/packagist/v/putyourlightson/craft-autocomplete?label=stable)]((https://packagist.org/packages/putyourlightson/craft-autocomplete))\n[![Total Downloads](https://img.shields.io/packagist/dt/putyourlightson/craft-autocomplete)](https://packagist.org/packages/putyourlightson/craft-autocomplete)\n\n# Autocomplete for Craft CMS [DEPRECATED]\n\n### ⚠️ This package has been replaced by the superior [Craft Autocomplete](https://github.com/nystudio107/craft-autocomplete) as a collaboration between [PutYourLightsOn](https://putyourlightson.com/) and [nystudio107](https://nystudio107.com/).\n\nProvides autocompletion for Craft CMS and plugins in Twig templates. \n \nCurrently works with **PhpStorm only**, as VSCode does not support intellisense for Twig extensions.\n\nAdapted from `FauxTwigExtension.php` by nystudio107 as documented in the article:  \nhttps://nystudio107.com/blog/auto-complete-craft-cms-3-apis-in-twig-with-phpstorm\n\n![demo](https://user-images.githubusercontent.com/57572400/126911028-7d7d06dd-c60f-42b9-ae42-95d5f078a229.gif)\n\n## Usage\n\nInstall the package using composer.\n\n```\ncomposer require putyourlightson/craft-autocomplete\n```\n\nEnsure that the Symfony plugin is installed and enabled in PhpStorm:  \nhttps://plugins.jetbrains.com/plugin/7219-symfony-plugin\n    \nOnce your IDE indexes the files, autocompletion for Craft and supported plugins will immediately become available in your Twig templates.\n\n![screenshot](https://user-images.githubusercontent.com/57572400/125784167-618830ae-e475-4faf-81d3-194ad7ce3a08.png)\n\n### Adding Custom Variables\n\nYou can add autocompletion for your own custom modules/plugins by creating a file called `AutocompleteVariable.php` and placing it inside any folder that PhpStorm will index (for example in the `/config` directory).\n\n```php\n\u003c?php\n\nuse craft\\web\\twig\\variables\\CraftVariable;\nuse my\\plugin\\variables\\MyVariable;\n\n/**\n * Adds variables to the global Craft Variable.\n *\n * @mixin MyVariable\n */\nclass AutocompleteVariable extends CraftVariable { }\n```\n\n## Contributing\n\nYou can contribute autocompletion for third-party plugins that are available in the plugin store. To do so, copy the `src/putyourlightson` folder and rename it to your GitHub username. Modify the classes accordingly and add a `@mixin` for your variable to the main `AutocompleteVariable` class.\n\nEnsure you follow the structure already in place, test that autocompletion works and submit a pull request.\n\n![screenshot-mixins](https://user-images.githubusercontent.com/57572400/125917480-cf4ca8f8-33ad-4f32-ae19-e05d8cfba7d9.png)\n\n---\n\nCreated by [PutYourLightsOn](https://putyourlightson.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputyourlightson%2Fcraft-autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fputyourlightson%2Fcraft-autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputyourlightson%2Fcraft-autocomplete/lists"}