woocommerce-local-pickup-time
woocommerce-local-pickup-time copied to clipboard
[php] Update phpstan/phpstan 1.10.66 → 1.11.0 (minor)
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ phpstan/phpstan (1.10.66 → 1.11.0) · Repo · Changelog
Release Notes
1.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- 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- 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 (phpstan/phpstan-src@a647052), #10389
- Run missing type check on
@param-out(phpstan/phpstan-src@56b2002)- CallToConstructorStatementWithoutSideEffectsRule - report class with no constructor (phpstan/phpstan-src@b116d25)
- Deprecated: returning plain strings as errors, use RuleErrorBuilder
- Deprecated: returning RuleError without identifier (phpstan/phpstan-src@969e6fa)
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.neonOf 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 (phpstan/phpstan-src@9a3ed85)
- Deprecate
checkMissingIterableValueType: falseandcheckGenericClassInNonGenericObjectType: falsein favour of ignoring via identifiers (phpstan/phpstan-src@a649981)- Deprecate old NoopRule - replaced by BetterNoopRule in bleeding edge (phpstan/phpstan-src@1090835)
- Allow ignoring errors from CollectedDataNode with local comments (phpstan/phpstan-src@dc3b75a)
- 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 (phpstan/phpstan-src@d004c23)
- Stub validator - PhpParser classes are known without extra stubs (phpstan/phpstan-src@3e498e1)
- CheckstyleErrorFormatter - include error identifier in source attribute (phpstan/phpstan-src@f66cf5b), #1205
- BaselinePhpErrorFormatter - error identifiers in comments (phpstan/phpstan-src@4b32cac)
RuleErrorBuilder::file()- file path needs to exist (phpstan/phpstan-src@c453f29)- AbstractMethodInNonAbstractClassRule - better error message for enums (phpstan/phpstan-src@b5dd34e)
- 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 (phpstan/phpstan-src@cdaff5f)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 (phpstan/phpstan-src@59ac31a)- Process ConstFetch (phpstan/phpstan-src@b5c63c2)
- Fix
preg_match_allbehaviour with no flags (phpstan/phpstan-src@a856ec7)file_get_contentsis an impure function (phpstan/phpstan-src@2b5b317)- Fix
ClosureType::equals()(phpstan/phpstan-src@29c35b5)- Use statement result of analysed anonymous class to inform about throw points and impure points (phpstan/phpstan-src@70a75f6)
- 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 (phpstan/phpstan-src@26e949b)non-empty-listalways has offset 0 (phpstan/phpstan-src@f4d1d48)- 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 (phpstan/phpstan-src@c476a86)
- Delete StatementOrderVisitor that is no longer needed (phpstan/phpstan-src@017d321)
- Introduce
ClassReflection::getClassTypeDescription()(phpstan/phpstan-src@dec9e43)- 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 (phpstan/phpstan-src@e7ab4f7)
- 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 (phpstan/phpstan-src@d1834e6)
- 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 (phpstan/phpstan-src@38e2c96)
- Introduce LocalIgnoresProcessor (phpstan/phpstan-src@d026655)
- Introduce
RuleErrorBuilder::treatPhpDocTypesAsCertainTip()for a bit more DRYness (#3035), thanks @axlon!- Make ResultCacheEndToEndTest pass level 9 (#3055), #10977, thanks @AJenbo!
- ClassReflection - cache enum cases (phpstan/phpstan-src@39ce042), #10979
1.10.67
This is the last release, or one of the last releases, in 1.10.x series. The next one is going to be PHPStan 1.11, and it's going to be released at some point in May 2024.
Improvements 🔧
- Forbid PHPUnitPHAR prefixed classes (#3002), thanks @staabm!
- Improve error messages on unnamed parameters (#3010), #10814, thanks @takaram!
Bugfixes 🐛
- Improve
date()return types (#2888), #10468, #6613, thanks @zonuexe!- Default value null does not make promoted property type nullable (phpstan/phpstan-src@b2177e3), #9839
- Fix socket_select array types after call (phpstan/phpstan-src@24c5249), #10285
- Fix conditional types in PHPDocs from stubs for native functions (phpstan/phpstan-src@8ae0b28)
- Fix env int key problem (phpstan/phpstan-src@e606fbe), #10833
- Fix false positives about uninitialized properties (#2897), #10523, #10822, thanks @staabm!
- Incremented numeric-string should change to int/float (#2797), #10122, #10187, thanks @staabm!
- Do not generalize big array when combined with empty array (#3003), #10834, thanks @RobertMe!
- Fix string concatenation with benevolent union type (phpstan/phpstan-src@4a4c739), #10863
- Treat
get_defined_vars()as using constructor arguments (#3012), #10865, thanks @rvanvelzen!- Allow undefined variables passed into by-ref parameters only if the type is nullable (phpstan/phpstan-src@7f8f9cc, phpstan/phpstan-src@7961f7a), #1916
Function signature fixes 🤖
- More precise
gc_status()signature for PHP8.3+ (#2996), thanks @staabm!- Add object shape for
mysqli_result::fetch_fields(#3005), thanks @schlndh!Internals 🔍
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
- @depfu rebase
- Rebases against your default branch and redoes this update
- @depfu recreate
- Recreates this PR, overwriting any edits that you've made to it
- @depfu merge
- Merges this PR once your tests are passing and conflicts are resolved
- @depfu cancel merge
- Cancels automatic merging of this PR
- @depfu close
- Closes this PR and deletes the branch
- @depfu reopen
- Restores the branch and reopens this PR (if it's closed)
- @depfu pause
- Ignores all future updates for this dependency and closes this PR
- @depfu pause [minor|major]
- Ignores all future minor/major updates for this dependency and closes this PR
- @depfu resume
- Future versions of this dependency will create PRs again (leaves this PR as is)
Coverage report for commit: 4f95c56
File: clover.xml
Cover ┌─────────────────────────┐ Freq.
0% │ ███████████████████████ │ 100.0%
10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
80% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
90% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
100% │ ░░░░░░░░░░░░░░░░░░░░░░░ │ 0.0%
└─────────────────────────┘
*Legend:* █ = Current Distribution
Summary - Lines: - | Methods: -
| Files | Lines | Methods | Branches |
|---|---|---|---|
| /workspaces/woocommerce-local-pickup-time/admin | |||
| class-local-pickup-time-admin.php | - | - | 100.00% |
| /workspaces/woocommerce-local-pickup-time/admin/emails | |||
| class-wc-email-customer-ready-for-pickup-order.php | - | - | 100.00% |
| /workspaces/woocommerce-local-pickup-time/public | |||
| class-local-pickup-time.php | - | - | 100.00% |
:robot: comment via lucassabreu/comment-coverage-clover
Closed in favor of #233.