Problem/Motivation

PHPStan 1.9.0 is out.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#4 3319112-4.patch2.3 KBlongwave
#2 3319112-2.patch3.7 KBlongwave

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new3.7 KB
mondrake’s picture

Status: Needs review » Needs work

1.9.1 is out already...

Also,

+++ b/composer.json
@@ -26,7 +26,7 @@
-        "phpstan/phpstan": "^1.8.11",
+        "phpstan/phpstan": "^1.9.0",

I do not think we need to bump the constraint if the baseline file remains unchanged.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new2.3 KB

Removed composer.json change, updated to 1.9.1.

longwave’s picture

Title: Update PHPStan to 1.9.0 » Update PHPStan to 1.9.1
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

lgtm

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: 3319112-4.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Reviewed & tested by the community

random fail?

  • catch committed ab7695d on 10.0.x
    Issue #3319112 by longwave, mondrake: Update PHPStan to 1.9.1
    
    (cherry...
  • catch committed cf3cf55 on 10.1.x
    Issue #3319112 by longwave, mondrake: Update PHPStan to 1.9.1
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!

catch’s picture

Status: Fixed » Needs work

Even though this commit itself went OK, I don't seem to be able to do a full phpstan run on 1.9.1, looks like this:

- ------------------------------------------------------------------------------------------------------------------ 
     Error                                                                                                             
 -- ------------------------------------------------------------------------------------------------------------------ 
     Internal error: Internal error: preg_match(): Argument #2 ($subject) must be of type string, array given in file  
     /home/catch/www/drupal/core/modules/path/tests/src/Functional/PathAliasTest.php                                   
  

(then a dozen or so similar errors).

If I roll back to the commit before this one, it's OK. If I run phpstan inside a ddev vm, it's also fine. I'm using stock Ubuntu LTS PHP 8.1 on my actual local cli, so I reckon it might be that.

Technically we don't support Ubuntu's stock PHP 8.1 install because it's 8.1.2, but #3307248: Special case Ubuntu PHP versions for some system_requirements() warnings would change that (which is, apart from laziness, why I kept running it), so re-opening in case there's something we need to do here.

catch’s picture

Talked with @alexpott, this is as far as we got:

Ubuntu LTS PHP 8.1.2 -


PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 10.39 2021-10-29
PCRE Unicode Version => 14.0.0
PCRE JIT Support => enabled
PCRE JIT Target => x86 64bit (little endian + unaligned)

My ddev container:

ddev:
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 10.40 2022-04-14
PCRE Unicode Version => 14.0.0
PCRE JIT Support => enabled
PCRE JIT Target => x86 64bit (little endian + unaligned)

Alex has no problems running phpstan, and his PCRE version is also 10.40, so maybe it's an issue with 10.39?

mondrake’s picture

Status: Needs work » Fixed

Sounds like #11 and #12 are oos here and hold this issue unnecessarily.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.