Skip to content

Commit da0ceae

Browse files
authored
Merge branch 'master' into add-events
2 parents 86598c6 + 10cd947 commit da0ceae

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

src/AbstractActiveRecord.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Yiisoft\Db\Exception\InvalidCallException;
1515
use Yiisoft\Db\Exception\InvalidConfigException;
1616
use Yiisoft\Db\Exception\NotSupportedException;
17-
use Yiisoft\Db\Exception\StaleObjectException;
1817
use Yiisoft\Db\Expression\Expression;
1918

2019
use function array_diff_key;
@@ -903,7 +902,6 @@ public function unlink(string $relationName, ActiveRecordInterface $linkedModel,
903902
*
904903
* @throws Exception
905904
* @throws ReflectionException
906-
* @throws StaleObjectException
907905
* @throws Throwable
908906
*/
909907
public function unlinkAll(string $relationName, bool $delete = false): void
@@ -1055,7 +1053,6 @@ protected function createRelationQuery(
10551053
* {@see delete()}
10561054
*
10571055
* @throws Exception
1058-
* @throws StaleObjectException
10591056
* @throws Throwable
10601057
*
10611058
* @return int The number of rows deleted.
@@ -1153,7 +1150,6 @@ protected function refreshInternal(array|ActiveRecordInterface|null $record = nu
11531150
*
11541151
* @throws Exception
11551152
* @throws NotSupportedException
1156-
* @throws StaleObjectException
11571153
*
11581154
* @return int The number of rows affected.
11591155
*/

src/Trait/MagicPropertiesTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use InvalidArgumentException;
1313
use Yiisoft\Db\Exception\InvalidCallException;
1414
use Yiisoft\Db\Exception\InvalidConfigException;
15-
use Yiisoft\Db\Exception\UnknownPropertyException;
15+
use Yiisoft\ActiveRecord\UnknownPropertyException;
1616

1717
use function array_merge;
1818
use function in_array;

src/UnknownPropertyException.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Yiisoft\ActiveRecord;
6+
7+
use Yiisoft\Db\Exception\Exception;
8+
9+
/**
10+
* Represents an exception caused by accessing unknown object properties.
11+
*/
12+
final class UnknownPropertyException extends Exception
13+
{
14+
}

tests/ActiveQueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
use InvalidArgumentException;
2828
use Yiisoft\Db\Exception\InvalidCallException;
2929
use Yiisoft\Db\Exception\InvalidConfigException;
30-
use Yiisoft\Db\Exception\UnknownPropertyException;
30+
use Yiisoft\ActiveRecord\UnknownPropertyException;
3131
use Yiisoft\Db\Query\QueryInterface;
3232

3333
use function sort;

tests/ActiveRecordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
use InvalidArgumentException;
3434
use Yiisoft\Db\Exception\InvalidCallException;
3535
use Yiisoft\Db\Exception\InvalidConfigException;
36-
use Yiisoft\Db\Exception\UnknownPropertyException;
36+
use Yiisoft\ActiveRecord\UnknownPropertyException;
3737
use Yiisoft\Db\Expression\Expression;
3838
use Yiisoft\Factory\Factory;
3939

tests/MagicActiveRecordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use InvalidArgumentException;
2727
use Yiisoft\Db\Exception\InvalidCallException;
2828
use Yiisoft\Db\Exception\InvalidConfigException;
29-
use Yiisoft\Db\Exception\UnknownPropertyException;
29+
use Yiisoft\ActiveRecord\UnknownPropertyException;
3030

3131
abstract class MagicActiveRecordTest extends TestCase
3232
{

0 commit comments

Comments
 (0)