{"id":13803492,"url":"https://github.com/narrowspark/automatic","last_synced_at":"2025-10-03T23:32:33.910Z","repository":{"id":44838566,"uuid":"127812199","full_name":"narrowspark/automatic","owner":"narrowspark","description":":microscope: Composer plugin to automate the most common tasks of applications.","archived":true,"fork":false,"pushed_at":"2023-01-04T23:11:44.000Z","size":1296,"stargazers_count":12,"open_issues_count":33,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-17T01:12:04.844Z","etag":null,"topics":["automatic","composer-installer","composer-plugin","configurator","discovery","narrowspark","narrowspark-automatic","php","php73","php74","script-executor","skeletons"],"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/narrowspark.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"prisis"}},"created_at":"2018-04-02T21:03:22.000Z","updated_at":"2023-03-01T10:25:45.000Z","dependencies_parsed_at":"2023-02-02T23:30:46.692Z","dependency_job_id":null,"html_url":"https://github.com/narrowspark/automatic","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fautomatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fautomatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fautomatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fautomatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narrowspark","download_url":"https://codeload.github.com/narrowspark/automatic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235204448,"owners_count":18952326,"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":["automatic","composer-installer","composer-plugin","configurator","discovery","narrowspark","narrowspark-automatic","php","php73","php74","script-executor","skeletons"],"created_at":"2024-08-04T01:00:33.794Z","updated_at":"2025-10-03T23:32:28.568Z","avatar_url":"https://github.com/narrowspark.png","language":"PHP","funding_links":["https://github.com/sponsors/prisis"],"categories":["Plugins"],"sub_categories":["Support"],"readme":"\u003ch1 align=\"center\"\u003eNarrowspark Automatic\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/narrowspark/automatic/releases\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/narrowspark/automatic.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://php.net/\"\u003e\u003cimg src=\"https://img.shields.io/badge/php-%5E7.3.0-8892BF.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/narrowspark/automatic\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/narrowspark/automatic/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/style-level%207-brightgreen.svg?style=flat-square\u0026label=phpstan\"\u003e\u003c/a\u003e\n    \u003ca href=\"http://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nNarrowspark Automatic automates the most common tasks of applications, like installing and removing bundles or providers, copying files, boosting dependencies downloads, creating skeletons and other Composer dependencies based configurations.\n\n## How Does Narrowspark Automatic Work\n\nNarrowspark Automatic is a Composer plugin that modifies the behavior of the `require`, `update`, `create project`, and `remove` commands.\nWhen installing or removing dependencies in an Automatic extended app, your Application can perform tasks before and after the execution of Composer tasks.\n\nConsider the following example:\n\n```bash\ncd your-project\ncomposer require viserio/console\n```\n\nIf you execute this command in your Application that doesn’t support Narrowspark Automatic, this command will execute in the normal composer require behavior.\n\n\u003e **Note** The `automatic.json` and composer.json extra key `automatic` are used to configure Narrowspark Automatic with configurators, script executors, custom-configurators, and more.\n\nWhen Narrowspark Automatic is installed in your Application, it will check if a `automatic.json` file or a composer.json extra key with `automatic` exists.\nIn the above example, Automatic decided which automated tasks need to be run after the installation.\n\n\u003e **Note** Narrowspark Automatic keeps tracks of the configuration, in a `automatic.lock` file, which must be committed to your code repository.\n\n## Using Narrowspark Automatic in New Applications\n\nInclude Narrowspark Automatic as a required dependency to your app with this command:\n`composer require narrospark/automatic`.\n\n## Using Narrowspark Automatic for Skeleton Application\n\nNarrowspark Automatic supports skeleton generation. For example this is your `composer.json` file:\n\n```json\n{\n    \"type\": \"project\",\n    \"license\": \"MIT\",\n    \"require\": {\n        \"php\": \"^7.2\",\n        \"ext-mbstring\": \"*\",\n        \"narrowspark/automatic\": \"^0.3.5\",\n        \"narrowspark/skeleton-generators\": \"^0.1.0\"\n    },\n    \"extra\": {\n        \"app-dir\": \"app\",\n        \"config-dir\": \"config\",\n        \"database-dir\": \"database\",\n        \"public-dir\": \"public\",\n        \"resources-dir\": \"resources\",\n        \"routes-dir\": \"routes\",\n        \"storage-dir\": \"storage\",\n        \"tests-dir\": \"tests\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"App\\\\\": \"app/\"\n        },\n        \"exclude-from-classmap\": [\n            \"tests/\"\n        ]\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"App\\\\Tests\\\\\": \"tests/\"\n        }\n    },\n    \"minimum-stability\": \"dev\",\n    \"prefer-stable\": true\n}\n```\n\nAutomatic search all packages for the package type: `automatic-skeleton`.\nIf packages are found with this type, all skeletons will be saved in the `automatic.lock` for the runtime.\n\nThis means you can execute the following command: `composer create-project your/project` to create an Automatic extended app, Automatic will ask which skeleton can be generated for your app.\n\nRead the [skeleton documentation](docs/SKELETON.md) to learn everything about how to create skeletons for your own app.\n\nNarrowspark Automatic tasks are defined in a `automatic.json` file or in the composer extra key `automatic` and can contain any number of other files and directories. For example, this is the `automatic.json` for `viserio/console`:\n\n```json\n{\n    \"configurators\": {\n        \"providers\": {\n            \"Viserio\\\\Component\\\\Console\\\\Provider\\\\ConsoleServiceProvider\": [\"global\"],\n            \"Viserio\\\\Component\\\\Console\\\\Provider\\\\LazilyCommandsServiceProvider\": [\"global\"]\n        },\n        \"proxies\": {\n            \"Viserio\\\\Component\\\\Console\\\\Proxy\\\\Console\": [\"global\"]\n        }\n    },\n    \"script-extenders\": [\n        \"Viserio\\\\Component\\\\Console\\\\Automatic\\\\CerebroScriptExtender\"\n    ]\n}\n```\n\nThe `providers` and `proxies` option tells Narrowspark Automatic in which environments this `provider`, `proxy` can be turn on automatically (all in this case).\n\nThe `script-extenders` option adds a new script executor to the Narrowspark Automatic `auto-scripts`.\nNow you can run `viserio console` commands in the `auto-scripts` section of your `composer.json` app file.\n\nThe instructions defined in this `automatic.json` file are also used by Narrowspark Automatic when uninstalling dependencies (for example `composer remove viserio/console`) to undo all changes.\nThis means that Automatic can remove the Console Provider and Proxy from the app and remove the script executor from Narrowspark Automatic.\n\nRead the [configuration documentation](docs/CONFIGURATORS.md) to learn everything about how to create configuration for your own packages.\n\n## Automatic extends Composer\n\nNarrowspark Automatic adds a parallel downloader with the feature to skip old dependencies tags for a download boost.\n\nWith the below example you can see how to add a skip tag to Narrowspark Automatic, with this it will skip all tags of `cakephp` that are older then `3.5`.\n\n```json\n{\n    \"extra\": {\n        \"automatic\": {\n            \"require\": {\n                \"cakephp/cakephp\": \"\u003e=3.5\"\n            }\n        }\n    }\n}\n```\n\nYou can skip `auto discovery` for packages with this Narrowspark Automatic key `dont-discover` in your composer.json extra `automatic` section. Use the package name to skip the `auto discovery`, like in this example:\n\n```json\n{\n    \"extra\" : {\n        \"dont-discover\": [\n            \"viserio/console\"\n        ]\n    }\n}\n```\n\nAuto discovery will now be skipped for `viserio/console`.\n\n## Automatic Security Audit\n\nNarrowspark Automatic shows you on every `composer install` and `composer update` known security vulnerabilities for your installed dependencies based on [FriendsOfPHP/security-advisories](https://github.com/FriendsOfPHP/security-advisories) database.\n\nIf you like to change the default HTTP `timeout = 20` for the downloader, add `audit` to your composer.json `extra` section, like in this example:\n\n```json\n{\n    \"extra\" : {\n        \"audit\": {\n            \"timeout\": \"30\"\n        }\n    }\n}\n```\n\n## Testing\n\nYou need to run:\n``` bash\n$ php vendor/bin/phpunit\n```\n\n## Versioning\n\nThis library follows semantic versioning, and additions to the code ruleset are performed in major releases.\n\n## Changelog\n\nPlease have a look at [`CHANGELOG.md`](CHANGELOG.md).\n\n## Contributing\n\nPlease have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).\n\n## Code of Conduct\n\nPlease have a look at [`CODE_OF_CONDUCT.md`](.github/CODE_OF_CONDUCT.md).\n\n## Credits\n\n- [Daniel Bannert](https://github.com/prisis)\n- [All Contributors](https://github.com/narrowspark/automatic/graphs/contributors)\n- Narrowspark Automatic has been inspired by [symfony/flex](https://github.com/symfony/flex)\n\n## License\n\nThis package is licensed using the MIT License.\n\nPlease have a look at [`LICENSE.md`](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarrowspark%2Fautomatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarrowspark%2Fautomatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarrowspark%2Fautomatic/lists"}