{"id":14966420,"url":"https://github.com/yiisoft/yii-dev-tool","last_synced_at":"2025-10-10T10:36:45.341Z","repository":{"id":33861159,"uuid":"158851352","full_name":"yiisoft/yii-dev-tool","owner":"yiisoft","description":"Development environment for Yii 3 packages","archived":false,"fork":false,"pushed_at":"2025-07-16T06:34:34.000Z","size":674,"stargazers_count":72,"open_issues_count":29,"forks_count":34,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-09-11T00:28:19.985Z","etag":null,"topics":["development","hacktoberfest","internal","yii3"],"latest_commit_sha":null,"homepage":"https://www.yiiframework.com/","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/yiisoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","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,"zenodo":null},"funding":{"open_collective":"yiisoft","github":["yiisoft"],"polar":"yiisoft"}},"created_at":"2018-11-23T15:45:24.000Z","updated_at":"2025-07-07T06:57:53.000Z","dependencies_parsed_at":"2024-04-11T04:01:35.599Z","dependency_job_id":"753d28c9-3d29-4fc2-826a-81b0d29215ad","html_url":"https://github.com/yiisoft/yii-dev-tool","commit_stats":{"total_commits":409,"total_committers":32,"mean_commits":12.78125,"dds":0.5427872860635696,"last_synced_commit":"c1b7aa34112e65602948ed2772294cfbdd6eb31d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yiisoft/yii-dev-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-dev-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-dev-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-dev-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-dev-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yiisoft","download_url":"https://codeload.github.com/yiisoft/yii-dev-tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-dev-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275593250,"owners_count":25492650,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["development","hacktoberfest","internal","yii3"],"created_at":"2024-09-24T13:36:21.522Z","updated_at":"2025-10-10T10:36:45.302Z","avatar_url":"https://github.com/yiisoft.png","language":"PHP","funding_links":["https://opencollective.com/yiisoft","https://github.com/sponsors/yiisoft","https://polar.sh/yiisoft"],"categories":[],"sub_categories":[],"readme":"Yii3 development environment\n=============================\n\nThis repo contains tools to set up a development environment for Yii3 packages.\nIt allows working on separate packages and test the result in other packages at the same time.\nCould be used for third party packages as well.\n\n\nRequirements\n------------\n\n### Manual install\n\nIf you prefer manual install, you need:\n- GNU/Linux or Windows **with bash**\n- PHP 8.0 or higher\n- [Composer](https://getcomposer.org/) installed and\n  available [as `composer` on the command line](https://getcomposer.org/doc/00-intro.md#globally)\n\n### Vagrant\n\nIf you prefer Vagrant, you only need to install \n[Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads),\nbecause our Vagrant environment already contains Ubuntu, PHP, and Composer. \nSee our Vagrant [documentation](vagrant/README.md) for details.\n\n### Docker\n\nIf you prefer Docker, you only need to install [Docker](https://www.docker.com/).\n\nSee our Docker [documentation](docker/README.md) for details.\n\nManual install\n--------------\n\n```bash\ngit clone https://github.com/yiisoft/yii-dev-tool\ncd yii-dev-tool\ncomposer install\n./yii-dev install\n```\n    \nThe above command will clone all Yii3 packages and run `composer install` in them.\nYou may select packages by providing a second argument:\n\n```bash\n./yii-dev install di,rbac,yii-cycle,view\n```\n\n\u003e Note: In case you are using PhpStorm, run `ide` command once to configure the project directories for\n\u003e installed packages to avoid infinite indexing cycle.\n\nUpgrade\n-------\n\nTo upgrade **yii-dev-tool** to the latest version, run the following commands:\n\n```bash\ncd yii-dev-tool\ngit pull\ncomposer update\n```\n\n\nConfiguration\n-------------\n\nTo customize the configuration of **yii-dev-tool**, create your local configuration `packages.local.php` \nusing file `packages.local.php.example` as example. In this file, you will find examples of all available \nconfiguration options.\n\nTo move `dev` directory where packages are installed to another location, create your local configuration `config/config.local.php` \nusing file `config/config.local.php.example` as example. Adjust `packagesRootDir` as needed.\n\nUsage example\n-------------\n\n### Objective\n\nSuppose we want to work on three interdependent packages:\n* yiisoft/demo\n* yiisoft/view\n* yiisoft/i18n\n\nPackage **demo** depends on package **view**, and package **view** depends on package **i18n**.\n\nSuppose we want to add new features to package **i18n**, and then use them in package **view**. \nAfter that, we will need to run the tests in package **demo** and make sure that everything works correctly.\n\n### Step 1: create forks\n\nGo to the page of each repository and click the \"Fork\" button:\n* [yiisoft/demo](https://github.com/yiisoft/demo)\n* [yiisoft/view](https://github.com/yiisoft/view)\n* [yiisoft/i18n](https://github.com/yiisoft/i18n)\n\nSuppose my nickname on GitHub is \"samdark.\" Then I will get three forks:\n* samdark/demo\n* samdark/view\n* samdark/i18n\n\nFor your nickname, you will get other fork names.\n\n### Step 2: install yii-dev-tool\n\nNow install **yii-dev-tool**:\n\n```bash\ngit clone https://github.com/yiisoft/yii-dev-tool\ncd yii-dev-tool\ncomposer install\n```\n        \n### Step 3: configure yii-dev-tool to use forks\n\nIn order for **yii-dev-tool** to use our forks, they must be configured. \n\nIt is possible to specify the owner for all packages in the owner-packages.php file\n\n```php\nreturn 'samdark';\n```\n\nOr create your configuration:\n\n```bash\ncd yii-dev-tool\ncp packages.local.php.example packages.local.php\n```\n\nSpecify the forks in config `packages.local.php`:\n\n```php\n$packages = [\n    'demo' =\u003e 'samdark/demo',\n    'view' =\u003e 'samdark/view',\n    'i18n' =\u003e 'samdark/i18n',\n];\n```\n\nSee [example](packages.local.php.example). \n\n### Step 4: install packages\n\nTo work with GitHub via SSH, you have to [add](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account) your public SSH key to GitHub account. \nAdd key if you have not done it before.\n\nNow install the packages:\n\n```bash\ncd yii-dev-tool\n./yii-dev install demo,view,i18n\n```\n\nThis command clones the fork repositories from GitHub to the local directory `yii-dev-tool/dev/`, \n[sets upstream](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork) \nfor them and executes `composer install` in each package. Then symlinks will be created:\n* yii-dev-tool/dev/demo/vendor/yiisoft/view -\u003e yii-dev-tool/dev/view\n* yii-dev-tool/dev/view/vendor/yiisoft/i18n -\u003e yii-dev-tool/dev/i18n\n\nDue to these symlinks, changes in packages will immediately affect the operation of packages that depend on them.\nIt is very convenient for development.\n\n### Step 5: create a git branch for work\n\nCreate a new **feature-x** branch in the repositories:\n\n```bash\ncd yii-dev-tool\n./yii-dev git/checkout feature-x demo,view,i18n\n```\n\n### Step 6: writing the code\n\nNow make the necessary changes to the code of package **i18n** in folder `yii-dev-tool/dev/i18n`. \nNext, make changes to the code of package **view** in folder `yii-dev-tool/dev/view`. \nAnd, finally, change package **demo** in folder `yii-dev-tool/dev/demo`.\n\n### Step 7: run the tests\n\nMake sure the tests pass. For instance, package **view** tests can be run with the following command:\n\n```bash\ncd yii-dev-tool/dev/view\n./vendor/bin/phpunit\n```\n\n### Step 8: commit and push the changes to the fork repositories\n\nCommit the changes:\n\n```bash\ncd yii-dev-tool\n./yii-dev git/commit \"Add feature X\" demo,view,i18n\n```\n\nPush the new code to remote repositories:\n\n```bash\ncd yii-dev-tool\n./yii-dev git/push demo,view,i18n\n```\n\n### Step 9: create pull requests\n\nGo to the pages of the original repositories and create a PR in each:\n* [yiisoft/demo](https://github.com/yiisoft/demo)\n* [yiisoft/view](https://github.com/yiisoft/view)\n* [yiisoft/i18n](https://github.com/yiisoft/i18n)\n\n\u003e Note: Don't create PR from master directly, instead create a new branch.\n\n### Final notes\n\nThat's all. We developed new functionality and submitted it for review, 🙂 Of course, the steps will be \nslightly different for different tasks and configurations. \n\nRemember that **yii-dev-tool** contains many other commands:\n\n| Command                   | Aliases   | Description                                                                  |\n|---------------------------|-----------|------------------------------------------------------------------------------|\n| changelog/add             |           | Adds a changelog entry into `CHANGELOG.md` into `under development` section. |\n| exec                      | e         | Executes the specified console command in each package.                      |\n| composer/update           | cu        | Update composer dependencies in packages.                                    |\n| git/checkout              | checkout  | Creates, if not exists, and checkout a git branch.                           |\n| git/clone                 | clone     | Package repositories cloning.                                                |\n| git/commit                | commit    | Add and commit changes into each package repository.                         |\n| git/pull                  | pull      | Pull changes from package repositories.                                      |\n| git/push                  | push      | Push changes into package repositories.                                      |\n| git/status                | status, s | Show git status of packages.                                                 |\n| git/pr/create             | pr        | Create a pull request at GitHub.                                             |\n| github/forks              | forks     | Create forks of repositories                                                 |\n| github/sync               | sync      | Sync forks from upstream repositories                                        |\n| github/settings           | -         | Change settings of a GitHub repository.                                      |\n| list                      | l         | List enabled packages.                                                       |\n| install                   | i         | Clone packages repositories and install composer dependencies.               |\n| update                    | u         | Pull changes from packages repositories and update composer dependencies.    |\n| lint                      | -         | Check packages according to PSR-12 standard.                                 |\n| release/make              | -         | Make a package release.                                                      |\n| replicate/files           | -         | Copy files specified in `config/replicate/files.php` into each package.      |\n| replicate/composer-config | -         | Merge `config/replicate/composer.json` into `composer.json` of each package. |\n| replicate/copy-file       | -         | Copy file into each package.                                                 |\n| test                      | t         | Test packages.                                                               |\n| enable                    | -         | Enable packages.                                                             |\n| disable                   | -         | Disable packages.                                                            |\n| switch                    | -         | Enable specified packages and disable others.                                |\n\nIf you encounter any problems, [create an issue](https://github.com/yiisoft/yii-dev-tool/issues/new) – \nand we'll try to help you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiisoft%2Fyii-dev-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyiisoft%2Fyii-dev-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiisoft%2Fyii-dev-tool/lists"}