muglug
Repos
103
Followers
201
Following
3

A static analysis tool for finding errors in PHP applications

4920
539

A MySQL engine written in pure PHP

521
38

Events

muglug create tag v4.153.3
Created at 14 hours ago
delete branch
muglug delete branch muglug-small-fixes
Created at 14 hours ago
delete branch
muglug delete branch muglug-patch-1
Created at 14 hours ago
delete branch
muglug delete branch muglug-patch-2
Created at 14 hours ago

Make JSONObject name regex pcre2-compatible (#89)

Created at 14 hours ago
pull request closed
Make JSONObject name regex pcre2-compatible
Created at 14 hours ago
pull request opened
Make JSONObject name regex pcre2-compatible
Created at 15 hours ago
create branch
muglug create branch muglug-patch-2
Created at 15 hours ago
create branch
muglug create branch muglug-patch-1
Created at 15 hours ago

Update

Created at 1 day ago

Update

Created at 5 days ago

Update

Created at 1 week ago

Update

Created at 1 week ago

Update

Created at 1 week ago
Accessing a property on null currently emits a notice, not an error or exception

Please complete the information below:

Where is the problem?

4064: Accessing members on a nullable object

Accessing a property or a method on null will throw an exception.

What is the problem?

Accessing a property on null currently emits a "Notice"


Please don't change anything below this point.


  • Build ID: HHVM=HHVM-4.164.0:HSL=v4.108.1:2022-09-19T20:50:52+0000:1fa47f258c6b68f8ec01899aa82fd6ffa0957109
  • Page requested: /hack/silencing-errors/error-codes
  • Page requested at: Tue, 20 Sep 2022 15:40:28 +0000
  • Controller: GuidePageController
Created at 2 weeks ago

Update

Created at 2 weeks ago

Update

Created at 2 weeks ago
issue comment
Type hole when empty collection allowed to substitute for typed

Hmm — it wouldn't really be fixed for the Psalm users who rely on that never template comparison behaviour

Created at 3 weeks ago
issue comment
Bidirectional type narrowing for generic types (would close an obscure hole in type checking!)

The edge-case I was talking about is the false-negative I mention in the issue above. This issue also mentions a number of false-positives in PHPStan (some of which also appear in Psalm), but I wasn't talking about those. In a tool that has few of either, I see false-negatives as inherently more dangerous than false-positives.

Created at 3 weeks ago
issue comment
Bidirectional type narrowing for generic types (would close an obscure hole in type checking!)

I opened a duplicate issue in Psalm's repo: https://github.com/vimeo/psalm/issues/8482

Hack solves this with the solution I give there, but I'm hesitant to copy that implementation because the type hole is a pretty small edge-case.

Created at 3 weeks ago
opened issue
Type hole when empty collection allowed to substitute for typed

https://psalm.dev/r/20e884ad18

We encounter this issue because PHP does not allow the explicit specification of generic parameters e.g. new Collection<int>([])

The only way to detect this would be to create a type variable #1 for the type of $array.

$array = new Collection([]); // has type Collection<#1>

$this->ints = $array; // new constraint #1 ≤ int
$this->strings = $array; //  new constraint #1 ≤ string

At the end of the function body we would collect the constraints for #1 and where those constraints originated from, and realise that there's no way to satisfy those constraints, emitting an error to the user.

This analysis is a challenge to implement, and I don't really think it's worth it given how uncommon the problem area is. But it's definitely good to be aware of it all the same.

Created at 3 weeks ago
delete branch
muglug delete branch muglug-fix-mixed-type-hold
Created at 3 weeks ago

Fix mixed type hole when sending Foo to Foo (#8481)

  • Fix mixed type hole when sending Foo to Foo

  • Fix ifThisIs test

  • Suppress bugs highlighted with fix

  • Fix PHPDoc parsing

Created at 3 weeks ago
pull request closed
Fix mixed type hole when sending Foo<string> to Foo<mixed>

This fixes a minor type hole that allowed mixed and array-key to bypass variance checks.

Created at 3 weeks ago

Update baseline for both 4.x and master

Created at 3 weeks ago

Update tools

Merge branch '8.5' into 9.5

Merge branch '9.5'

Update tools

Merge branch '8.5' into 9.5

Merge branch '9.5'

Update Psalm baseline

Do not pass null to ReflectionClass::getMethods()

Update ChangeLog

Prepare release

Merge branch '8.5' into 9.5

PHPUnit 9.5 does not support PHP 7.2

Merge branch '9.5'

PHPUnit 10 does not support PHP 7.3

Update tools

Merge branch '8.5' into 9.5

Merge branch '9.5'

Do not use $this->fail()

Simplify

Merge branch '9.5'

Created at 3 weeks ago

Support PHP 7.1 in require-dev restriction

Created at 3 weeks ago

Ignore php-parser issue

Created at 3 weeks ago

Fix phpcs violations

Created at 3 weeks ago