Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1287 commits
Select commit Hold shift + click to select a range
1d8b2eb
Nullable union template type bound is actually supported
ondrejmirtes Jan 30, 2022
a07dc81
Regression test
ondrejmirtes Jan 30, 2022
f05e8eb
Fix reporting nonexistent offset in isset()
ondrejmirtes Jan 30, 2022
77e5d81
Fix
ondrejmirtes Jan 30, 2022
21947ff
Regression test
ondrejmirtes Jan 30, 2022
f8af5dc
Fix interaction between template type and intersection type
arnaud-lb Jan 28, 2022
6315635
Regression test
ondrejmirtes Jan 30, 2022
d92d616
Fix
ondrejmirtes Jan 30, 2022
01a0d58
Resolve remaining predefined constants
herndlm Sep 29, 2021
da80c29
Ignore false-positive int overflow errors occurring only on 32-bit
herndlm Jan 29, 2022
855a4ab
Add DatePeriod dynamic return type
Alban-io Jan 30, 2022
2731791
Fix DatePeriod extension
ondrejmirtes Jan 30, 2022
5cf5b9b
Fix PHPStan
ondrejmirtes Jan 31, 2022
3b17acc
Fix resolving type of isset(), empty() and null coalesce operator (??)
ondrejmirtes Jan 30, 2022
fe26263
ConstantConditionRuleHelper - do not report empty(), it has a separat…
ondrejmirtes Jan 31, 2022
edc1e71
Fix tests
ondrejmirtes Jan 31, 2022
c17a331
Regression tests
ondrejmirtes Jan 31, 2022
d96e8f0
AnalyseApplication: Do not re-analyse stubs on every run
dktapps Oct 23, 2021
a1abfc3
Stub errors cannot be ignored
ondrejmirtes Jan 31, 2022
c013219
More precise `array_chunk` signature
staabm Jan 31, 2022
ef39c54
loop optimization
ging-dev Nov 6, 2021
64d7ac8
Narrow the type for the `preg_replace_callback()` callable.
johnbillion Nov 6, 2021
5d17b84
Cast PHPDoc array key type with array key casting rules
ondrejmirtes Jan 31, 2022
377df9b
Fix CS
ondrejmirtes Jan 31, 2022
39a5313
Fix test
ondrejmirtes Jan 31, 2022
fcfe9b9
Fix 4949, support closure bind with class-string
mvorisek Oct 13, 2021
1361afa
Fix tests
arnaud-lb Jan 31, 2022
1ec1c91
Update return types for hash functions
jlherren Jan 21, 2022
fe3a341
Fix NeverType::toBoolean()
ondrejmirtes Feb 1, 2022
13e1257
Fix type for `array_splice()` argument `$replacement`
spawnia Jan 2, 2022
34587e5
stream_bucket_new returns an object
mind-bending-forks Feb 1, 2022
1789915
Support narrowing down array_filter return type via string callable
herndlm Jan 22, 2022
0c82b3a
Fix DatePeriod constructor extension in subclasses
ondrejmirtes Feb 1, 2022
115a5f5
Fix test
ondrejmirtes Feb 1, 2022
cd289bd
Regression test
staabm Jan 6, 2022
af38f03
Forget remembered specific type when entering arrow function with sam…
ondrejmirtes Feb 1, 2022
82e98da
More precise signatures for mb_* functions
staabm Feb 1, 2022
b833073
fix build on php 7.4
staabm Feb 1, 2022
28179f2
Fix array_column() with null as $column_key
jlherren Feb 1, 2022
9f12f0f
Fixed level 9 issues
ondrejmirtes Feb 1, 2022
6284d4e
Fix
ondrejmirtes Feb 1, 2022
d101764
Fix segfault
ondrejmirtes Feb 1, 2022
0213639
Add renovate.json
renovate-bot Feb 1, 2022
706f45e
Update renovate.json
ondrejmirtes Feb 2, 2022
c5723d2
Update renovate.json
ondrejmirtes Feb 2, 2022
dfdbb76
Rename renovate.json to .github/renovate.json
ondrejmirtes Feb 2, 2022
cb8646d
Delete dependabot.yml
ondrejmirtes Feb 2, 2022
b1067c9
Update PHP 8 stubs
phpstan-bot Feb 2, 2022
b9903a1
Add shorthand for --generate-baseline
Seldaek Feb 2, 2022
82a45de
Update PHP 8 stubs
phpstan-bot Feb 2, 2022
4c1bc45
Update compiler
renovate-bot Feb 2, 2022
19f25e0
Add PHPStan logo as .idea/icon.png
NLthijs48 Feb 1, 2022
2c6a9eb
Update PHP 8 stubs
phpstan-bot Feb 2, 2022
7aef5d5
Update renovate.json
ondrejmirtes Feb 2, 2022
c1b7ff9
Update PHP 8 stubs
phpstan-bot Feb 2, 2022
e1575aa
Update compiler to v6
renovate-bot Feb 2, 2022
5640efe
Update COMPOSER_ROOT_VERSION
ondrejmirtes Feb 2, 2022
414097a
Update Rector
ondrejmirtes Feb 2, 2022
8995821
Ping symfony/process to ^5.4
ondrejmirtes Feb 2, 2022
976e1ef
Pin symfony/string to ^5.4
ondrejmirtes Feb 2, 2022
4a928f8
Function md5() always return non-empty-string.
janbarasek Feb 2, 2022
aaa8db3
Correct the case for parameters that accept an instance of `Iterator`.
johnbillion Feb 2, 2022
afc49fd
Fix the return types of round()/ceil()/floor()
johnbillion Feb 3, 2022
9512513
Fix interaction between template type and union type
arnaud-lb Feb 1, 2022
705b460
Fix regression
arnaud-lb Feb 4, 2022
d5e6df7
Delegate most of TypeCombinator::remove() to Type::tryRemove()
arnaud-lb Feb 4, 2022
b6bbbaf
Fixed type seen by IterableInForeachRule with inline @var right above…
ondrejmirtes Feb 5, 2022
ccffbc3
TemplateType should accept a TemplateType derived from itself
arnaud-lb Feb 5, 2022
0d28835
Fixed intersecting and removal from TemplateUnionType
ondrejmirtes Feb 5, 2022
b63c0aa
Fix CS
ondrejmirtes Feb 5, 2022
30798b5
Fix test
ondrejmirtes Feb 5, 2022
c0fe972
Correct the return type of `SplFileObject::fstat()`
johnbillion Feb 6, 2022
2d7f374
Improve the return type of functions that return an indexed array of …
johnbillion Feb 6, 2022
5348490
implemented constant-type inference in ImplodeFunctionReturnTypeExten…
staabm Feb 6, 2022
39e5e0c
modulo 1 is always zero
staabm Feb 6, 2022
5087733
multiply by zero is always zero
staabm Feb 6, 2022
5162bcf
Fixed discovering backed enum without space around :
ondrejmirtes Feb 6, 2022
3e014c2
Fix rounding functions for maybe-null types
ondrejmirtes Feb 6, 2022
b464b21
Update dependency dealerdirect/phpcodesniffer-composer-installer to v…
renovate-bot Feb 7, 2022
bd4f179
Fix incorrect array sizeof() when using unset
staabm Feb 7, 2022
35606f9
Split TemplateType::isSubTypeOf() and TemplateType::isAcceptedBy()
arnaud-lb Feb 7, 2022
c8a3ab4
Update PhpStorm stubs
ondrejmirtes Feb 8, 2022
fcfcbd5
return a BenovolentUnionType for properties in SimpleXMLElement and i…
orklah Feb 8, 2022
2159057
Run the parallel worker even for a low number of files
ondrejmirtes Feb 8, 2022
c5f4c3b
Add FilterIterator stub
jdecool Nov 20, 2021
868720e
Add CallbackFilterIterator stub
jdecool Nov 20, 2021
86a63ff
Add RecursiveCallbackFilterIterator stub
jdecool Nov 20, 2021
4dd6b69
Fix
ondrejmirtes Feb 8, 2022
7206452
Autodiscover `phpstan.dist.neon` as a config file
b1rdex Feb 9, 2022
c5a9c2c
Correct the case for various class names.
johnbillion Feb 9, 2022
c344314
Update the signature for `set_error_handler()`.
johnbillion Feb 9, 2022
bd78291
Update the `set_error_handler` error message assertion.
johnbillion Feb 9, 2022
4f72fdc
Binary operations on `non-empty-string` and `string` should error
staabm Feb 10, 2022
425dee7
No longer verify types, when TypeSpecifyingExtension uses $overwrite=…
staabm Feb 11, 2022
b678968
Make editor links clickable for terminals supporting hrefs
Seldaek Feb 12, 2022
3d30758
PDOStatement::fetchAll no longer returns false on PHP8
xPaw Feb 12, 2022
832a9a1
mb_* fatal errors on php8 with invalid encoding
staabm Feb 14, 2022
9a57d0c
Update PhpStorm stubs
ondrejmirtes Feb 15, 2022
7abb7c9
Normalize specified types before intersection
herndlm Feb 12, 2022
c6b5430
Let BooleanAnd and BooleanOr make use of the left scope / types, remo…
herndlm Feb 15, 2022
f255672
Add a couple more interesting test cases
herndlm Feb 15, 2022
3ef326b
Update PhpStorm stubs
ondrejmirtes Feb 22, 2022
04c8ebd
Improve SpecifiedTypes::inverse
herndlm Feb 21, 2022
68e6443
Improve intersect and union of SubtractableTypes
herndlm Feb 21, 2022
6bc1fb5
IntersectionType - support tryRemove
ondrejmirtes Feb 14, 2022
74ae46c
Removing from UnionType - use unionTypes() protected method
ondrejmirtes Feb 14, 2022
53563e9
Ignore `@template` above a property
ondrejmirtes Feb 13, 2022
f5b3cdf
implemented ConstantStringType inference for `str_repeat`
staabm Feb 22, 2022
de5af47
Allow 1st argument `$read` of `stream_select` to be nullable
niconoe- Feb 22, 2022
2568f5e
Fix
ondrejmirtes Feb 22, 2022
d420d05
precise phpdoc for `RuleTestCase->analyse()` (#1032)
staabm Feb 22, 2022
bbf14bf
Nicer clickable URL
ondrejmirtes Feb 23, 2022
e504c3f
Add missing SpecifiedTypes for count and strlen identical expressions
herndlm Feb 23, 2022
9d81ab9
Fix PDOException::getCode return type
VincentLanglet Feb 23, 2022
1e77aed
Countable stub for bleedingEdge
ondrejmirtes Feb 23, 2022
d1c2577
Fix
ondrejmirtes Feb 23, 2022
bc481b7
ErrorsConsoleStyle - improve table wrapping
ondrejmirtes Feb 23, 2022
69095c7
Link Symfony issues
ondrejmirtes Feb 23, 2022
91e7ffc
Fix substr return type on php<8 - use benevolent union type
Seldaek Feb 24, 2022
1f89d35
Better ignore-by-php-version
ondrejmirtes Feb 24, 2022
667ebb8
Fixed error return signatures for \SplFileInfo
siganushka Feb 24, 2022
8a456e4
Regression test for #6687
ondrejmirtes Feb 24, 2022
1fbfbb7
No need for SpecifiedTypes::inverse()
ondrejmirtes Feb 24, 2022
7b104ae
Cache filtered scopes
ondrejmirtes Feb 25, 2022
a483c11
Detect closure parameter types when passing closure in a union
axlon Feb 25, 2022
cc6655f
Fix another BooleanOr issue
ondrejmirtes Feb 25, 2022
0e5d586
Fix anonymous class reflection error
ondrejmirtes Feb 25, 2022
7110a08
OptimizedDirectorySourceLocator - fix bug with uppercase Enum keyword
ondrejmirtes Feb 25, 2022
dbbb721
OptimizedDirectorySourceLocator - fix bug with upper-case Function ke…
ondrejmirtes Feb 25, 2022
0808a89
Template tag without bound is explicit mixed
ondrejmirtes Feb 26, 2022
b852381
Tests
ondrejmirtes Feb 27, 2022
036134c
Fix
ondrejmirtes Feb 27, 2022
7f55bdb
Test
ondrejmirtes Feb 27, 2022
bedcc2d
Test
ondrejmirtes Feb 27, 2022
a2e63ad
Fix binary operations for benevolent unions
ondrejmirtes Feb 27, 2022
d9932a1
Optimization
ondrejmirtes Feb 27, 2022
dd5633f
Fix isSmallerThan etc. in BenevolentUnionType
ondrejmirtes Feb 27, 2022
1739a9a
Remove todo
ondrejmirtes Feb 27, 2022
1b117f7
Do not generalize class-string during template type inference
arnaud-lb Feb 26, 2022
73f14db
Support for class-string $class parameter in is_subclass_of()
arnaud-lb Feb 26, 2022
9e42896
Fix generalization of EnumCaseObjectType
ondrejmirtes Feb 28, 2022
f6c62a0
Regression test
ondrejmirtes Feb 28, 2022
2674577
Deprecate TypeUtils::generalizeType()
ondrejmirtes Feb 28, 2022
baf9e84
Stop using deprecated method
ondrejmirtes Feb 28, 2022
70ac622
Duplicate and adapt solution from is_subclass_of for is_a
herndlm Feb 27, 2022
6f9749a
Extract common is_subclass_of and is_a logic
herndlm Feb 28, 2022
b49df58
Date format return type extensions
ondrejmirtes Feb 28, 2022
089d4c6
Infer explicit mixed when instantiating generic class with unknown te…
ondrejmirtes Feb 28, 2022
0dd3d0c
Level 9 regression tests
ondrejmirtes Feb 28, 2022
86fd620
Regression tests
ondrejmirtes Feb 28, 2022
2010a02
Fix
ondrejmirtes Feb 28, 2022
fce85e0
Update bug-6020.php
ondrejmirtes Feb 28, 2022
b90d3c2
Update bug-5969.php
ondrejmirtes Feb 28, 2022
3b48b3b
Fixes
ondrejmirtes Feb 28, 2022
05a28d7
Update PhpStorm stubs
ondrejmirtes Mar 1, 2022
7f643c5
ImplodeFunctionReturnTypeExtension - fix handling optional keys in Co…
ondrejmirtes Mar 1, 2022
265e181
Fix setFetchMode signature with fetch_class
Seldaek Mar 1, 2022
a91a4fb
Improve ArrayType::castToArrayKeyType() for booleans
jlherren Feb 22, 2022
b384384
Fix ArrayColumnFunctionReturnTypeExtension producing array key types
jlherren Feb 22, 2022
12a76c8
added preg_filter return-type extension
clxmstaab Feb 18, 2022
b7b6655
more precise `preg_match_all` return type on php8
clxmstaab Feb 18, 2022
4321374
Fix in_array() for arrays with union value type
ondrejmirtes Mar 2, 2022
f3c13dd
Regression tests
ondrejmirtes Mar 2, 2022
e9b482c
Fix
ondrejmirtes Mar 2, 2022
9dde7d8
Fix
ondrejmirtes Mar 2, 2022
cd9b558
Fix is_subclass_of with same class
herndlm Mar 2, 2022
4b005c8
Remove incorrect generics support
herndlm Mar 2, 2022
2d52a5b
Consider allowString
herndlm Mar 2, 2022
78f993a
Make TypeNodeResolver construction easier
ondrejmirtes Mar 3, 2022
3b706cd
TypeAliasResolver - introduce interface
ondrejmirtes Mar 3, 2022
692158c
Validate ignoreErrors regexes during DIC compilation (save time in ea…
ondrejmirtes Mar 3, 2022
50f25e9
Validate parametersSchema only during DIC compilation
ondrejmirtes Mar 3, 2022
7ffc85c
Fix
ondrejmirtes Mar 3, 2022
842ce5f
Backward compatibility with Rector
ondrejmirtes Mar 3, 2022
b655e85
Fix
ondrejmirtes Mar 3, 2022
d921d06
Fix Incorrectly nested style tag found for narrow terminals
ondrejmirtes Mar 3, 2022
1658bf3
Fix baseline
ondrejmirtes Mar 3, 2022
04ff57b
Microoptimization
ondrejmirtes Mar 3, 2022
7ddd284
Microoptimization
ondrejmirtes Mar 3, 2022
c2b9e71
Empty array infers key and value type as never
ondrejmirtes Mar 3, 2022
a041124
Retain left and right types in equal expression
herndlm Mar 3, 2022
721ce7b
Retain left and right types in equal and identical expression
herndlm Mar 3, 2022
58215cb
Add equal and identical NodeScopeResolverTest cases for stdClass comp…
herndlm Mar 3, 2022
a84465b
Add more test cases
herndlm Mar 3, 2022
8c1dfc1
ArrayType::traverse() - create empty ConstantArrayType in case of never
ondrejmirtes Mar 4, 2022
0a8ac3d
Skip validating DIC in StubValidator
ondrejmirtes Mar 4, 2022
6212d8c
Regression tests
ondrejmirtes Mar 4, 2022
a373aec
Test
ondrejmirtes Mar 4, 2022
3581d69
Test generics infer behaviour
ondrejmirtes Mar 4, 2022
83aa215
Add support for integer ranges in strtotime() with constant strings
Seldaek Mar 3, 2022
98ee715
Retain int specificity when $baseTimestamp is passed in as it appears…
Seldaek Mar 3, 2022
d3179f4
Fix
ondrejmirtes Mar 4, 2022
156cb69
Fix
ondrejmirtes Mar 4, 2022
347f782
Fix trait detection recursion
herndlm Mar 5, 2022
9bb07e1
Add missing newline between tests
herndlm Mar 5, 2022
2a0dccb
Update FileTypeMapper.php
ondrejmirtes Mar 5, 2022
7a66cb6
Do not add null to a template type for a default parameter value null
ondrejmirtes Mar 5, 2022
c05ba98
Fix nullable closure parameter type
ondrejmirtes Mar 5, 2022
7d4fa3d
Regression test
ondrejmirtes Mar 5, 2022
6525d68
TemplateType - fix description for subtracted mixed bound
ondrejmirtes Mar 5, 2022
d32942a
Fix dead catch when iterating objects
rajyan Mar 6, 2022
71c60ae
Optimization
ondrejmirtes Mar 6, 2022
4450e46
Fix false positive dead catch on property assignment
rajyan Mar 7, 2022
ec1aa02
Update PhpStorm stubs
ondrejmirtes Mar 8, 2022
51e2df3
Fix template type subtraction and union
ondrejmirtes Mar 5, 2022
d0ab72a
Fix
ondrejmirtes Mar 8, 2022
7449b68
Simulate `offsetSet` to get throw points for ArrayAccess assignment
rajyan Mar 9, 2022
e9c4610
Make return type extension for array_column() aware of PHP version
jlherren Mar 7, 2022
9338d41
Fix Unused private constant with an indirect access
rajyan Mar 9, 2022
98c4d84
Identical and Equal with the same variables resolve to ConstantBoolea…
ondrejmirtes Mar 9, 2022
316f269
Scalars of the same type on both of Equal are delegated to Identical
ondrejmirtes Mar 9, 2022
10b295f
Fix Equal handling in TypeSpecifier
ondrejmirtes Mar 9, 2022
6117640
Fix more TypeSpecifier issues regarding ===
ondrejmirtes Mar 8, 2022
d26496e
Update PHP 8 stubs
phpstan-bot Mar 10, 2022
a897d3a
Allow null as a return value when resolving return types
matthiasnoback Mar 10, 2022
c0c9175
Open 1.5-dev
ondrejmirtes Mar 10, 2022
28776ff
Fix the difference between ?T and T|null
ondrejmirtes Mar 10, 2022
9048226
Merge branch '1.4.x'
ondrejmirtes Mar 10, 2022
84d2dcc
Output elapsed time per file in debug mode
janedbal Mar 10, 2022
4bad2e7
Update PHP 8 stubs
phpstan-bot Mar 11, 2022
b213f6a
check property assign `TypeError` throw point by native type
rajyan Mar 11, 2022
4251d25
Merge branch '1.4.x'
ondrejmirtes Mar 11, 2022
24b0992
add regression test from https://github.com/phpstan/phpstan/issues/6786
rajyan Mar 11, 2022
dfc5d25
add regression tests for union type
rajyan Mar 11, 2022
d7e82b3
Merge branch '1.4.x'
ondrejmirtes Mar 11, 2022
61989a2
Fix workflow config
ondrejmirtes Mar 12, 2022
8d5f397
No need for an alias
ondrejmirtes Mar 12, 2022
73a25f7
Update compiler
renovate-bot Mar 14, 2022
aff43e5
Update dependency slevomat/coding-standard to v7.0.19
renovate-bot Mar 14, 2022
e15174d
Fix workflow
ondrejmirtes Mar 14, 2022
6422dc9
Fix workflow
ondrejmirtes Mar 14, 2022
e52e32e
Update PhpStorm stubs
ondrejmirtes Mar 15, 2022
ef85fc8
Fix testBug6791 test file to not execute code
ondrejmirtes Mar 15, 2022
492dede
Update PhpStorm stubs
ondrejmirtes Mar 15, 2022
ad6b0d5
added failling test when concat a constant-string-union with a litera…
clxmstaab Jan 22, 2022
03fce07
implement union of literal-string with a literal-string
clxmstaab Jan 22, 2022
9a5b1eb
csfix
clxmstaab Jan 22, 2022
c1e890a
Fix expectations
staabm Jan 22, 2022
8da0a62
Fix impl
staabm Jan 22, 2022
a361446
Fixed expectation
staabm Jan 22, 2022
bd342ae
we limit the number of union-types for performance reasons
clxmstaab Jan 24, 2022
92f0a72
Update MutatingScope.php
clxmstaab Jan 24, 2022
dfb47d7
test limits
clxmstaab Jan 24, 2022
3d069e0
fix
clxmstaab Jan 24, 2022
32cfae1
simpler test
clxmstaab Jan 24, 2022
ebb1d9f
added failling test
clxmstaab Jan 25, 2022
0ec04f8
more testcoverage
clxmstaab Jan 25, 2022
1d0dfe6
fix
clxmstaab Jan 25, 2022
fbba892
fix
clxmstaab Mar 11, 2022
a87dc67
Message about dev-master
ondrejmirtes Mar 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.{php,phpt}]
[*.{php,phpt,stub}]
indent_style = tab
indent_size = 4

Expand Down
17 changes: 0 additions & 17 deletions .github/dependabot.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": [
"config:base",
"schedule:weekly"
],
"rangeStrategy": "update-lockfile",
"packageRules": [
{
"matchPackagePatterns": ["*"],
"enabled": false
},
{
"matchPaths": ["+(composer.json)"],
"enabled": true,
"groupName": "root-composer"
},
{
"matchPaths": ["build-cs/**"],
"enabled": true,
"groupName": "build-cs"
},
{
"matchPaths": ["compiler/**"],
"enabled": true,
"groupName": "compiler"
},
{
"matchPaths": [".github/**"],
"enabled": true,
"groupName": "github-actions"
}
]
}
9 changes: 5 additions & 4 deletions .github/workflows/backward-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:
pull_request:
push:
branches:
- "master"
- "**"

