Skip to content
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

Remove $db property from constructor #368

Merged
merged 24 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f32d7ac
Remove `$tableName` property from constructor
Tigrov Jun 25, 2024
207a53c
Apply fixes from StyleCI
StyleCIBot Jun 25, 2024
2e04d0f
Add comments to trait [skip ci]
Tigrov Jun 25, 2024
825a647
Add parameter type
Tigrov Jun 27, 2024
338d484
Remove `$db` property from constructor
Tigrov Jun 27, 2024
130337a
Update tests
Tigrov Jun 27, 2024
85764f7
Add `ConnectionProvider::isset()` method
Tigrov Jun 27, 2024
0c17288
Remove `$db` from `ActiveQuery` constructor
Tigrov Jun 27, 2024
d1f11d7
Remove `ActiveRecordFactory`
Tigrov Jun 28, 2024
ede81de
Add middleware and update README
Tigrov Jun 28, 2024
0216f59
Merge branch 'refs/heads/remove-tableName-property' into remove-db-pr…
Tigrov Jun 28, 2024
bad1290
Apply fixes from StyleCI
StyleCIBot Jun 28, 2024
20da8ba
Fix psalm issues
Tigrov Jun 28, 2024
74b7f72
Merge remote-tracking branch 'origin/remove-db-property' into remove-…
Tigrov Jun 28, 2024
de5a50a
Remove `yiisoft/factory` from composer
Tigrov Jun 28, 2024
94794c0
Fix psalm issues
Tigrov Jun 28, 2024
11494ee
Apply suggestions from code review [skip ci]
Tigrov Jul 1, 2024
270dab4
Merge branch 'refs/heads/master' into remove-db-property
Tigrov Jul 1, 2024
0bcbcc6
Update after merge
Tigrov Jul 1, 2024
cadcd07
Apply fixes from StyleCI
StyleCIBot Jul 1, 2024
1796d71
Add soc about config for middleware
Tigrov Jul 1, 2024
8c88e55
Add `ConnectionProvider` tests
Tigrov Jul 2, 2024
e5ff769
Add suggestions to composer.json
Tigrov Jul 2, 2024
6afc4eb
Configure `composer-require-checker`
Tigrov Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comments to trait [skip ci]
Tigrov committed Jun 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2e04d0f91e5470ce2d04433a951a8230f1beb00f
8 changes: 8 additions & 0 deletions src/Trait/CustomTableNameTrait.php
Original file line number Diff line number Diff line change
@@ -4,10 +4,18 @@

namespace Yiisoft\ActiveRecord\Trait;

/**
* Trait to implement custom table name for ActiveRecord.
*
* @see ActiveRecordInterface::getTableName()
*/
trait CustomTableNameTrait
{
private string $tableName;

/**
* Sets the table name for the ActiveRecord.
*/
public function withTableName($tableName): static
{
$new = clone $this;