Skip to content

Commit

Permalink
Update metafiles
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jan 9, 2025
1 parent 51f8373 commit 012afcf
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
/tests export-ignore
* text=auto

/.* export-ignore
/example export-ignore
/tests export-ignore
/*.xml export-ignore
/*.yml export-ignore
/*.lock export-ignore
/*.dist export-ignore
/*.php export-ignore
12 changes: 12 additions & 0 deletions .github/workflows/cs-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
push:
branches:
- '*'

name: Fix Code Style

jobs:
cs-fix:
permissions:
contents: write
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
13 changes: 13 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

require_once 'vendor/autoload.php';

return \Spiral\CodeStyle\Builder::create()
->include(__DIR__ . '/src')
->include(__DIR__ . '/testing/src')
->include(__FILE__)
->exclude(__DIR__ . '/src/Client/GRPC/ServiceClientInterface.php')
->allowRisky(true)
->build();
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"jetbrains/phpstorm-attributes": "^1.0",
"mockery/mockery": "^1.4",
"phpunit/phpunit": "^10.0",
"spiral/code-style": "^2.2",
"spiral/dumper": "^3.3",
"vimeo/psalm": ">=5.8"
},
"autoload": {
Expand All @@ -66,8 +68,11 @@
}
},
"scripts": {
"tests": "phpunit",
"psalm": "psalm --no-cache"
"cs:diff": "php-cs-fixer fix --dry-run -v --diff --show-progress dots",
"cs:fix": "php-cs-fixer fix -v",
"psalm": "psalm",
"psalm:baseline": "psalm --set-baseline=psalm-baseline.xml",
"tests": "phpunit"
},
"config": {
"sort-packages": true
Expand Down
17 changes: 13 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
colors="true" processIsolation="false" stopOnFailure="false" stopOnError="false" stderr="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile="runtime/phpunit/result.cache"
backupGlobals="false"
colors="true"
processIsolation="false"
stopOnFailure="false"
stopOnError="false"
stderr="true"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<coverage>
<include>
<directory>src</directory>
Expand Down
2 changes: 2 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@765dcbfe43002e52e4808b65561842784fe7bcc7"/>
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
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"
errorLevel="1"
hoistConstants="true"
resolveFromConfigFile="true"
Expand Down

0 comments on commit 012afcf

Please sign in to comment.