-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Realize ReadOnlyActiveRecord
#313
Comments
Can we use native PHP readonly properties (PHP 8.1) and classes (PHP 8.2) for the purpose? readonly class User
{
// ...
}
class User
{
public function __construct(
public readonly string $name
)
{}
// ...
} |
Looks like a solution but still can be deleted using |
May be add this feature in PHP 8.2 only? It will to allow check readonly class in |
Seems |
There are cases when
ActiveRecord
instances should be used inreadonly
mode. For example,readonly
tables or views (virtual tables) and views for rendering responses.For these cases
ReadOnlyActiveRecordInterface
interface could be created and realized inReadOnlyActiveRecord
class.Updated 16.05.2024
Found related issue with naming
ImmutableActiveRecord
The text was updated successfully, but these errors were encountered: