Skip to content

Commit

Permalink
Merge 56f16bc into aa0155c
Browse files Browse the repository at this point in the history
  • Loading branch information
rozsival committed Oct 30, 2020
2 parents aa0155c + 56f16bc commit f8cf7cc
Show file tree
Hide file tree
Showing 33 changed files with 3,230 additions and 3,872 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.18.0
12.19.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
install:
- composer install
script:
- composer phing ci
- make ci
- language: node_js
install:
- nvm install
Expand Down
65 changes: 65 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
bin=vendor/bin
chrome:=$(shell command -v google-chrome 2>/dev/null)
codeSnifferRuleset=codesniffer-ruleset.xml
coverage=$(temp)/coverage/php
coverageClover=$(coverage)/coverage.xml
examples=examples
php=php
src=src
temp=temp
tests=tests
dirs:=$(src) $(tests) $(examples)

all:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'

# Setup

composer:
composer install

reset:
rm -rf $(temp)/cache
composer dumpautoload

di: reset
bin/extract-services

fix: reset check-syntax phpcbf phpcs phpstan test

# QA

check-syntax:
$(bin)/parallel-lint -e $(php) $(dirs)

phpcs:
$(bin)/phpcs -sp --standard=$(codeSnifferRuleset) --extensions=php $(dirs)

phpcbf:
$(bin)/phpcbf -spn --standard=$(codeSnifferRuleset) --extensions=php $(dirs) ; true

phpstan:
$(bin)/phpstan analyze $(dirs) --level max

# Tests

test:
$(bin)/phpunit

test-coverage: reset
$(bin)/phpunit --coverage-html=$(coverage)

test-coverage-clover: reset
$(bin)/phpunit --coverage-clover=$(coverageClover)

test-coverage-report: test-coverage-clover
$(bin)/php-coveralls --coverage_clover=$(coverageClover) --verbose

test-coverage-open: test-coverage
ifndef chrome
open -a 'Google Chrome' $(coverage)/index.html
else
google-chrome $(coverage)/index.html
endif

ci: check-syntax phpcs phpstan test-coverage-report
166 changes: 0 additions & 166 deletions build.xml

This file was deleted.

20 changes: 10 additions & 10 deletions codesniffer-ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<ruleset name="Wavevision Nette Webpack">
<rule ref="vendor/wavevision/coding-standard/php/WavevisionCodingStandard/ruleset.xml"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Wavevision"/>
<element key="tests" value="Wavevision"/>
<element key="examples" value="Wavevision"/>
</property>
</properties>
</rule>
<rule ref="vendor/wavevision/coding-standard/php/ruleset.xml"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Wavevision"/>
<element key="tests" value="Wavevision"/>
<element key="examples" value="Wavevision"/>
</property>
</properties>
</rule>
</ruleset>
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,13 @@
},
"require-dev": {
"nette/application": "^3.0",
"phing/phing": "3.0a3",
"php-coveralls/php-coveralls": "^2.2",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.11",
"phpstan/phpstan-nette": "^0.12.3",
"wavevision/coding-standard": "^3.1",
"wavevision/di-service-annotation": "^3.1",
"wavevision/nette-tests": "^3.0"
},
"scripts": {
"phing": "phing"
"wavevision/coding-standard": "^5.2",
"wavevision/di-service-annotation": "^4.0",
"wavevision/nette-tests": "^3.1"
},
"extra": {
"phpstan": {}
Expand Down
Loading

0 comments on commit f8cf7cc

Please sign in to comment.