Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cbb5adb
Create PR
SOHELAHMED7 Feb 12, 2025
ca8e804
Add passing test
SOHELAHMED7 Feb 14, 2025
b050abd
Failing test
SOHELAHMED7 Mar 1, 2025
45f3f90
Fix
SOHELAHMED7 Mar 1, 2025
e69fc04
Fix failing tests
SOHELAHMED7 Mar 3, 2025
ab6629b
Create PR
SOHELAHMED7 Mar 3, 2025
207228b
Add test stub
SOHELAHMED7 Mar 3, 2025
4c409f7
WIP
SOHELAHMED7 Mar 4, 2025
2eda480
Refactor
SOHELAHMED7 Mar 4, 2025
1231531
Refactor 2
SOHELAHMED7 Mar 4, 2025
d93d0b3
Merge branch '88-in-case-of-updating-a-model-generator-creates-redund…
SOHELAHMED7 Mar 4, 2025
a69f43a
Implement
SOHELAHMED7 Mar 4, 2025
f92b782
Complete the test
SOHELAHMED7 Mar 4, 2025
5b1ec54
Fix failing tests
SOHELAHMED7 Mar 4, 2025
2134ddf
Refactor and add docs
SOHELAHMED7 Mar 4, 2025
426fecb
Modify a file to create pull request at GitHub
SOHELAHMED7 Mar 7, 2025
49cd50e
Add message
SOHELAHMED7 Mar 7, 2025
ecbee94
Complete the test
SOHELAHMED7 Mar 7, 2025
229c003
Refactor
SOHELAHMED7 Mar 8, 2025
d89fe28
Refactor and fix failing test
SOHELAHMED7 Mar 8, 2025
4aa7668
Fix
SOHELAHMED7 Mar 8, 2025
24d559a
Merge branches 'master' and '96-component-schema-should-be-optional' …
SOHELAHMED7 Mar 12, 2025
95670f5
Merge branch 'master' of github.com:php-openapi/yii2-openapi into 79-…
SOHELAHMED7 Mar 12, 2025
c4c9467
Merge branch 'master' of github.com:php-openapi/yii2-openapi into 90-…
SOHELAHMED7 Mar 12, 2025
ca1e12a
Merge branch 'master' of github.com:php-openapi/yii2-openapi into 88-…
SOHELAHMED7 Mar 12, 2025
856e1d6
Merge branches 'master' and '96-component-schema-should-be-optional' …
SOHELAHMED7 Mar 12, 2025
f83bbd4
Merge branch '79-response-status-codes-are-not-the-codes-defined-in-s…
SOHELAHMED7 Mar 12, 2025
8921fed
Merge branch '88-in-case-of-updating-a-model-generator-creates-redund…
SOHELAHMED7 Mar 12, 2025
dd34cdb
Merge branch '78-properties-that-are-marked-as-readonly-are-not-read-…
SOHELAHMED7 Mar 12, 2025
4d32a93
Merge branch '90-implement-belongs-to-relations-in-models' of github.…
SOHELAHMED7 Mar 12, 2025
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
Fix failing tests
  • Loading branch information
SOHELAHMED7 committed Mar 3, 2025
commit e69fc04d55f2e88844483872c8c2eb7d7bef46b5
5 changes: 0 additions & 5 deletions tests/specs/blog/models/base/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,4 @@ public function getPosts()
{
return $this->hasMany(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
}

public function getPost()
{
return $this->hasOne(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
}
}
5 changes: 0 additions & 5 deletions tests/specs/blog/models/base/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,4 @@ public function getComments()
{
return $this->hasMany(\app\models\Comment::class, ['post_id' => 'uid'])->inverseOf('post');
}

public function getComment()
{
return $this->hasOne(\app\models\Comment::class, ['post_id' => 'uid'])->inverseOf('post');
}
}
10 changes: 0 additions & 10 deletions tests/specs/blog/models/base/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,4 @@ public function rules()
'email_unique' => [['email'], 'unique'],
];
}

