Commit Graph

61 Commits

Author SHA1 Message Date
Bruce Weirdan
3452ea5d76
Fixes after psalm smoke tests
- More possibly-different handling
- Handle possibly-undefined offsets for dataset shapes
2019-02-23 16:11:53 +02:00
Bruce Weirdan
6025f28933
Fix empty union crash, clarify invalid provider message 2019-02-22 22:41:23 +02:00
Bruce Weirdan
4fe3c88aca
Tweak dead code detection on TestCase descendants
- Don't report TestCase descendants as unused
- Don't report test methods as unused
- Don't report providers referenced by test methods as unused

Refs psalm/phpunit-psalm-plugin#13

/cc @SignpostMarv
2019-02-20 13:19:11 +02:00
Bruce Weirdan
330b3a1ef6
Added getKeyValueParamsForTraversableObject proxy 2019-02-20 01:21:21 +02:00
Bruce Weirdan
6906f62cfa
Fixed reported type for invalid iterables 2019-02-20 00:52:07 +02:00
Bruce Weirdan
55ee7eabc7
Add new files/folders to phpcs check 2019-02-20 00:09:27 +02:00
Bruce Weirdan
17d8351c40
PHP 7.0 compatibility 2019-02-20 00:05:32 +02:00
Bruce Weirdan
62d7bcffa4
Bump psalm version due to missing functionality
Breaking change: plugin now requires psalm 3.0.13+ (TIterable was made
generic in that version)
2019-02-20 00:03:06 +02:00
Bruce Weirdan
8732175020
Implemented provider type checks
- Invalid providers (should be iterable with array elements)
- Providers returning fewer arguments then test requires
- Providers returning datasets that are incompatible with test
signatures

refs psalm/phpunit-psalm-plugin#13
2019-02-19 22:58:56 +02:00
Bruce Weirdan
d9277bb993
Bumped Psalm version to 3.0.10
Breaking change: minimum psalm version is now 3.0.10 (due to the hook
interface added in that version)