env:
COMPOSER_ROOT_VERSION: "0.12.x-dev"
COMPOSER_ROOT_VERSION: "1.5.x-dev"

jobs:
backward-compatibility:
name: "Backward Compatibility"

runs-on: "ubuntu-latest"
timeout-minutes: 60

steps:
- name: "Checkout"
Expand All @@ -30,13 +31,13 @@ jobs:
php-version: "8.0"

- name: "Install dependencies"
run: "composer install --no-dev --no-interaction --no-progress --no-suggest"
run: "composer install --no-dev --no-interaction --no-progress"

- name: "Install BackwardCompatibilityCheck"
run: |
composer global config minimum-stability dev
composer global config prefer-stable true
composer global require --dev ondrejmirtes/backward-compatibility-check:^5.0.7
composer global require --dev ondrejmirtes/backward-compatibility-check:^5.0.8

- name: "Check"
run: "$(composer global config bin-dir --absolute)/roave-backward-compatibility-check"
33 changes: 26 additions & 7 deletions .github/workflows/compiler-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:
pull_request:
push:
branches:
- "master"
- "**"

env:
COMPOSER_ROOT_VERSION: "0.12.x-dev"
COMPOSER_ROOT_VERSION: "1.5.x-dev"

jobs:
compiler-tests:
name: "Compiler Tests"

runs-on: "ubuntu-latest"
timeout-minutes: 60

steps:
- name: "Checkout"
Expand All @@ -28,10 +29,7 @@ jobs:
php-version: "8.0"

- name: "Install dependencies"
run: "composer install --no-dev --no-interaction --no-progress --no-suggest"

- name: "Transform source code"
run: php bin/transform-source.php
run: "composer install --no-interaction --no-progress"

- name: "Tests"
run: |
Expand All @@ -44,5 +42,26 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: phpstan.phar
name: phar-file
path: tmp/phpstan.phar

integration-tests:
if: github.event_name == 'pull_request'
needs: compiler-tests
uses: phpstan/phpstan/.github/workflows/integration-tests.yml@1.5.x
with:
ref: 1.5.x

extension-tests:
if: github.event_name == 'pull_request'
needs: compiler-tests
uses: phpstan/phpstan/.github/workflows/extension-tests.yml@1.5.x
with:
ref: 1.5.x

other-tests:
if: github.event_name == 'pull_request'
needs: compiler-tests
uses: phpstan/phpstan/.github/workflows/other-tests.yml@1.5.x
with:
ref: 1.5.x
18 changes: 12 additions & 6 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,29 @@ name: "E2E Tests"

on:
pull_request:
paths-ignore:
- 'compiler/**'
push:
branches:
- "master"
- "**"
paths-ignore:
- 'compiler/**'