public function getPost()
{
return $this->hasOne(\app\models\Post::class, ['created_by_id' => 'id'])->inverseOf('created_by');
}

public function getComment2()
{
return $this->hasOne(\app\models\Comment::class, ['author_id' => 'id'])->inverseOf('author');
}
}
5 changes: 0 additions & 5 deletions tests/specs/blog_v2/models/base/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,4 @@ public function getPosts()
{
return $this->hasMany(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
}

public function getPost()
{
return $this->hasOne(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
}
}
5 changes: 0 additions & 5 deletions tests/specs/blog_v2/models/base/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,4 @@ public function getTags()
return $this->hasMany(\app\models\Tag::class, ['id' => 'tag_id'])
->viaTable('posts2tags', ['post_id' => 'id']);
}

public function getComment()
{
return $this->hasOne(\app\models\Comment::class, ['post_id' => 'id'])->inverseOf('post');
}
}
10 changes: 0 additions & 10 deletions tests/specs/blog_v2/models/base/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,4 @@ public function rules()
'email_unique' => [['email'], 'unique'],
];
}

public function getPost()
{
return $this->hasOne(\app\models\Post::class, ['created_by_id' => 'id'])->inverseOf('created_by');
}

public function getComment2()
{
return $this->hasOne(\app\models\Comment::class, ['user_id' => 'id'])->inverseOf('user');
}
}
5 changes: 0 additions & 5 deletions tests/specs/fk_col_name/app/models/base/Delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ public function rules()
'title_string' => [['title'], 'string'],
];
}

public function getWebhook()
{
return $this->hasOne(\app\models\Webhook::class, ['redelivery_of' => 'id'])->inverseOf('redelivery_of');
}
}
5 changes: 0 additions & 5 deletions tests/specs/fk_col_name/app/models/base/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getWebhook()
{
return $this->hasOne(\app\models\Webhook::class, ['user_id' => 'id'])->inverseOf('user');
}
}
10 changes: 0 additions & 10 deletions tests/specs/fk_col_name_index/app/models/base/Delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,4 @@ public function rules()
'title_string' => [['title'], 'string'],
];
}

public function getWebhook()
{
return $this->hasOne(\app\models\Webhook::class, ['redelivery_of' => 'id'])->inverseOf('redelivery_of');
}

public function getWebhook2()
{
return $this->hasOne(\app\models\Webhook::class, ['rd_abc_2' => 'id'])->inverseOf('rd2');
}
}
5 changes: 0 additions & 5 deletions tests/specs/fk_col_name_index/app/models/base/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getWebhook()
{
return $this->hasOne(\app\models\Webhook::class, ['user_id' => 'id'])->inverseOf('user');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,4 @@ public function rules()
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
];
}

public function getContact()
{
return $this->hasOne(\app\models\Contact::class, ['mailing_id' => 'id'])->inverseOf('mailing');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,4 @@ public function rules()
{
return [];
}

public function getOrder()
{
return $this->hasOne(\app\models\Order::class, ['invoice_id' => 'id'])->inverseOf('invoice');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,4 @@ public function rules()
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
];
}

