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

Merge release 3.16.1 into 3.17.x #79

Merged
merged 3 commits into from
Dec 3, 2022

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Dec 3, 2022

Release Notes for 3.16.1

3.16.x bugfix release (patch)

3.16.1

  • Total issues resolved: 0
  • Total pull requests resolved: 1
  • Total contributors: 1

Bug

Before this change, in following example, `@psalm-self-out` would delete inheritance
type information at runtime.
For example:

```php
class Foo implements ParentType {
    // ...
}

$foo = new Foo();

$foo->methodWithSelfOut();

/** @psalm-trace $foo */ // produces `ParentType`
```

This change corrects that, preserving `static` in the type information.
… type inference

Cases like following break completely with `@psalm-self-out`:

```php
$o = new ArrayObject(['foo' => 'bar']);

$o->baz = 'taz'; // `never` due to `'foo'&'bar'` not being possible
```

Rolling back the entire `psalm-self-out` improvement: too aggressive, and
not practically useful on these mutable data containers.
…ences

Dropping `@psalm-self-out` to avoid incorrect type inference in inheritance
@Ocramius Ocramius self-assigned this Dec 3, 2022
@Ocramius Ocramius added the Bug Something isn't working label Dec 3, 2022
@Ocramius Ocramius modified the milestones: 3.0.0, 3.17.0 Dec 3, 2022
@Ocramius Ocramius merged commit d484396 into 3.17.x Dec 3, 2022
@Ocramius Ocramius deleted the 3.16.x-merge-up-into-3.17.x_T0pV2HXO branch December 3, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant