yiisoft / active-record

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

Summary for `ActiveRecord` #308

Open Tigrov opened 1 month ago

Tigrov commented 1 month ago
xepozz commented 1 month ago

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

Tigrov commented 1 month 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 1 month 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 1 month 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