Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from wickedOne/remove-options-resolver
Browse files Browse the repository at this point in the history
remove options resolver
  • Loading branch information
wickedOne committed Nov 24, 2021
2 parents 6ae685e + bba95aa commit 964eacc
Show file tree
Hide file tree
Showing 11 changed files with 1,101 additions and 406 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Psalm static analysis"

on:
pull_request:
push:

jobs:
phpstan:
name: "Psalm static analysis"

runs-on: ${{ matrix.operating-system }}

concurrency:
group: phpstan-${{ github.ref }}
cancel-in-progress: true

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"
include:
- php-version: "7.4"
dependencies: "locked"
operating-system: "ubuntu-latest"

steps:
- name: "checkout"
uses: "actions/checkout@v2"

- name: "install php"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: "cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --ignore-platform-req=php"

- name: "install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --ignore-platform-req=php"

- name: "install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --ignore-platform-req=php"

- name: "tests"
run: "vendor/bin/psalm --shepherd --stats"
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
unit testing your getters, setters, adders, removers, issers and whatevers.

[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FwickedOne%2Fmuppet%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/wickedOne/muppet/master)
[![Type Coverage](https://shepherd.dev/github/wickedOne/muppet/coverage.svg)](https://shepherd.dev/github/wickedOne/muppet)
[![codecov](https://codecov.io/gh/wickedOne/muppet/branch/master/graph/badge.svg)](https://codecov.io/gh/solrphp/solarium-bundle)
[![PHPStan static analysis](https://github.com/wickedOne/muppet/actions/workflows/phpstan.yml/badge.svg)](https://github.com/solrphp/solarium-bundle/actions/workflows/phpstan.yml)
[![coding standards](https://github.com/wickedOne/muppet/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/solrphp/solarium-bundle/actions/workflows/coding-standards.yml)
Expand All @@ -23,16 +24,18 @@ it does however generate test classes which are easy to modify and, most importa

## usage
```php
$config = new Config([
'base_dir' => '~/Code/Project/src',
'test_dir' => '~/Code/Project/tests/Unit',
'fragments' => [
'Awesome',
'Namespace',
'Tests',
'Unit',
],
]);
$config = new Config(
'~/Code/Project/src', // base dir
'~/Code/Project/tests/Unit', // tests dir
// namespace fragments
[
'Awesome',
'Namespace',
'Tests',
'Unit',
],
'foo <bar@qux.com>' // author (optional)
);

(new Generator($config))
->generate('MyEntity')
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"roave/better-reflection": "^4.12",
"doctrine/collections": "^1.6",
"symfony/finder": "^5.3",
"symfony/options-resolver": "^5.3",
"nette/php-generator": "^3.6",
"nikic/php-parser": "^4.13"
},
Expand Down Expand Up @@ -47,7 +46,8 @@
"phpstan/phpstan-strict-rules": "^0.12.11",
"wickedone/phpcs-reporter": "^1.0",
"wickedone/phpunit-printer": "^1.0",
"phpmetrics/phpmetrics": "^2.7"
"phpmetrics/phpmetrics": "^2.7",
"vimeo/psalm": "^4.12"
},
"extra": {
"branch-alias": {
Expand All @@ -61,6 +61,6 @@
"run-phpcs": "vendor/bin/phpcs",
"run-phpcsf": "vendor/bin/php-cs-fixer fix",
"run-phpmetrics": "vendor/bin/phpmetrics --config=metrics.json --report-html=build/phpmetrics --quiet",
"run-infection": ["@run-phpunitc", "vendor/bin/infection --coverage=build/coverage -j$(sysctl -n hw.ncpu) -s -vv"]
"run-infection": ["@run-phpunitc", "vendor/bin/infection --coverage=build/coverage --skip-initial-tests -j$(sysctl -n hw.ncpu) -s -vv"]
}
}

0 comments on commit 964eacc

Please sign in to comment.