Skip to content

[PHPStan 1.11] Init PHPStanServicesFactory to load PHPStan ContainerFactory() early on LazyContainerFactory #26194

[PHPStan 1.11] Init PHPStanServicesFactory to load PHPStan ContainerFactory() early on LazyContainerFactory

[PHPStan 1.11] Init PHPStanServicesFactory to load PHPStan ContainerFactory() early on LazyContainerFactory #26194

Workflow file for this run

name: Code Analysis
on:
pull_request: null
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
code_analysis:
strategy:
fail-fast: false
matrix:
actions:
-
name: 'Composer Validate'
run: composer validate --ansi
-
name: 'Run with Space in Directory'
run: bin/rector process tests-paths/path/with\ space/SomeFile.php --clear-cache
-
name: 'Preload php-parser Order'
run: php preload.php
-
name: 'Validate Max File Length'
run: vendor/bin/easy-ci validate-file-length rules src tests
-
name: 'PHPStan'
run: vendor/bin/phpstan analyse --ansi --error-format symplify
-
name: 'Commented Code'
run: vendor/bin/easy-ci check-commented-code src rules tests rules-tests --line-limit 5 --ansi
-
name: 'Active Classes'
run: |
vendor/bin/class-leak check bin config src rules utils \
--skip-suffix "Rector" \
--skip-type="Rector\\Utils\\Compiler\\Unprefixer" \
--skip-type="Rector\\NodeTypeResolver\\PHPStan\\Scope\\Contract\\NodeVisitor\\ScopeResolverNodeVisitorInterface" \
--skip-type="Rector\\PhpDocParser\\PhpParser\\SmartPhpParserFactory" \
--skip-type="Rector\\BetterPhpDocParser\\Contract\\BasePhpDocNodeVisitorInterface" \
--skip-type="Rector\\BetterPhpDocParser\\Contract\\PhpDocParser\\PhpDocNodeDecoratorInterface" \
--skip-type="Rector\\BetterPhpDocParser\\ValueObject\\Type\\FullyQualifiedIdentifierTypeNode"
-
name: 'Compatible PHPStan versions'
run: php bin/validate-phpstan-version.php
-
name: 'Detect Rules Missing in Set'
run: bin/rector missing-in-set --ansi
# see https://github.com/rectorphp/rector-generator
-
name: 'Rector Generate From Recipe'
run: |
bin/rector init-recipe --ansi
bin/rector generate --ansi
-
name: 'Detect unused dependencies'
# "default" format overrides default "github" in CI
run: |
composer create-project icanhazstring/composer-unused
composer-unused/bin/composer-unused --ansi --output-format=default
-
name: 'Detect composer dependency issues'
run: vendor/bin/composer-dependency-analyser
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
- uses: "ramsey/composer-install@v3"
- run: ${{ matrix.actions.run }}