deps(deps): update phpstan packages
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| phpstan/phpstan | 1.10.67 -> 1.11.1 |
||||
| phpstan/phpstan-deprecation-rules | 1.1.4 -> 1.2.0 |
||||
| phpstan/phpstan-phpunit | 1.3.16 -> 1.4.0 |
||||
| phpstan/phpstan-strict-rules | 1.5.5 -> 1.6.0 |
Release Notes
phpstan/phpstan (phpstan/phpstan)
v1.11.1
Improvements 🔧
Bugfixes 🐛
- Do not complain about
impure(Function|Method).pureif it has@phpstan-asserttags (https://github.com/phpstan/phpstan-src/commit/9544f8a6b52dbd6068800bbfc5bdaf67fe04a8c2) - Remove tip about deprecated config option (https://github.com/phpstan/phpstan-src/commit/d603c7b676e3b91f4b7ba81d46aee3e9a593f883), #11000
- Fix false positive with
reportPossiblyNonexistentConstantArrayOffset: true(https://github.com/phpstan/phpstan-src/commit/5277630459518024b16272bf6b6fd216eb3d10ed), #10997 - Fix parent keyword case sensitivity (#3064), thanks @staabm!
- InlineHTML is an impure point (#3072), thanks @staabm!
- UnionTypeHelper - prevent infinite recursion (https://github.com/phpstan/phpstan-src/commit/bb3da26d562727c3122a344622059ded2239d6ab), #11027
- Fix more potential for infinite recursion (https://github.com/phpstan/phpstan-src/commit/1d02c4f27684644e8361cf2a2bc5713adef9b95e)
- RangeFunctionReturnTypeExtension - fix internal ValueError (https://github.com/phpstan/phpstan-src/commit/fe3895ada98940d1a71c2eb115d61afda9fd7a2c), #11026
- Property unset is an impure point (https://github.com/phpstan/phpstan-src/commit/702ddcd7805ba08c0765bdf0930beaef0e6b4fc1), #11001
- Fix property assign not being an impure point in arrow function (https://github.com/phpstan/phpstan-src/commit/35ff6895f48b74e8bc0dda7ec94c40e73c84099b), #11001
- Fix internal error when accessing enum case by class-string (https://github.com/phpstan/phpstan-src/commit/1116e03389f0f47297c2638b5b67c84f4d339478), #10985
- Fix resolving
selfandstaticin@phpstan-closure-thisfrom trait stub file (https://github.com/phpstan/phpstan-src/commit/93402494ee92dd2e7264f112105151586203e0ec), #11009 - CallToMethodStatementWithoutImpurePointsRule - fix for methods called on unions (https://github.com/phpstan/phpstan-src/commit/ee33f1e48b5ae9d6e99500814c186cd31e7a764f), #11011
Function signature fixes 🤖
- Offset
uriinstream_get_meta_datacalls is always present on PHP 8.3+ (https://github.com/phpstan/phpstan-src/commit/885d46bc8d7555a8b762914821ad2f0f5871e517), #11024, #10999
v1.11.0
Read the article about PHPStan 1.11 on phpstan.org »
Major new features 🚀
- Error identifiers
- A way to categorize reported errors by a stable identifier. Up until now you had to use specific and ever-changing error messages
- Can be used for ignoring specific errors locally with new
@phpstan-ignorecomment (uses current or next line automatically) - Can be used for ignoring specific errors in
ignoreErrorssection of your configuration file (phpstan.neon) - Can be used in output formatters
- Can be seen in PHPStan Pro GUI or in TableErrorFormatter with
-v - Catalogue with source code links: https://phpstan.org/error-identifiers
- PHPStan Pro Reboot
- A new migration wizard will effortlessly migrate all your
@phpstan-ignore-lineand@phpstan-ignore-next-lineto the new@phpstan-ignorecomment style with error identifiers. The old comment style is dangerous because it ignores all errors, current and future, on that line. - Revamped UI for much more comfortable viewing and browsing of reported errors
- The new UI also lets you browse ignored errors, from
ignoreErrors, from your baseline and also ignored locally in source code using comments - Streaming errors during launch: You don't have to wait for the analysis to complete, you can see errors as they come in during the analysis
- Support for mapping file paths to the host filesystem when running in Docker or remotely
- Try it out by running PHPStan with
--proCLI option
- A new migration wizard will effortlessly migrate all your
- PHPDoc tags describing callable lifecycle:
@param-immediately-invoked-callable,@param-later-invoked-callable- Useful for exception analysis (https://phpstan.org/blog/bring-your-exceptions-under-control) and
@phpstan-pure
- Useful for exception analysis (https://phpstan.org/blog/bring-your-exceptions-under-control) and
- PHPDoc tag
@param-closure-thisto describe what$thisis bound to in a passed closure - Two new config options around stricter offset checks in arrays (#3028), #7553, thanks @ttomdewit!
reportPossiblyNonexistentGeneralArrayOffsetreportPossiblyNonexistentConstantArrayOffset- Learn more in the documentation
Bleeding edge 🔪
- Checking truthiness of
@phpstan-pureabove functions and methods - Check
new/function call/method call/static method call on a separate line without any side effects even without@phpstan-purePHPDoc tag on the declaration side - BetterNoopRule - take advantage of impure points (https://github.com/phpstan/phpstan-src/commit/a6470521b65d7424f552633c1f3827704c6262c3), #10389
- Run missing type check on
@param-out(https://github.com/phpstan/phpstan-src/commit/56b20024386d983927c64dfa895ff026bed2798c) - CallToConstructorStatementWithoutSideEffectsRule - report class with no constructor (https://github.com/phpstan/phpstan-src/commit/b116d25a6e4ba6c09f59af6569d9e6f6fd20aff4)
- Deprecated: returning plain strings as errors, use RuleErrorBuilder
- Deprecated: returning RuleError without identifier (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd)
If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more
Improvements 🔧
- Generic RuleErrorBuilder (https://github.com/phpstan/phpstan-src/commit/9a3ed85178097e2d74f27623dd02bdd72c571e5b)
- Deprecate
checkMissingIterableValueType: falseandcheckGenericClassInNonGenericObjectType: falsein favour of ignoring via identifiers (https://github.com/phpstan/phpstan-src/commit/a64998108b318581b0203e84582711c3e4d1e43c) - Deprecate old NoopRule - replaced by BetterNoopRule in bleeding edge (https://github.com/phpstan/phpstan-src/commit/109083571de6102cb854b9975c1463551ef678d0)
- Allow ignoring errors from CollectedDataNode with local comments (https://github.com/phpstan/phpstan-src/commit/dc3b75ab4a2acd863405416620240302b284973a)
- Introduce
newtype (#3050), #9704, thanks @ruudk! - RuleTestCase - fail on PHP warnings, notices etc. (#3030), thanks @janedbal!
- Check duplicate assignment of redeclared promoted readonly properties (#3049), #8101, #9863, #9864, thanks @schlndh!
- Remove line from "nikic/php-parser" error message (#2845), thanks @mvorisek!
- Stub validator - PHPStan classes are known without extra stubs (https://github.com/phpstan/phpstan-src/commit/d004c239677fb7abe41aa16e8e1b45bfac63f773)
- Stub validator - PhpParser classes are known without extra stubs (https://github.com/phpstan/phpstan-src/commit/3e498e1592221f3a01527c10318424014d52f85d)
- CheckstyleErrorFormatter - include error identifier in source attribute (https://github.com/phpstan/phpstan-src/commit/f66cf5badd2c98317d1d296ba24c3be77efcda18), #1205
- BaselinePhpErrorFormatter - error identifiers in comments (https://github.com/phpstan/phpstan-src/commit/4b32cac2d1b98c6af65c07041fdbc64e5d3f3baf)
RuleErrorBuilder::file()- file path needs to exist (https://github.com/phpstan/phpstan-src/commit/c453f29f60992167a5aa46d4926c18a420ae7b26)- AbstractMethodInNonAbstractClassRule - better error message for enums (https://github.com/phpstan/phpstan-src/commit/b5dd34e492b03566458e98b314c6852cfd683916)
- Fixed Xdebug spelling (#2746), thanks @derickr!
- Track invalidated
$thisand used variables after invoking closure (#2980) - Support
@phan-prefixes on recognized PHPDoc tags (#3000), thanks @anomiex! pure-callableandpure-ClosurePHPDoc types (https://github.com/phpstan/phpstan-src/commit/cdaff5f00d621c3a94e048b8bd9fa864d47b3228)highlight_string()flips side-effects depending on $return (#3021), thanks @staabm!- Improve types for predefined constants (#3054), thanks @zonuexe!
Bugfixes 🐛
- Make
AccessoryNonFalsyStringType::toInteger()returnIntegerTypeinstead of non-zero (#3018), #10893, thanks @zonuexe! - Filter scope by non-empty array after foreach regardless of
polluteScopeWithAlwaysIterableForeach(#3029), #10922, thanks @VincentLanglet! - Preserve large arrays with same keys through union (#3032), #9397, #10080, thanks @schlndh!
- Fix
count($x) > $n === truenegation (#3037), #10952, thanks @rvanvelzen! - Fix NAN not accepting NAN (#3036), #10956, #10297, thanks @rvanvelzen!
- DateTimeInstantiationRule - fix error message for
newwith wrong name case (https://github.com/phpstan/phpstan-src/commit/59ac31a554203a7ae3fb9449bbd5b61f3afe2e20) - Process ConstFetch (https://github.com/phpstan/phpstan-src/commit/b5c63c296783bd067b14bad410dab2b87a1b7b3c)
- Fix
preg_match_allbehaviour with no flags (https://github.com/phpstan/phpstan-src/commit/a856ec7ab5540cb4a8d30e9e170958a32a7165b2) file_get_contentsis an impure function (https://github.com/phpstan/phpstan-src/commit/2b5b3174c7f00e56b7692b4c26552b2ad13c73d5)- Fix
ClosureType::equals()(https://github.com/phpstan/phpstan-src/commit/29c35b584a948e9a3c90e2d56312069ce073e6e6) - Use statement result of analysed anonymous class to inform about throw points and impure points (https://github.com/phpstan/phpstan-src/commit/70a75f68896e5f7eaa988c0cb7f20dad32c3c172)
- Filter out implicit throw points from callables when
exceptions.implicitThrows: false(#3016), thanks @janedbal! - Fix
ConstantArrayType::hasOffsetValueType()for offset union type where all types are valid (https://github.com/phpstan/phpstan-src/commit/26e949b0d093751c98e9a106f680092abf3b28d9) non-empty-listalways has offset 0 (https://github.com/phpstan/phpstan-src/commit/f4d1d481472b45c56ba2cd49ae98065092217f36)- Narrow to
non-empty-string/non-falsey-stringaftermb_strlen()(#3038), thanks @staabm! - Implement
Type::isOffsetAccessLegal()to detect offset access that crashes even inisset()(#3045), #8393, #10926, thanks @rajyan! - Specify types on
match()condition correctly (#3053), #10974, #9694, thanks @rvanvelzen! json_decodewith force array flag: subtract all objects, not just stdClass (#3052), thanks @rajyan!- Fix
strlen($x) > $n === truenegation (#3040), thanks @staabm! - Support multi-byte string function variants (#3039), thanks @staabm!
- Final scope from
Continue_points should not be used forwhile (true)(#3057), #10980, thanks @greew! - Fix enum performance problem (#3062, #3060), #10979, thanks @staabm!
- NULL and null as a property default value are treated differently when overriding a parent property (#3063), #10987, thanks @staabm!
Function signature fixes 🤖
- Make the url key of metadata returned by
stream_get_meta_data()optional (#3024), #10887, thanks @hirokinoue! - Narrow
Closure::bind$newScopeparam (#2817), thanks @mvorisek! - Infer object type mysqli_fetch_object (#2675) (#2675), thanks @staabm!
- Fix
Imagick::identifyImage()return type (#3017), thanks @SVillette!
Internals 🔍
- Clean up old identifiers and metadata (https://github.com/phpstan/phpstan-src/commit/c476a8611d06ed5ce850ba74bd087ed0fa9304ad)
- Delete StatementOrderVisitor that is no longer needed (https://github.com/phpstan/phpstan-src/commit/017d321f47b2a49c11b0337a920235b0770da164)
- Introduce
ClassReflection::getClassTypeDescription()(https://github.com/phpstan/phpstan-src/commit/dec9e435a7e0cea96079eb08c799df6b49b92e82) - Fix classname typo in tests (#2461), thanks @szepeviktor!
- Fix various typos (#2463), thanks @szepeviktor!
- Added text regarding patch issues during installation (#2670), thanks @mt-satak!
- Fix typo in ArgumentsNormalizer (#2705), thanks @mad-briller!
- Rich PHPDoc for ExceptionTypeResolver (https://github.com/phpstan/phpstan-src/commit/e7ab4f741c0ec22cf70457c7a542b7978202b10a)
- Hide internal commands (#2833), thanks @rvanvelzen!
- Test invalidated object in static closure (#2981), thanks @staabm!
- PHPDoc: address multiple variables defined in one @param (#3001), thanks @Muqsit!
- Do not assume every contributor uses PhpStorm (https://github.com/phpstan/phpstan-src/commit/d1834e69d06e0f85a45db8f5fb7a2c5a6ce898b6)
- TypeInferenceTestCase: ability to disable implicit throws (#3015), thanks @janedbal!
- Slightly reduce comparing and calling methods for trivial optimizations (#3004), #10926, thanks @zonuexe!
- AnalyserResultFinalizer - DRY of running CollectedDataNode rules (https://github.com/phpstan/phpstan-src/commit/38e2c96ee45733c8d3b44d048ce27a9b5450718e)
- Introduce LocalIgnoresProcessor (https://github.com/phpstan/phpstan-src/commit/d026655260727c7c6e4cd69d50d57569e9128c13)
- Introduce
RuleErrorBuilder::treatPhpDocTypesAsCertainTip()for a bit more DRYness (#3035), thanks @axlon! - Make ResultCacheEndToEndTest pass level 9 (#3055), #10977, thanks @AJenbo!
- ClassReflection - cache enum cases (https://github.com/phpstan/phpstan-src/commit/39ce0425737cdbacfee5fbc08160d023cb5bc639), #10979
phpstan/phpstan-deprecation-rules (phpstan/phpstan-deprecation-rules)
v1.2.0
- fa8cce7 - Update lock-closed-issues.yml
- 8342041 - Merge remote-tracking branch 'origin/1.1.x' into 1.2.x
- d457b73 - Update PHPStan version
- ff4f00f - Update FetchingDeprecatedConstRuleTest.php
- 437ac71 - Fix build
- e9ea332 - Update metcalfc/changelog-generator action to v4.3.1
- f71dbf6 - Update cbrgm/mastodon-github-action action to v2
- 10f0e35 - Merge branch '1.1.x' into 1.2.x
- 674d785 - Fix build
- e7fe22b - Update metcalfc/changelog-generator action to v4.2.0
- 83345f7 - Update dessant/lock-threads action to v5
- 788ea1b - remove phpstan/phpstan-php-parser
- 4175e8a - Update actions/checkout action to v4
- f1cacde - Fix a typo
- 1884f9f - Next-gen coding standard workflow
- 2313a63 - Modernize rules to use RuleErrorBuilder and report error identifiers
- ca9e4fd - Open 1.2.x-dev
phpstan/phpstan-phpunit (phpstan/phpstan-phpunit)
v1.4.0
- f3ea021 - Update lock-closed-issues.yml
- f93aec7 - Merge remote-tracking branch 'origin/1.3.x' into 1.4.x
- 77bdf96 - Update metcalfc/changelog-generator action to v4.3.1
- 6a1df9a - Update cbrgm/mastodon-github-action action to v2
- e95a58b - Update metcalfc/changelog-generator action to v4.2.0
- 77345df - Update dessant/lock-threads action to v5
- 99bb21e - Merge branch '1.3.x' into 1.4.x
- ac8ea99 - Update actions/checkout action to v4
- 529f300 - Merge branch '1.3.x' into 1.4.x
- 62e883e - Open 1.4.x-dev
- 97ec1d3 - Merge branch '1.3.x' into 1.4.x
- 4d99a7d - Require PHPStan 1.11
- 908e232 - Error identifiers
phpstan/phpstan-strict-rules (phpstan/phpstan-strict-rules)
v1.6.0
- 363f921 - Update lock-closed-issues.yml
- bd4fada - Merge remote-tracking branch 'origin/1.5.x' into 1.6.x
- c7b4d28 - Merge remote-tracking branch 'origin/1.5.x' into 1.6.x
- 1a51fae - Merge remote-tracking branch 'origin/1.5.x' into 1.6.x
- b5233d5 - Fix build
- d0dc2f0 - Update README.md
- 85fdc50 - Merge remote-tracking branch 'origin/1.5.x' into 1.6.x
- 3d0ba5f - Merge remote-tracking branch 'origin/1.5.x' into 1.6.x
- 3d33475 - Fix UselessCastRuleTest.
- 2bc3967 - Update metcalfc/changelog-generator action to v4.3.1
- 5981dc4 - Update cbrgm/mastodon-github-action action to v2
- 2090cfc - Update metcalfc/changelog-generator action to v4.2.0
- 1b125fb - Update dessant/lock-threads action to v5
- a3b0404 - Merge branch '1.5.x' into 1.6.x
- 3a67365 - Merge branch '1.5.x' into 1.6.x
- 50aab8d - Open 1.6.x-dev
- aeaa022 - Update actions/checkout action to v4
- b7edb14 - Rename abstract OperandInArithmeticIncrementOrDecrementRuleTest
- 88e714c - BooleanInBooleanAndRule, BooleanInBooleanOrRule - different identifier and description for logical operators
- 477f53a - Error identifiers
- 872bc91 - Removed some errors from RequireParentConstructCallRule - already reported by PHPStan core
- bd3aa8b - Modernized rules with generics and RuleErrorBuilder
- cca41e8 - Require PHPStan 1.11
- 5c143aa - Next-gen coding standard workflow
- a1891b4 - Update dependency slevomat/coding-standard to v8.12.0
- fa91928 - Update dependency slevomat/coding-standard to v8.11.1
- 1b9b85f - Update dependency slevomat/coding-standard to v8.11.0
- 35fda6c - Update dependency slevomat/coding-standard to v8.10.0
- ce264e3 - Update build-cs
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| laravel-cycle-orm-adapter | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 29, 2024 7:44pm |
[!IMPORTANT]
Review Skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.94%. Comparing base (
bd87368) to head (f48b034).
Additional details and impacted files
@@ Coverage Diff @@
## master #724 +/- ##
=========================================
Coverage 75.94% 75.94%
Complexity 252 252
=========================================
Files 46 46
Lines 927 927
=========================================
Hits 704 704
Misses 223 223
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.