env:
COMPOSER_ROOT_VERSION: "0.12.x-dev"
COMPOSER_ROOT_VERSION: "1.5.x-dev"

jobs:
result-cache-e2e-tests:
name: "Result cache E2E tests"

runs-on: ${{ matrix.operating-system }}
timeout-minutes: 60

strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
operating-system: [ubuntu-latest, windows-latest]

steps:
Expand All @@ -37,7 +42,7 @@ jobs:
ini-values: memory_limit=256M

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress"

- name: "Tests"
run: |
Expand All @@ -46,6 +51,7 @@ jobs:
e2e-tests:
name: "E2E tests"
runs-on: "ubuntu-latest"
timeout-minutes: 60

strategy:
matrix:
Expand All @@ -68,12 +74,12 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "7.4"
php-version: "8.0"
tools: ${{ matrix.tools }}
extensions: ${{ matrix.extensions }}

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress"

- name: "Test"
run: ${{ matrix.script }}
32 changes: 25 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ on:
pull_request:
push:
branches:
- "master"
- "**"

env:
COMPOSER_ROOT_VERSION: "0.12.x-dev"
COMPOSER_ROOT_VERSION: "1.5.x-dev"

jobs:
lint:
name: "Lint"
runs-on: "ubuntu-latest"
timeout-minutes: 60

