{"id":13803235,"url":"https://github.com/nfreear/composer-suggest","last_synced_at":"2025-09-19T19:32:16.028Z","repository":{"id":31240430,"uuid":"34801857","full_name":"nfreear/composer-suggest","owner":"nfreear","description":"Composer plugin. Can we find a simple way of installing Composer suggestions?","archived":false,"fork":false,"pushed_at":"2018-07-31T10:33:37.000Z","size":27,"stargazers_count":5,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-09T00:15:42.244Z","etag":null,"topics":["composer-plugin"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/nfreear","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfreear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-29T15:26:46.000Z","updated_at":"2021-03-02T00:35:42.000Z","dependencies_parsed_at":"2022-09-09T03:40:44.161Z","dependency_job_id":null,"html_url":"https://github.com/nfreear/composer-suggest","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfreear%2Fcomposer-suggest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfreear%2Fcomposer-suggest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfreear%2Fcomposer-suggest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfreear%2Fcomposer-suggest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfreear","download_url":"https://codeload.github.com/nfreear/composer-suggest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233589080,"owners_count":18698902,"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":["composer-plugin"],"created_at":"2024-08-04T01:00:26.092Z","updated_at":"2025-09-19T19:32:15.636Z","avatar_url":"https://github.com/nfreear.png","language":"PHP","funding_links":[],"categories":["Plugins"],"sub_categories":["Support"],"readme":"\n[![Build status — Travis-CI][travis-icon]][travis]\n[![Latest Stable Version][packagist-icon]][packagist] [![MIT License][license-icon]][MIT]\n\n# composer-suggest\n\nA [Composer plugin][] to install a custom group of [suggested][] packages, based on keyword patterns. (_[Caution](#caution)_)\n\n\nExample `composer.json`:\n\n```json\n{\n    \"suggest\": {\n      \"a/b\": \"1.0; This package is for [LACE] only\",\n      \"c/d\": \"2.1, This package is for JuxtaLearn and LACE.\",\n      \"e/f\": \"3.2, This is just for [JXL].\",\n      \"g/h\": \"1.0-beta; Experiment-A\"\n    }\n}\n```\n\n\n## Usage\n\n1. Set an environment variable containing a pattern/keywords in a `.env` file,\n    ```bash\n    echo 'NF_COMPOSER_SUGGEST=\"(EXP|LACE)\"' \u003e .env\n    ```\n\n2. Require the plugin,\n    ```\n    composer require nfreear/composer-suggest\n    ```\n\n3. Install as you would normally (verbose),\n    ```\n    composer -vvv install\n    ```\n\n\n## Legacy\n\nIn [Composer script][] mode, an example `composer.json` might contain:\n\n```json\n{\n    \"suggest\": {\n      \"a/b\": \"1.0; This package is for [LACE] only\",\n      \"c/d\": \"2.1, This package is for JuxtaLearn and LACE.\",\n      \"e/f\": \"3.2, This is just for [JXL].\",\n      \"g/h\": \"1.0-beta; Experiment-A\"\n    },\n\n    \"scripts\": {\n      \"dry-run-suggest\": \"\\\\Nfreear\\\\Composer\\\\Suggest::dryRun\",\n      \"install-suggest\": \"\\\\Nfreear\\\\Composer\\\\Suggest::install\",\n      \"install-lace\": \"./vendor/bin/suggest --dry LACE\"\n    }\n}\n```\n\nLegacy usage:\n\n```sh\n\u003e  composer -v install-lace\n```\n\nLegacy advanced usage:\n\n```sh\n\u003e  composer -v dry-run-suggest \"Ju?X(ta)?L\"    # Packages suggested for 'Juxtalearn' \u0026 'JXL'.\n\u003e  composer -v dry-run-suggest \"Experiment-A\"\n```\n\n\n## Test\n\n```sh\ncomposer test\n```\n\n\n## Caution\n\nUse of the `composer-suggest` plugin implies that you probably won't commit `composer.lock` to version control. [Various][] people [say][] this is [bad][], and as a general rule they are probably correct.\n\n[Composer-suggest][] works well when all/most of the dependencies in `require` and `suggest`\nhave precise version constraints (`1.2.3`) as opposed to loose ones (`1.*`, `\u003e= 1.5`..).\nIt is also useful during rapid development phases of a project. See it in use in the [LACE/ OER Research Hub code][ex], and [Open Media Player code][ex-omp]-base.\n\n[_Caveat utilitor!_][beware]\n\n\nDeveloped for the [LACE Evidence Hub][], part of the [Learning Analytics Community Exchange][] project.\n\nInspired by and based in part on the [composer-merge-plugin][] – thank you!\n\n\n---\nLicense: [MIT][]\n\n© 2016 The Open University. ([Institute of Educational Technology][])\n\n\n[packagist]: https://packagist.org/packages/nfreear/composer-suggest\n[packagist-icon]: https://img.shields.io/packagist/v/nfreear/composer-suggest.svg?style=flat\n[license-icon]: https://img.shields.io/packagist/l/nfreear/composer-suggest.svg?style=flat\n[Composer]: https://getcomposer.org/\n[MIT]: http://nfreear.mit-license.org/ \"MIT License\"\n[composer-suggest]: https://github.com/nfreear/composer-suggest\n[Composer plugin]: https://getcomposer.org/doc/articles/plugins.md\n[Composer script]: https://getcomposer.org/doc/articles/scripts.md\n[suggested]: https://getcomposer.org/doc/04-schema.md#suggest\n[Institute of Educational Technology]: http://iet.open.ac.uk/\n[Learning Analytics Community Exchange]: http://www.laceproject.eu \"LACE project\"\n[LACE Evidence Hub]: http://evidence.laceproject.eu/\n[ex]: https://github.com/IET-OU/oer-evidence-hub-org/blob/9801a671d9b3/composer-TEMPLATE.json#L43-L68\n    \"suggest: {..} in composer.json — LACE/ OER Hub code\"\n[ex-omp]: https://github.com/IET-OU/open-media-player/blob/2.x/composer.json#L33-L37\n    \"suggest: {..} in composer.json — Open Media Player\"\n[Various]: https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file\n    \"Composer documentation\"\n[say]: https://blog.engineyard.com/2014/composer-its-all-about-the-lock-file \"Engineyard blog\"\n[bad]: http://stackoverflow.com/questions/12896780/should-composer-lock-be-committed-to-version-c..\n    \"Stackoverflow\"\n[beware]: http://en.wiktionary.org/wiki/caveat_emptor \"'User beware'\"\n[composer-merge-plugin]: https://github.com/wikimedia/composer-merge-plugin\n\n[travis]:  https://travis-ci.org/nfreear/composer-suggest\n[travis-icon]: https://api.travis-ci.org/nfreear/composer-suggest.svg \"Build status – Travis-CI\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfreear%2Fcomposer-suggest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfreear%2Fcomposer-suggest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfreear%2Fcomposer-suggest/lists"}