yiisoft / active-record

Active Record database abstraction layer
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
70 stars 29 forks source link

Summary for `ActiveRecord` #308

Open Tigrov opened 6 months ago

Tigrov commented 6 months ago
xepozz commented 6 months ago

Great ideas, especially with naming for relations. I have a question: What's the reason to rename attributes to properties?

Tigrov commented 6 months ago

What's the reason to rename attributes to properties?

It was discussed that there is confusion between the $attributes AR property and PHP's #[Attribute].

But it's a good question. Now this looks doubtful due to major changes and needs to be discussed again. Due to the renaming of public methods whose names contain attribute.

vjik commented 6 months ago

But it's a good question. Now this looks doubtful due to major changes and needs to be discussed again. Due to the renaming of public methods whose names contain attribute.

Are there any pitfalls here? Rename methods also it looks logically.

Tigrov commented 6 months ago

Are there any pitfalls here? Rename methods also it looks logically.

Discussion about renaming $attributes moved to https://github.com/yiisoft/active-record/issues/343