How can I suggest a modification?

Hi,
sorry for my english, its terrible, i use translator…
i found that it copies the content and not copy file links…
this make the ./init file

I want to suggest a change in the ./init file for include in the source code…

SOURCE
134 > function copyFile($root, $source, $target, &$all, $params)
135 > {
136 > if (!is_file($root . ‘/’ . $source)) {
137 > echo " skip $target ($source not exist)\n";
138 > return true;
139 > }
140 > if (is_file($root . ‘/’ . $target)) {

MODIFICATION
134 > function copyFile($root, $source, $target, &$all, $params)
135 > {
136 > if (is_link($root . ‘/’ . $source)) {
137 > if (file_exists($root . ‘/’ . $target)) {
138 > unlink($root . ‘/’ . $target);
139 > }
140 > symlink(readlink($root . ‘/’ . $source), $root . ‘/’ . $target);
141 > return true;
142 > }
143 > if (!is_file($root . ‘/’ . $source)) {
145 > echo " skip $target ($source not exist)\n";
146 > return true;
147 > }
148 > if (is_file($root . ‘/’ . $target)) {

Thanks

First, don’t worry about the translation what is really not a problem, try to point us what is all about. It is not clear at first glance that you are writing about environment init tool.

Second, do we really need the change? What is the purpose of it? The tool works correctly in my opinion.

1 Like

Yes I understand…
Rereading the message it is not clear to me either. sorry.

  1. The ./init file creates the boot environment for the project.
  • I start by downloading Yii2, then create the initial configurations:
    ./enviroments/[dev/prod]/common/config/[db.php|db2.php]
  • then I execute: ./init
  • and continued the project…

That’s where I found that Yii2 copies the content and not the link… because when editing the file in the initial path it does not make the change. In the first few times I downloaded, ran the init and continued the project.

  1. I agree with what you say: “The tool works correctly.” I don’t know if everyone needs this change, it was a suggestion to save time and make things easier.

It was with the intention of collaborating, but this affects or delays the work.
Excuse me

I think you missed the point what the ./init script is made for.
Look on guide: https://www.yiiframework.com/extension/yiisoft/yii2-app-advanced/doc/guide/2.0/en/start-installation#preparing-application

[…] You only need to do these once for all.

After initialization made by the script it is more correct to do any further changes in config files that were prepared by it, e.g. common/config/* frontend/config/* etc.