Also fixed test to be compatible with legacy PHPUnit
2019-02-18 18:16:13 +02:00
Bruce Weirdan
ab2a87ee3c
Check for missing dataProviders 2019-02-18 17:51:21 +02:00
Bruce Weirdan
91ab7883bf
Update to weirdan/codeception-psalm-module 0.2.1 2019-02-18 16:19:30 +02:00
Matthew Brown
949e3b235d
Merge pull request #14 from weirdan/suppress-missing-constructor
Suppress missing constructor for TestCase descendants
2019-02-17 21:38:11 -05:00
Bruce Weirdan
839b82b9a9
PHP 7.0 compatibility 2019-02-17 08:46:13 +02:00
Bruce Weirdan
f5ddd1dffb
Suppress missing constructor for TestCase descendants
When there are any initializers (`setUp` or `@before`) it's quite likely
properties were initialized there. As a followup development, we may
later implement more fine-grained checks to see what actually been
initialized in those methods.
2019-02-17 08:28:22 +02:00
Bruce Weirdan
af65a1095a
Merge pull request #12 from weirdan/typed-expectException
Stubbed expectException()
2019-02-16 19:16:01 +02:00
Bruce Weirdan
8b77d0c231
Bump Psalm version (because of false positives) 2019-02-14 14:03:11 +02:00
Bruce Weirdan
e081131e4c
Skip test when running with older Psalm 2019-02-14 13:48:46 +02:00
Bruce Weirdan
6a2552a210
Bump PHPunit version
The stubs we're providing are for namespace version of PHPUnit classes,
and those are only available since PHPUnit 6.0
2019-02-14 13:45:18 +02:00
Bruce Weirdan
8b0805670e
Limit expectException()'s argument to throwables 2019-02-14 13:12:40 +02:00
Bruce Weirdan
707b2472ba
Merge pull request #11 from SignpostMarv/fix/void-is-reserved-word
Fix/void is reserved word
2019-02-14 07:10:52 +02:00
Bruce Weirdan
6fedf0633c
depend on stable version of codeception module 2019-02-14 07:01:11 +02:00
SignpostMarv
3af740709d void is a reserved word 2019-02-13 21:03:21 +00:00
SignpostMarv
a7c87a2d09 stripping trailing whitespace 2019-02-13 21:01:58 +00:00
SignpostMarv
3510eef962 before making change re: void is a reserved word, set package to be tested in the same environments as psalm in case anything else crops up 2019-02-13 20:54:38 +00:00
Bruce Weirdan
74215dc546
Merge pull request #10 from weirdan/7.5-features
Added PHPUnit 7.5 assertions
2019-02-11 09:24:18 +02:00
Bruce Weirdan
326d288d51
Show psalm version during build 2019-02-11 05:46:15 +02:00
Bruce Weirdan
bc9d452c27
Test for Assert::assertIsNotCallable() 2019-02-11 05:31:17 +02:00
Bruce Weirdan
2f2ff0374f
Added PHPUnit 7.5 assertions 2019-02-11 05:31:13 +02:00
Bruce Weirdan
34164fbbb5
Merge pull request #9 from weirdan/tests
Testing infrastructure
2019-02-11 05:26:15 +02:00
Bruce Weirdan
2d8f6443d5
install, then update
This appears to be a problem with composer update (solver)
2019-02-09 09:57:59 +02:00
Bruce Weirdan
854918db89
Ignore support files in Psalm 2019-02-09 09:32:17 +02:00
Bruce Weirdan
6e0f0643d6
Added test infrastructure
- Added Codeception scaffolding
- Added travis config
- Added example test
2019-02-09 09:20:40 +02:00
Bruce Weirdan
1284e51d3c
bumped squizlabs/php_codesniffer to prevent continue 2 errors 2019-02-09 09:15:24 +02:00
Bruce Weirdan
e303d00a3f
added travis config 2019-02-09 09:05:05 +02:00
Matthew Brown
65b5b19c95
Remove @template-typeof annotations 2019-01-14 12:17:35 -05:00
Matthew Brown
3e99b8775a
Widen inputs 2019-01-08 14:09:49 -05:00
Bruce Weirdan
0fd0b47765
added missing use 2018-12-10 13:02:12 +02:00
Matthew Brown
059684417f
Merge pull request #4 from weirdan/prophecy-support
Prophecy support
2018-12-08 17:55:26 -05:00
Bruce Weirdan
ef91c747fe
Added Prophecy support 2018-12-09 00:26:47 +02:00
Bruce Weirdan
18ffce8944
fixed composer check
- Dropped `tests` folder references (tests are not there)
- Dropped `@test` reference from `composer check` (phpunit is not
depended on, tests are absent)
- Ignored `stubs` folder (cannot really be checked by psalm) in
`psalm.xml`
2018-12-09 00:24:35 +02:00
Matthew Brown
41be62b689
Allow Psalm plugin to be run with dev-master 2018-12-08 11:53:51 -05:00
Matthew Brown
9db3b253bb
Merge pull request #3 from weirdan/method-signature
Method() signature
2018-12-01 10:02:38 -05:00
Bruce Weirdan
4605575b4d
method() returns InvocationMocker and dropped methods that are not actually present on MockObject 2018-12-01 05:10:20 +02:00
Bruce Weirdan
dfa9f71542
tabs to spaces (as declared by phpcs rules) 2018-12-01 05:09:47 +02:00
Matthew Brown
f24b5d529c
Add a short readme 2018-11-28 00:35:52 -05:00
Matthew Brown
5fd3db0c48 Add support for better mocking 2018-11-25 01:40:30 -05:00
Matthew Brown
0c8386711c Improve mocking support 2018-11-24 18:27:52 -05:00
Matthew Brown
ff427489f0
Add back Psalm requirement 2018-11-18 22:18:42 -05:00
Matthew Brown
1128beac05
Remove Psalm dev-master requirement for now 2018-11-18 17:38:10 -05:00