Skip to content

Commit 43a751c

Browse files
github-actions[bot]github-actions[bot]
github-actions[bot]
authored and
github-actions[bot]
committed
updated
1 parent 575331c commit 43a751c

File tree

3 files changed

+239
-135
lines changed

3 files changed

+239
-135
lines changed

changelog.markdown

+11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ title: Codeception Changelog
99

1010

1111

12+
### lib-asserts 2.2.0: 2.2.0
13+
14+
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/03/10 20:42:27 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases)
15+
16+
17+
18+
* Add PHPStan assert PHPDoc annotations from PHPUnit by **[Lkopo](https://github.com/Lkopo)** in https://github.com/Codeception/lib-asserts/pull/13
19+
* Reimplement assertions removed in PHPUnit 10/12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-asserts/pull/14
20+
21+
22+
1223
### module-symfony 3.5.1: 3.5.1
1324

1425
Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/03/09 23:04:32 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases)

docs/modules/Asserts.md

+44-3
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Asserts that a string does not match a given regular expression.
180180

181181
#### assertEmpty
182182

183+
* `phpstan-assert` empty $actual
183184
* `param mixed` $actual
184185
* `param string` $message
185186

@@ -225,6 +226,7 @@ Asserts that two variables are equal (with delta).
225226

226227
#### assertFalse
227228

229+
* `phpstan-assert` false $condition
228230
* `param mixed` $condition
229231
* `param string` $message
230232

@@ -386,7 +388,9 @@ Asserts that a variable is infinite.
386388

387389
#### assertInstanceOf
388390

389-
* `param string` $expected
391+
* `template` ExpectedType of object
392+
* `phpstan-assert` =ExpectedType $actual
393+
* `param class-string<ExpectedType>` $expected
390394
* `param mixed` $actual
391395
* `param string` $message
392396

@@ -395,6 +399,7 @@ Asserts that a variable is of a given type.
395399

396400
#### assertIsArray
397401

402+
* `phpstan-assert` array $actual
398403
* `param mixed` $actual
399404
* `param string` $message
400405

@@ -403,6 +408,7 @@ Asserts that a variable is of type array.
403408

404409
#### assertIsBool
405410

411+
* `phpstan-assert` bool $actual
406412
* `param mixed` $actual
407413
* `param string` $message
408414

@@ -411,6 +417,7 @@ Asserts that a variable is of type bool.
411417

412418
#### assertIsCallable
413419

420+
* `phpstan-assert` callable $actual
414421
* `param mixed` $actual
415422
* `param string` $message
416423

@@ -419,6 +426,7 @@ Asserts that a variable is of type callable.
419426

420427
#### assertIsClosedResource
421428

429+
* `phpstan-assert` resource $actual
422430
* `param mixed` $actual
423431
* `param string` $message
424432

@@ -435,6 +443,7 @@ Asserts that a variable is empty.
435443

436444
#### assertIsFloat
437445

446+
* `phpstan-assert` float $actual
438447
* `param mixed` $actual
439448
* `param string` $message
440449

@@ -443,6 +452,7 @@ Asserts that a variable is of type float.
443452

444453
#### assertIsInt
445454

455+
* `phpstan-assert` int $actual
446456
* `param mixed` $actual
447457
* `param string` $message
448458

@@ -451,6 +461,7 @@ Asserts that a variable is of type int.
451461

452462
#### assertIsIterable
453463

464+
* `phpstan-assert` iterable $actual
454465
* `param mixed` $actual
455466
* `param string` $message
456467

@@ -459,6 +470,7 @@ Asserts that a variable is of type iterable.
459470

460471
#### assertIsNotArray
461472

473+
* `phpstan-assert` !array $actual
462474
* `param mixed` $actual
463475
* `param string` $message
464476

@@ -467,6 +479,7 @@ Asserts that a variable is not of type array.
467479

468480
#### assertIsNotBool
469481

482+
* `phpstan-assert` !bool $actual
470483
* `param mixed` $actual
471484
* `param string` $message
472485

@@ -475,6 +488,7 @@ Asserts that a variable is not of type bool.
475488

476489
#### assertIsNotCallable
477490

491+
* `phpstan-assert` !callable $actual
478492
* `param mixed` $actual
479493
* `param string` $message
480494

@@ -483,6 +497,7 @@ Asserts that a variable is not of type callable.
483497

484498
#### assertIsNotClosedResource
485499

500+
* `phpstan-assert` !resource $actual
486501
* `param mixed` $actual
487502
* `param string` $message
488503

@@ -491,6 +506,7 @@ Asserts that a variable is not of type resource.
491506

492507
#### assertIsNotFloat
493508

509+
* `phpstan-assert` !float $actual
494510
* `param mixed` $actual
495511
* `param string` $message
496512

@@ -499,6 +515,7 @@ Asserts that a variable is not of type float.
499515

500516
#### assertIsNotInt
501517

518+
* `phpstan-assert` !int $actual
502519
* `param mixed` $actual
503520
* `param string` $message
504521

@@ -507,6 +524,7 @@ Asserts that a variable is not of type int.
507524

508525
#### assertIsNotIterable
509526