strategy:
fail-fast: false
Expand All @@ -25,6 +26,7 @@ jobs:
- "7.3"
- "7.4"
- "8.0"
- "8.1"

steps:
- name: "Checkout"
Expand All @@ -40,11 +42,25 @@ jobs:
run: "composer validate"

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress"

- name: "Install PHP for code transform"
if: matrix.php-version != '8.0' && matrix.php-version != '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: 8.0

- name: "Transform source code"
if: matrix.php-version != '7.4' && matrix.php-version != '8.0'
run: php bin/transform-source.php
if: matrix.php-version != '8.0' && matrix.php-version != '8.1'
run: "build/transform-source ${{ matrix.php-version }}"

- name: "Reinstall matrix PHP version"
if: matrix.php-version != '8.0' && matrix.php-version != '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Lint"
run: "make lint"
Expand All @@ -53,6 +69,7 @@ jobs:
name: "Coding Standard"

runs-on: "ubuntu-latest"
timeout-minutes: 60

strategy:
matrix:
Expand All @@ -73,7 +90,7 @@ jobs:
run: "composer validate"

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress"

- name: "Lint"
run: "make lint"
Expand All @@ -85,6 +102,7 @@ jobs:
name: "Dependency Analysis"

runs-on: "ubuntu-latest"
timeout-minutes: 60

strategy:
matrix:
Expand All @@ -102,7 +120,7 @@ jobs:
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress"

- name: "Composer Require Checker"
run: "make composer-require-checker"
29 changes: 29 additions & 0 deletions .github/workflows/merge-bot-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
# https://github.com/WyriHaximus/github-action-wait-for-status

name: Merge bot PR
on:
pull_request:
types:
- opened
jobs:
automerge:
name: Automerge PRs
runs-on: ubuntu-latest
steps:
- name: 'Wait for status checks'
if: github.event.pull_request.user.login == 'phpstan-bot'
id: waitforstatuschecks
uses: "WyriHaximus/github-action-wait-for-status@v1"
with:
ignoreActions: automerge
checkInterval: 13
env:
GITHUB_TOKEN: "${{ secrets.PHPSTAN_BOT_TOKEN }}"
- name: Merge Pull Request
uses: juliangruber/merge-pull-request-action@v1
if: steps.waitforstatuschecks.outputs.status == 'success'
with:
github-token: "${{ secrets.PHPSTAN_BOT_TOKEN }}"
number: "${{ github.event.number }}"
method: rebase
Loading