Commit Graph
228 Commits
Author SHA1 Message Date
Jaapio d1c6c03eaa Fix issue with tag description end detection. 2025-04-13 21:16:25 +02:00
Jaapio d46c3297fb Fix compatibility issue with phpstan 2.0 parser
The phpstan 2.0 release contains a fix which resolves the existing bug
in the old parser that didn't take the whole description when it was
multiline. Now the workaround is disabled when using phpstan parser v2

Fixes #393
2024-12-07 10:35:23 +01:00
Jaapio d0e946cb14 Fix code style 2024-11-12 12:22:19 +01:00
Christian Flothmann 2a8b28d42a add support for phpstan/phpdoc-parser 2 2024-11-10 22:44:37 +01:00
Jaapio 0c70d2c566 Resolve notice on undefined index
fixes #384
2024-11-06 12:58:54 +01:00
Jaapio 54e10d44fc Add tests for new tags 2024-11-04 22:26:31 +01:00
Jaapio 2911a4807e Bump phpstan
Fixes a number of phpstan issues.
2024-11-04 21:17:08 +01:00
Jaapio 6a5a3b7748 Fix codestyle issues 2024-11-04 21:01:58 +01:00
Jaap van Otterdijk 6fc32d3738 Merge pull request #374 from GautierDele/5.x
 method parameter default value rendering
2024-11-04 20:47:47 +01:00
Gautier DELEGLISE 1ed543b248 🚨 assure backward compatibility 2024-11-04 08:24:17 +01:00
Gautier DELEGLISE f26d445de6 ♻️ revert get default value to string 2024-11-03 23:28:27 +01:00
Jaapio f985773245 Apply more strict type checking 2024-11-03 21:54:10 +01:00
Gautier DELEGLISE 2b2242d323 🐛 default value from phpstan 2024-11-01 17:33:39 +01:00
Gautier DELEGLISE 54f9b11a4c Update MethodParameterFactory.php 2024-10-31 10:05:00 +01:00
Gautier DELEGLISE 6a623a4829 🚸 code review 2024-10-30 21:49:01 +01:00
Gautier DELEGLISE 992c829bad ♻️ cover more default value cases 2024-10-28 10:28:22 +01:00
Gautier DELEGLISE 456d2b0be2 🐛 left side of ?? is not nullable 2024-10-27 12:20:56 +01:00
Gautier DELEGLISE 442a3d1dc8 ♻️ variable might not be defined 2024-10-27 12:17:33 +01:00
Gautier DELEGLISE fde2b5916d method parameter default value rendering 2024-10-26 23:49:53 +02:00
Jaapio 60741fe387 Fix unittests 2024-08-14 22:00:37 +02:00
Jaapio 3f5534f776 Remove abstract factory 2024-08-14 21:57:29 +02:00
Jaapio 06e5db2279 Fix code style issues 2024-08-14 21:52:41 +02:00
AhJ 47fea84af1 Add description 2024-07-27 18:07:00 +03:30
AhJ f17d98425c Seprate template-* tags 2024-07-27 18:06:52 +03:30
AhJ f93a6b70aa Register tags 2024-07-24 12:11:24 +03:30
AhJ cca538efed Add TemplateCovariant tag 2024-07-24 12:11:07 +03:30
AhJ 19b5535d39 Clean up 2024-07-24 12:10:58 +03:30
AhJ 3acbe24b17 Add Implements tags 2024-07-24 12:10:38 +03:30
AhJ f387e8faa9 Add Extends tags 2024-07-24 12:10:17 +03:30
AhJ a46da81e77 Add Template tag 2024-07-24 12:09:41 +03:30
AhJ 6908c99a87 Add mixin tag 2024-07-23 18:14:49 +03:30
AhJ a979495847 add doc 2024-07-16 21:25:04 +03:30
AhJ bbb6a02b91 Add implements 2024-07-16 21:19:04 +03:30
Viktor Szépe ab86695010 Fix typos 2024-05-21 06:10:59 +00:00
Jaapio 8c422ab43b Fix docblock tag descriptions
Newlines and whitespaces were not handled as before. This caused
issues for some users because our indent-recuction was broken.
The cause seems to be an upstream issue in phpstan parser which
is not resolved yet. But this work around post processing the tokens
helps us to make it work as before.
2024-05-21 07:50:53 +02:00
Jaapio 518be131c0 Bugfix: resolve issue with multiline descriptions
The phpstan parser is not consuming the full description when parsing
docblocks with a more complex description. For them it's mostlikely not an
issue as phpstan doesn't use the descriptions. But it will also parse
the descriptions into unexpected tags. This could be an advantage but is
not according to the phpdoc spec.

Our own tokenizer is already tokenizing the docblocks into the correct parts.
So all we needed to do is assume all remaining tokens in the phpstan ast belong
to the description. From there our own code is able to handle this as before in
v5.3.

fixes #365
2024-05-08 20:49:40 +02:00
Jaapio 64e172d8ae Added test for regression on invalid types 2024-04-09 23:09:05 +02:00
Jaapio edd5f67143 Be more strict about type definitions on param
Throw on invalid type definitions and unexpected type definitions.
Not all types resolved by phpstan's parser are valid for docblocks,
they might in a more complex type system but I do not see how these
types would ever apply to param tags.
2024-04-08 21:38:01 +02:00
Jaapio d3cbc396a9 Add extra deprecation 2024-03-20 22:07:56 +01:00
Jaapio fc9a2339f2 Implement fallback option for params without variable 2024-03-20 21:57:07 +01:00
Jaapio 98566f2504 Add typeless parameter support. 2024-03-12 22:49:26 +01:00
Jaapio c6d49fc451 Fix code style and bump to php 7.4 2024-03-12 22:28:53 +01:00
Aydin Hassan ae20798fde Fix rendering a description when it contains escaped characters and no tags 2023-10-11 14:57:53 +02:00
Jaapio 1f95f3b735 Codestyle fixes and static analysis 2022-11-11 14:24:45 +01:00
Jaapio 6a92bc3ce9 Remove type logic from this package 2022-11-11 12:30:14 +01:00
Jaapio d6e90a3238 Add callable parameter support 2022-11-04 15:43:05 +01:00
Jaapio 50bf16734e Add support for constant types.
phpstan supports contant definitions and expressions to
link to constants.
2022-11-04 11:21:53 +01:00
Jaapio 8d57d3da2d Add deprecation to getArguments 2022-10-28 22:43:02 +02:00
Jaapio 81553b535f Add default types to method tag arguments 2022-10-28 22:37:28 +02:00
Jaapio e4ac07bc40 Add method support 2022-10-28 22:25:08 +02:00