Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master from 5.x #10692

Closed
wants to merge 371 commits into from
Closed

Update master from 5.x #10692

wants to merge 371 commits into from

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Feb 11, 2024

  • Add stubs for Intl ext constants, NumberFormatter
  • Switch to amp v3
  • Fix syntax issue
  • Switch to 8.1
  • Fix e2e tests
  • Fix CI
  • Fixes
  • Remove psalm v6 deprecations
  • Remove TList leftovers
  • Remove leftovers
  • Fixes
  • Fix tests
  • cs-fix
  • Enable strict_types
  • Fix
  • Small fix
  • Increase minimum version
  • Fix scanning of intersection types
  • Small fix
  • Remove TaintedSql sink for PDOStatement related methods
  • Fixes
  • Apply code review remarks
  • Fix thread data merging
  • Fix
  • Remove mistakenly (?) ignored functions
  • Remove extremely strange logic
  • Fixes
  • Fixup
  • Fixup
  • Fixes
  • Fixes
  • Fix file references
  • Simplify
  • Simplify
  • Revert for now
  • Update BC notes
  • Update BCC Checks
  • Update UPGRADING.md
  • Fix
  • Merge
  • fix
  • cs-fix
  • Fixes
  • Fixup
  • Respect stubs in all cases
  • Removed trailing whitespace to follow code style
  • Show PHP version
  • Commit to trigger unit tests after switching the base branch from 5.x to master in the PR
  • Make TLiteralFloat::$value and TLiteralInt::$value typed
  • Added BC note
  • Update branch aliases
  • Xpath injection Xpath injection #10162
  • Fix tests
  • Document BC break
  • Backed enum value changed to Atomic instead of scalar int or strings
  • Changed name of the test
  • Document BC break
  • Enum case value null check instead of instanceof
  • Detect DoS by sleep DoS by sleep #10178
  • Introduce NonVariableReferenceReturn issue
  • Update shortcode
  • Hotfix for psalm warnings
  • Introduce DuplicateProperty issue
  • Test cases for DuplicateProperty issue
  • Test cases for DuplicateProperty issue for Trait
  • Remove TCallableArray and TCallableList
  • Improve destructured type of callable-array
  • Formatting
  • Update tests for new callable-array shape
  • Set ignoreInternalFunctionFalseReturn and ignoreInternalFunctionNullReturn to false by default
  • Add note to UPGRADING.md about ignoreInternalFunction(False|Null)Return defaulting to false
  • The function in a callable-array is a non-empty-string
  • Ignore internal null/false for unit test code
  • Fix falsable calls to getcwd in /tests
  • Fix falsable issues with ob_get_clean in tests
  • Fix issues with nullable preg_replace
  • Suppress PossiblyInvalidArrayAccess after preg_split
  • Fix falsable issue with phpversion
  • Fix falsable issues with json_encode
  • Fix falsable issues with ini_get/getopt
  • Fix falsable issues with base64_decode
  • Fix falsable issues with igbinary_serialize
  • Fix falsable issue with strtotime
  • Fix falsable return issues from array functions, reset/key/shift
  • Fix falsable issues with file i/o functions
  • Update baseline for remaining nullable/falsable issues
  • Rollback some changes
  • cs-fix
  • Fixes
  • Finalize all classes
  • Minor fix
  • Simplify
  • Add suppression and note
  • Strict types everywhere
  • Update baseline
  • Fix windows CI
  • Fixes
  • Fixes
  • Strict properties
  • cs-fix
  • One more type
  • Readonly
  • Revert due to reset() in getSingleAtomic
  • First pass
  • Revert tests
  • Fixes
  • Fix
  • More finalization
  • Fix
  • Fix
  • Fixes
  • Fix
  • Fix
  • Fix
  • Fix
  • Update
  • Fixup
  • Fix
  • Fix
  • Update
  • Fix
  • Fixes
  • Fix
  • Remove legacy code
  • Switch back to function JIT
  • Fixes
  • Fix
  • Fixup
  • Fixes
  • cs-fixes
  • cs-fixes
  • Update
  • cs-fix
  • More readonly props
  • Make more properties readonly
  • cs-fix
  • Revert
  • cs-fix
  • Fix
  • Fix
  • Fixes
  • Fix
  • cs-fix
  • Fixes
  • Fix
  • cs-fix
  • Fix
  • Fix
  • Combining a array value empty list with a non-empty list was returning a non-empty-list
  • Stub constants for ZipArchive from ext-zip
  • Add constants from SOAP extension to stub
  • Fix redundant PHP tag in SOAP stub
  • Allow enum cases to be global constants
  • Hotfix shepard build - see Psalm errors on the psalm@master repo when --threads < 4 #10342
  • Add progress for scanning stage
  • Allow (no-)seal-(properties|methods) without the psalm- prefix
  • Warn when an issue handler suppression is unused
  • Remove unused suppressions
  • Fix stub for RecursiveArrayIterator::getChildren
  • Use CommentAnalyzer::sanitizeDocblockType consistently
  • Fix for spaces after , in multiline docblock types
  • Fix parsing of class-string-map<T of Foo, T>
  • Suppress '@template T as' test failures
  • Skip inline docblocks like {@see ...}
  • Fix some stub docblocks that were thowing parse errors
  • Sanitize docblocks for psalm-check-type
  • Maintain loop start value after an increment
  • Correct decrement min/max ranges
  • Better reconciling of ++/-- operators in ints
  • Rework test as it was a false negative
  • Docblock psudo methods can be inherited via @mixin
  • A segment of progress was being output early as the startScanningFiles() method was not called before actually starting to scan files
  • Detect magic method signature mismatch on interfaces Fixes @method: return type is taken into account, but parameter types are not #5786
  • Only inherit docblock param type if they type was not expanded fixes this issue: https://psalm.dev/r/edaea88e00
  • Trigger ImplementedParamTypeMismatch if concrete implementation of magic method does not match the magic method signature Fixes Would expect MethodSignatureMismatch #3871
  • Don't inherit psuedo methods from parent if a concrete implementation exists Fixes MethodSignatureMismatch when extending class with variadic @method #4546
  • Warn if @method annotation contradicts concrete function Fixes [Enhancement] Emit an error when phpdoc is impossible  #5990
  • Fix failing tests with invalid code
  • Correct test min php version
  • Remove MixedInferredReturnType as the related issue is more accuratly reported by MixedReturnStatement
  • Allow type aliases for static variables Fixes UndefinedDocblockClass on applying type to static variable in a class method #3837
  • Doc typo
  • Fixes
  • Fix
  • Improve scanning progress output
  • Minor fixes
  • Test
  • Hotfix
  • cs-fix
  • Cleanup
  • Update baseline
  • Fix
  • Fix
  • Fix
  • Inherit conditional returns
  • TaintedExtract
  • Fix coding style
  • Tweak config
  • Fix parsing of array keys with @
  • Fixed docblock spacing in supported_annotations.md @psalm-internal example
  • Fix iteration over weakmaps
  • Fix
  • Fixes
  • Fixes
  • Fixup
  • Revert Method annotation fixes #10361
  • Patch
  • Cleanup
  • Update baseline
  • Ignore test issues bypassed by bypass-finals
  • Bump
  • Bump
  • cs-fix
  • Fixup
  • Fixup
  • Fixup
  • Fixup test
  • cs-fix
  • Try bumping PHP on windows CI
  • Try disabling opcache
  • Skip opcache on windows
  • Do not use JIT on windows
  • Let disable-extension also disable zend extensions
  • Remove unnecessary null type from initialized_methods Context property
  • Optimize ConfigFileTest slightly
  • Install php-parser 5.0
  • Type-checking actually completes
  • Address parser changes to Throw
  • Update CustomTraverser traverseNode method
  • Get inline assignment doc comment from statement
  • Add suppressions
  • Replace deprecated constants
  • Fix CheckTrivialExprVisitor for ClosureUse
  • Fix type for node attributes
  • Handle closure statements with docblocks
  • Handle closures passed as arguments with docblocks
  • Remove impossible handleExpression condition
  • Fix errors within php-parser
  • Fix errors in SimpleNameResolver
  • Remove unneeded pure suppressions
  • Handle reference assignments with @var
  • Remove unnecessary baseline suppression
  • Add missing strict_types
  • CS fix
  • Fixed test - Psalm now strips leading slash
  • Fix test on Windows
  • Update baseline
  • Suppress scanning output in CI

