Skip to content

Conversation

@DAGpro
Copy link
Contributor

@DAGpro DAGpro commented Oct 31, 2022

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues #210, #143

Also need to add a github action to create a phar file and a command to self-update the executable file

I tested most of the commands, fixed the errors found, I could have missed something, I'll test the commands.
The replicate and release commands have not been tested.

Most of the settings were transferred to the config file: packages, package owners, root folder for packages, folder for configs, git token.

Repository settings from the config directory can also be transferred.

I don’t know yet what is the best way to deal with files for replication

@what-the-diff
Copy link

what-the-diff bot commented Oct 31, 2022

  • Added new commands:
    • tool/init | init | Initiate the creation of a config file for the DevTool tool.
    • composer/fix-dependencies | - | Fix require and require-dev section in compose.json.
    • github/protect-branch | - | Protect specified branch for specified GitHub repositories.
    • packages/add | add | Add packages. Specify a list of packages or options --all --perPage --page .
  • Removed command exec from help output (it is not used anymore). It was replaced by packages\exec command which executes console application inside each package directory, so it can be executed with any arguments like yii, etc... This allows to use YiiDevTool as an alternative to Docker containers when working on multiple projects at once without having them installed globally on your system but only cloned into one folder where you run this script from (like ~/projects). You may also want to create aliases in ~/.bashrc/.zshrc files that will allow you quickly switch between different project directories using cd alias instead of typing full path every time:
  • Removed config/travis/slack.local.php.example
  • Removed dev/.gitignore
  • Removed owner-packages file and replaced it with a method in YiiDevToolApplication class to get the value from configuration files (configuration is now stored in yiisoft\yii-devtool package)
  • Replaced packages array with a call of new method that returns an array based on values from configuration files (configuration is now stored in yiisoft\yii-devtool package)
    5,6,7 - removed unused methods for getting application root directory or token as they are not used anymore because we have moved all this logic into separate classes: Config and Application respectively
  • Added new command "packages/add"
  • Refactored the code of existing commands:
    • packages/disable -> disable all packages by default; added option --all to enable all packages; removed package keys from configs file and moved them into separate array in configs file (see can work with private gitlab packages? #1)
  • Rename EnableCommand, InstallCommand, ListCommand to Packages/EnableCommnad etc.
  • Add Remove command for packages in configs (packages can be removed from the list of packages).
  • Update Command: add token option and use it instead of github-token file; remove --no-plugins option as it is not used anymore; update description text with new options info; rename $defaultName property to getName() method call because we have aliases now that are set by setAliases().
  • MakeReleaseComand: move logic related to getting a GitHub API token into Config class and use this value here instead of reading from a file or asking user input on each run if there's no such file yet (it was annoying); also fix some typos in descriptions texts like "repo" -> "Repo".
  • ReplicateComposerConfigCommand.php
    • Change description command and change path to config/replicate/composer.json on config-dir/replicate/composer.json
  • ReplicateFilesCommand:
    • Change description command and change path to config\replicate\files.php on config-dir\replcate\files, add method getApplication() for access Config object in class YiiDevToolApplication;
      3 ContributorsCommand:
    • Add method getApplication() for access Config object in class YiiDevToolApplication;
  • Add Config class to get config data from yii-dev.php
  • Change PackageCommand and add method getConfig() for getting the instance of Config class in child classes
  • Change constructor of Package, remove $id argument because it is not used anywhere else except __construct(), change type hinting on $config variable (it can be bool or string)
  • Added new commands:
    • AddCommand, RemoveCommand and Init.
  • Refactored Enable/Disable command to use Config class instead of reading config file directly.
  • Updated List command to show enabled packages only by default (can be changed with --all option).
@samdark
Copy link
Member

samdark commented Nov 14, 2022

Would you please resolve conflicts?

@DAGpro
Copy link
Contributor Author

DAGpro commented Nov 14, 2022

Не могли бы вы разрешить конфликты?

merge master into phar branch?

i can resolve conflicts

@samdark
Copy link
Member

samdark commented Nov 14, 2022

Yes.

# Conflicts: #	README.md #	config/replicate/files.php #	packages.php #	src/App/YiiDevToolApplication.php
@DAGpro DAGpro closed this Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants