kkmuffme
93dc2219e0
fix bugs in tests
2024-01-15 10:11:22 +01:00
kkmuffme
f3543ca9ab
add the fix for empty() too and fix empty returning bool on true/false only cases hiding errors when functions called
2024-01-15 10:11:21 +01:00
Bruce Weirdan
01c19d94ba
Added a bunch of tests from referenced issues
2023-02-20 23:45:01 -04:00
Bruce Weirdan
ac86981a79
Revert " #7387 Add asserting non-empty-string by strlen"
...
This reverts commit 0ef7ec100a
.
2023-02-20 23:07:22 -04:00
Bruce Weirdan
fb65c79079
Fix newly discovered CS issues
2023-02-02 12:19:22 -04:00
Leo Viezens
7966fd574a
Merge branch 'master' into master
2023-01-30 15:38:29 +01:00
Jack Worman
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -06:00
Leo Viezens
0ef7ec100a
#7387 Add asserting non-empty-string by strlen
2022-12-16 17:04:01 +01:00
Jack Worman
643542346b
Add codesniffer rules and expand php-cs-fixer to bin and test
2022-12-14 13:29:09 -06:00
Matthew Brown
8d36bdc3ed
Make array shapes strict by default ( #8701 )
...
* Make array shapes strict by default
* Fix PSL tests
2022-11-11 20:14:21 -05:00
68a5511057
Merge remote-tracking branch 'origin/4.x' into HEAD
2022-11-08 10:25:04 +01:00
1986c8b4a8
Add support for strict arrays, fix type alias intersection, fix array_is_list assertion on non-lists ( #8395 )
...
* Immutable CodeLocation
* Remove excess clones
* Remove external clones
* Remove leftover clones
* Fix final clone issue
* Immutable storages
* Refactoring
* Fixes
* Fixes
* Fix
* Fix
* Fixes
* Simplify
* Fixes
* Fix
* Fixes
* Update
* Fix
* Cache global types
* Fix
* Update
* Update
* Fixes
* Fixes
* Refactor
* Fixes
* Fix
* Fix
* More caching
* Fix
* Fix
* Update
* Update
* Fix
* Fixes
* Update
* Refactor
* Update
* Fixes
* Break one more test
* Fix
* FIx
* Fix
* Fix
* Fix
* Fix
* Improve performance and readability
* Equivalent logic
* Fixes
* Revert
* Revert "Revert"
This reverts commit f9175100c8452c80559234200663fd4c4f4dd889.
* Fix
* Fix reference bug
* Make default TypeVisitor immutable
* Bugfix
* Remove clones
* Partial refactoring
* Refactoring
* Fixes
* Fix
* Fixes
* Fixes
* cs-fix
* Fix final bugs
* Add test
* Misc fixes
* Update
* Fixes
* Experiment with removing different property
* revert "Experiment with removing different property"
This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9.
* Uniform naming
* Uniform naming
* Hack hotfix
* Clean up $_FILES ref #8621
* Undo hack, try fixing properly
* Helper method
* Remove redundant call
* Partially fix bugs
* Cleanup
* Change defaults
* Fix bug
* Fix (?, hope this doesn't break anything else)
* cs-fix
* Review fixes
* Bugfix
* Bugfix
* Improve logic
* Add support for list{} and callable-list{} types, properly implement array_is_list assertions (fixes #8389 )
* Default to sealed arrays
* Fix array_merge bug
* Fixes
* Fix
* Sealed type checks
* Properly infer properties-of and get_object_vars on final classes
* Fix array_map zipping
* Fix tests
* Fixes
* Fixes
* Fix more stuff
* Recursively resolve type aliases
* Fix typo
* Fixes
* Fix array_is_list assertion on keyed array
* Add BC docs
* Fixes
* fix
* Update
* Update
* Update
* Update
* Seal arrays with count assertions
* Fix #8528
* Fix
* Update
* Improve sealed array foreach logic
* get_object_vars on template properties
* Fix sealed array assertion reconciler logic
* Improved reconciler
* Add tests
* Single source of truth for test types
* Fix tests
* Fixup tests
* Fixup tests
* Fixup tests
* Update
* Fix tests
* Fix tests
* Final fixes
* Fixes
* Use list syntax only when needed
* Fix tests
* Cs-fix
* Update docs
* Update docs
* Update docs
* Update docs
* Update docs
* Document missing types
* Update docs
* Improve class-string-map docs
* Update
* Update
* I love working on psalm :)
* Keep arrays unsealed by default
* Fixup tests
* Fix syntax mistake
* cs-fix
* Fix typo
* Re-import missing types
* Keep strict types only in return types
* argc/argv fixes
* argc/argv fixes
* Fix test
* Comment-out valinor code, pinging @romm pls merge https://github.com/CuyZ/Valinor/pull/246 so we can add valinor to the psalm docs :)
2022-11-05 22:34:42 +01:00
Maximilian Bösing
eb6bbfb3b5
qa: remove redundant check as !empty
already ensures that key
does not return null
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-10-17 20:38:34 +02:00
748a74bb2c
Merge remote-tracking branch 'origin/4.x' into HEAD
2022-10-16 13:41:27 +02:00
kkmuffme
5c39e66b15
fix tests
2022-09-15 19:38:51 +02:00
AndrolGenhald
285740a753
Merge branch '4.x'
2022-07-07 15:01:38 -05:00
AndrolGenhald
2559222f67
More interpolation and concatenation improvements.
2022-06-24 19:22:59 -05:00
Matthew Brown
0a81f8cd6c
Use objects, not strings, for assertions ( #7410 )
...
* Use objects, not strings, for assertions
* Remove unnecessary param
* Remove some unnecessary checks
* Fix bad find/replace
* Add note about assertions no longer stored as strings in UPGRADING.md
2022-01-20 17:33:06 -05:00
Matthew Brown
b49682a485
Simplify issue suppression in tests
2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys ( #7386 )
...
* Transformation that updates assertions
* Simplify transformation
* Ensure that all tests have keys
* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
Matt Brown
787c0f30d6
Fix #5784 - only real-asserted variables from context knowledge
...
Any assertions added in the addNestedAssertions method should not illegitimise current knowledge
2021-05-17 15:11:27 -05:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Matt Brown
7bd4d969a4
Ensure that strict empty handling always happens
2020-12-01 22:50:21 -05:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
92239add4d
Add some backwards-incompatible changes for 4.x
2020-08-30 11:44:14 -04:00
Tom Klingenberg
04b6dfdc5b
Fix PSR-4 deprecation notices on composer install ( #3959 )
...
Previously when checking out the repository and installing the source
package via `$ composer install` composer did spill deprecation notices for
four files not complying with the PSR-4 auto-loading standard.
This is a minor issue, composer install works and can be addressed by
fixing name-spaces (all of those three are in tests).
For the one function test, fixing the directory structure / dirname of the
(single) affected function test (fourth file).
2020-08-07 23:22:30 -04:00
ygottschalk
de2109234d
fixes wrong return type of key() #3838 ( #3839 )
...
* fixes wrong return type of key() #3838
fixed/added tests for key
* fixed test again
2020-07-20 04:49:36 -04:00
Brown
06ee1b71c7
Improve check for empty array
2020-07-15 09:49:30 -04:00
Brown
0ab163fd78
Skip dodgy tests
2020-07-15 01:53:31 -04:00
Matthew Brown
3559fdd6b3
Fix #2742 - prevent paradoxes in assert calls
2020-02-09 11:42:41 -05:00
Brown
7bad2042f8
Skip failing test
2020-02-06 18:45:03 -05:00
Brown
d5f71bf529
Localise template checks to class being tested
2020-02-06 16:38:45 -05:00
Matthew Brown
c87b19eeb0
Fix #2681 - no error after empty check on literal value
2020-01-23 22:26:49 -05:00
Matthew Brown
d7fdd9b179
Move more tests into appropriate directory
2019-12-07 13:38:06 -05:00