robchett and others added 30 commits October 9, 2023 18:04
…y-issue

Introduce `DuplicateProperty` issue
…nctionFalseReturn_by_default

Disable ignoreInternalFunction(False|Null)Return by default
…_TCallableList

Improved type of callable-array
@weirdan weirdan added the release:internal The PR will be included in 'Internal changes' section of the release notes label Feb 11, 2024
@weirdan weirdan requested review from danog and orklah February 11, 2024 03:33
Copy link

I found these snippets:

https://psalm.dev/r/edaea88e00
<?php

interface ObjectManager
{
    public function getClassMetadata(string $className): int;
}

/**
 * @method stdClass getClassMetadata(int $a)
 */
interface EntityManagerInterface extends ObjectManager
{
}


function (EntityManagerInterface $em): void
{
    $result = $em->getClassMetadata(stdClass::class);
    /** @psalm-trace $result */;
    $em->getClassMetadata('hello');
};
Psalm output (using commit 6b27a6d):

INFO: Trace - 19:32 - $result: stdClass

INFO: UnusedVariable - 18:5 - $result is never referenced or the value is not used

ERROR: ImplementedReturnTypeMismatch - 9:12 - The inherited return type 'int' for ObjectManager::getClassMetadata is different to the implemented return type for ObjectManager::getclassmetadata 'stdClass'

ERROR: ImplementedParamTypeMismatch - 9:12 - Argument 1 of EntityManagerInterface::getClassMetadata has wrong type 'int', expecting 'string' as defined by ObjectManager::getClassMetadata

@weirdan weirdan closed this Feb 11, 2024
@weirdan weirdan deleted the update-master branch February 11, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
9 participants