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

[QA] added phpstan dist config #312

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
.env.dist export-ignore
.gitattributes export-ignore
.github/ export-ignore
.phpstan/ export-ignore
.gitignore export-ignore
.php-cs-fixer.dist.php export-ignore
docker-compose.yml export-ignore
phpstan.neon export-ignore
phpstan.dist.neon export-ignore
phpunit.xml export-ignore
tests/ export-ignore
44 changes: 44 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Static Analysis

on:
pull_request:
branches:
- master
paths:
- .github/workflows/static-analysis.yml
- tests/StaticAnalysis/*
- composer.*
- lib/**
- phpstan*

push:
branches:
- master
paths:
- .github/workflows/static-analysis.yml
- tests/StaticAnalysis/*
- composer.*
- lib/**
- phpstan*

jobs:
static-analysis-phpstan:
name: Static Analysis with PHPStan
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: 7.4
tools: cs2pr, phpstan:1.10.63

- name: Install dependencies with Composer
uses: ramsey/composer-install@v2

- name: Run static analysis
run: phpstan analyse --error-format=checkstyle | cs2pr
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
lib/plugins/sfDoctrinePlugin/test/functional/fixtures/log/
/vendor
/composer.lock
phpstan.neon
13 changes: 13 additions & 0 deletions .phpstan/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

class ProjectConfiguration extends sfProjectConfiguration
{
}

class BaseForm extends sfForm
{
}

include 'PEAR/REST/10.php';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 why do we need PEAR?! 🙈

Should we completely drop it? @thirsch IIRC you mentioned something like this?

Copy link
Collaborator Author

@connorhu connorhu Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugin uses this. i would drop it too as you can see in my plugin loading improvement issue #342 . if only because the default symfony channels don't work. refer to propel discussion

include 'PEAR/REST/11.php';
include 'PEAR/Frontend/CLI.php';
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"friendsofsymfony1/swiftmailer": "^5.4.13 || ^6.2.5"
},
"require-dev": {
"psr/log": "*"
"psr/log": "*",
"friendsofsymfony1/doctrine1": "^1.4"
},
"autoload": {
"files": ["autoload.php"]
Expand Down
Loading
Loading