527+
* `phpstan-assert` !iterable $actual
510528
* `param mixed` $actual
511529
* `param string` $message
512530

@@ -515,6 +533,7 @@ Asserts that a variable is not of type iterable.
515533

516534
#### assertIsNotNumeric
517535

536+
* `phpstan-assert` !numeric $actual
518537
* `param mixed` $actual
519538
* `param string` $message
520539

@@ -523,6 +542,7 @@ Asserts that a variable is not of type numeric.
523542

524543
#### assertIsNotObject
525544

545+
* `phpstan-assert` !object $actual
526546
* `param mixed` $actual
527547
* `param string` $message
528548

@@ -539,6 +559,7 @@ Asserts that a file/dir exists and is not readable.
539559

540560
#### assertIsNotResource
541561

562+
* `phpstan-assert` !resource $actual
542563
* `param mixed` $actual
543564
* `param string` $message
544565

@@ -547,6 +568,7 @@ Asserts that a variable is not of type resource.
547568

548569
#### assertIsNotScalar
549570

571+
* `psalm-assert` !scalar $actual
550572
* `param mixed` $actual
551573
* `param string` $message
552574

@@ -555,6 +577,7 @@ Asserts that a variable is not of type scalar.
555577

556578
#### assertIsNotString
557579

580+
* `phpstan-assert` !string $actual
558581
* `param mixed` $actual
559582
* `param string` $message
560583

@@ -571,6 +594,7 @@ Asserts that a file/dir exists and is not writable.
571594

572595
#### assertIsNumeric
573596

597+
* `phpstan-assert` numeric $actual
574598
* `param mixed` $actual
575599
* `param string` $message
576600

@@ -579,6 +603,7 @@ Asserts that a variable is of type numeric.
579603

580604
#### assertIsObject
581605

606+
* `phpstan-assert` object $actual
582607
* `param mixed` $actual
583608
* `param string` $message
584609

@@ -595,6 +620,7 @@ Asserts that a file/dir is readable.
595620

596621
#### assertIsResource
597622

623+
* `phpstan-assert` resource $actual
598624
* `param mixed` $actual
599625
* `param string` $message
600626

@@ -603,6 +629,7 @@ Asserts that a variable is of type resource.
603629

604630
#### assertIsScalar
605631

632+
* `phpstan-assert` scalar $actual
606633
* `param mixed` $actual
607634
* `param string` $message
608635

@@ -611,6 +638,7 @@ Asserts that a variable is of type scalar.
611638

612639
#### assertIsString
613640

641+
* `phpstan-assert` string $actual
614642
* `param mixed` $actual
615643
* `param string` $message
616644

@@ -768,6 +796,7 @@ Asserts the number of elements of an array, Countable or Traversable.
768796

769797
#### assertNotEmpty
770798

799+
* `phpstan-assert` !empty $actual
771800
* `param mixed` $actual
772801
* `param string` $message
773802

@@ -813,6 +842,7 @@ Asserts that two variables are not equal (with delta).
813842

814843
#### assertNotFalse
815844

845+
* `phpstan-assert` !false $condition
816846
* `param mixed` $condition
817847
* `param string` $message
818848

@@ -821,7 +851,9 @@ Asserts that a condition is not false.
821851

822852
#### assertNotInstanceOf
823853

824-
* `param string` $expected
854+
* `template` ExpectedType of object
855+
* `phpstan-assert` !ExpectedType $actual
856+
* `param class-string<ExpectedType>` $expected
825857
* `param mixed` $actual
826858
* `param string` $message
827859

@@ -830,6 +862,7 @@ Asserts that a variable is not of a given type.
830862

831863
#### assertNotNull
832864

865+
* `phpstan-assert` !null $actual
833866
* `param mixed` $actual
834867
* `param string` $message
835868

@@ -865,6 +898,7 @@ Assert that the size of two arrays (or `Countable` or `Traversable` objects) is
865898

866899
#### assertNotTrue
867900

901+
* `phpstan-assert` !true $condition
868902
* `param mixed` $condition
869903
* `param string` $message
870904

@@ -873,6 +907,7 @@ Asserts that a condition is not true.
873907

874908
#### assertNull
875909

910+
* `phpstan-assert` null $actual
876911
* `param mixed` $actual
877912
* `param string` $message
878913

@@ -908,12 +943,17 @@ Asserts that a string matches a given regular expression.
908943

909944
#### assertSame
910945

911-
* `param mixed` $expected
946+
* `template` ExpectedType
947+
* `phpstan-assert` =ExpectedType $actual
948+
* `param ExpectedType` $expected
912949
* `param mixed` $actual
913950
* `param string` $message
914951

915952
Asserts that two variables have the same type and value.
916953

954+
Used on objects, it asserts that two variables reference
955+
the same object.
956+
917957

918958
#### assertSameSize
919959

@@ -1098,6 +1138,7 @@ Evaluates a PHPUnit\Framework\Constraint matcher object.
10981138

10991139
#### assertTrue
11001140

1141+
* `phpstan-assert` true $condition
11011142
* `param mixed` $condition
11021143
* `param string` $message
11031144

0 commit comments

Comments
 (0)