Skip to content

Commit

Permalink
Update SA tools (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored Aug 27, 2023
1 parent 2573d77 commit 154dbc7
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 16 deletions.
26 changes: 13 additions & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/tests export-ignore

/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/Makefile export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
/.github/ export-ignore
.gitignore export-ignore
.php-cs-fixer.dist.php export-ignore
/Makefile export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
/tests/ export-ignore
/vendor-bin/ export-ignore
24 changes: 24 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,27 @@ jobs:

- name: Execute PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --diff --dry-run

psalm:
name: Psalm
runs-on: ubuntu-22.04

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: mbstring, intl

- name: Download dependencies
run: composer update --no-interaction --no-progress

- name: Download Psalm
run: composer bin psalm update --no-interaction --no-progress

- name: Execute Psalm
run: vendor/bin/psalm.phar --no-progress --output-format=github
8 changes: 8 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<file src="src/UriTemplate.php">
<UndefinedFunction>
<code>\preg_last_error_msg()</code>
</UndefinedFunction>
</file>
</files>
16 changes: 16 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<psalm
errorLevel="3"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
2 changes: 1 addition & 1 deletion vendor-bin/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"php": "^7.4 || ^8.0",
"friendsofphp/php-cs-fixer": "3.10.0"
"friendsofphp/php-cs-fixer": "3.23.0"
},
"config": {
"preferred-install": "dist"
Expand Down
4 changes: 2 additions & 2 deletions vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"require": {
"php": "^7.4 || ^8.0",
"phpstan/phpstan": "1.8.2",
"phpstan/phpstan-deprecation-rules": "1.0.0"
"phpstan/phpstan": "1.10.32",
"phpstan/phpstan-deprecation-rules": "1.1.4"
},
"config": {
"preferred-install": "dist"
Expand Down
9 changes: 9 additions & 0 deletions vendor-bin/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"require": {
"php": "^7.4 || ^8.0",
"psalm/phar": "5.15.0"
},
"config": {
"preferred-install": "dist"
}
}

0 comments on commit 154dbc7

Please sign in to comment.