yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
451 stars 184 forks source link

Move application code to "src" directory #137

Closed zhukovra closed 6 years ago

zhukovra commented 6 years ago
Q A
Is bugfix? no
New feature? no
Breaks BC? no
Tests pass? yes
Fixed issues

Move source files to "src" directory. Discussed in https://github.com/yiisoft/yii2-httpclient/pull/140 Updated Travis configuration file.

zhukovra commented 6 years ago

@cebe what are you think about it?

samdark commented 6 years ago

It's OK but needs more polishing such as https://github.com/yiisoft/yii2-authclient/commit/829d298cfd9f6e1dd8fd52d7b7e2ffc0ccbc36d7

zhukovra commented 6 years ago

@samdark I don't understand line with setAlias('@yii/authclient', dirname(__DIR__).'/src') at all because namespace already was registered in composer.json. Please help me - what is purpose of this line? Or maybe @klimov-paul can explain. Thank you.

So I've just removed it from bootstrap.php. As you can see - it passes tests.

samdark commented 6 years ago

That's directory name, not namespace.

zhukovra commented 6 years ago

Your comment does not answer on question about the purpose of setting alias :disappointed: Please help me with that puzzle.

samdark commented 6 years ago

That is for the case someone will have any resource accessed via Yii::getAlias('@yii/authclient/something.txt'). As far as I'm aware it's the only purpose. In case of authclient there are asset bundles that may use that.

zhukovra commented 6 years ago

From my point of view - every line of code must be necessary or you commit just for entropy raising :boom: :laughing:
If tests work without the line - that line is useless.

samdark commented 6 years ago

Yup. Merged.

samdark commented 6 years ago

Thank you!