public function getContact()
{
return $this->hasOne(\app\models\Contact::class, ['account_id' => 'id'])->inverseOf('account');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,4 @@ public function getAccounts()
{
return $this->hasMany(\app\models\Account::class, ['user_id' => 'id'])->inverseOf('user');
}

public function getAccount()
{
return $this->hasOne(\app\models\Account::class, ['user_id' => 'id'])->inverseOf('user');
}

public function getAccount2()
{
return $this->hasOne(\app\models\Account::class, ['user2_id' => 'id'])->inverseOf('user2');
}

public function getAccount3()
{
return $this->hasOne(\app\models\Account::class, ['user3' => 'id'])->inverseOf('user3');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getPost()
{
return $this->hasOne(\app\models\Post::class, ['user' => 'id'])->inverseOf('user');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getInvoice()
{
return $this->hasOne(\app\models\Invoice::class, ['animal_id' => 'id'])->inverseOf('animal');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getInvoice()
{
return $this->hasOne(\app\models\Invoice::class, ['fruit_id' => 'id'])->inverseOf('fruit');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getInvoice()
{
return $this->hasOne(\app\models\Invoice::class, ['user_id' => 'id'])->inverseOf('user');
}

public function getInvoice2()
{
return $this->hasOne(\app\models\Invoice::class, ['user_2_id' => 'id'])->inverseOf('user_2');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,4 @@ public function rules()
'name_string' => [['name'], 'string', 'max' => 40],
];
}

public function getE123()
{
return $this->hasOne(\app\models\E123::class, ['account_id' => 'id'])->inverseOf('account');
}

public function getE1232()
{
return $this->hasOne(\app\models\E123::class, ['account_2_id' => 'id'])->inverseOf('account_2');
}

public function getE1233()
{
return $this->hasOne(\app\models\E123::class, ['account_3_id' => 'id'])->inverseOf('account_3');
}
}
5 changes: 0 additions & 5 deletions tests/specs/petstore/models/base/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getPet()
{
return $this->hasOne(\app\models\Pet::class, ['store_id' => 'id'])->inverseOf('store');
}
}
5 changes: 0 additions & 5 deletions tests/specs/petstore_jsonapi/models/base/Pet.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,4 @@ public function getDuplicates()
{
return $this->hasMany(\app\models\Pet::class, ['tag' => 'tag']);
}

public function getPetStatistic()
{
return $this->hasOne(\app\models\PetStatistic::class, ['parentPet_id' => 'id'])->inverseOf('parentPet');
}
}
5 changes: 0 additions & 5 deletions tests/specs/petstore_namespace/mymodels/base/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getPet()
{
return $this->hasOne(\app\mymodels\Pet::class, ['store_id' => 'id'])->inverseOf('store');
}
}
5 changes: 0 additions & 5 deletions tests/specs/relations_in_faker/app/models/base/A123.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,4 @@ public function getB123()
{
return $this->hasOne(\app\models\B123::class, ['id' => 'b123_id']);
}

public function getRouting()
{
return $this->hasOne(\app\models\Routing::class, ['a123_id' => 'id'])->inverseOf('a123');
}
}
5 changes: 0 additions & 5 deletions tests/specs/relations_in_faker/app/models/base/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public function rules()
'name_string' => [['name'], 'string', 'max' => 40],
];
}

public function getDomain()
{
return $this->hasOne(\app\models\Domain::class, ['account_id' => 'id'])->inverseOf('account');
}
}
10 changes: 0 additions & 10 deletions tests/specs/relations_in_faker/app/models/base/B123.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,4 @@ public function getC123()
{
return $this->hasOne(\app\models\C123::class, ['id' => 'c123_id']);
}

public function getA123()
{
return $this->hasOne(\app\models\A123::class, ['b123_id' => 'id'])->inverseOf('b123');
}

public function getE1232()
{
return $this->hasOne(\app\models\E123::class, ['b123_id' => 'id'])->inverseOf('b123');
}
}
5 changes: 0 additions & 5 deletions tests/specs/relations_in_faker/app/models/base/C123.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getB123()
{
return $this->hasOne(\app\models\B123::class, ['c123_id' => 'id'])->inverseOf('c123');
}
}
5 changes: 0 additions & 5 deletions tests/specs/relations_in_faker/app/models/base/D123.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ public function rules()
'name_string' => [['name'], 'string'],
];
}

public function getRouting()
{
return $this->hasOne(\app\models\Routing::class, ['d123_id' => 'id'])->inverseOf('d123');
}
}
5 changes: 0 additions & 5 deletions tests/specs/relations_in_faker/app/models/base/Domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,4 @@ public function getRoutings()
{
return $this->hasMany(\app\models\Routing::class, ['domain_id' => 'id'])->inverseOf('domain');
}

public function getRouting()
{
return $this->hasOne(\app\models\Routing::class, ['domain_id' => 'id'])->inverseOf('domain');
}
}