Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from wavevision/feature/latest-dependencies
Browse files Browse the repository at this point in the history
Feature/latest dependencies
  • Loading branch information
rozsival authored Oct 21, 2020
2 parents 85184f4 + 395b756 commit c9551b6
Show file tree
Hide file tree
Showing 38 changed files with 1,533 additions and 1,158 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_script:

jobs:
include:
- script: composer phing ci
- script: make ci

cache:
directories:
Expand Down
64 changes: 64 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
bin=vendor/bin
chrome:=$(shell command -v google-chrome 2>/dev/null)
codeSnifferRuleset=codesniffer-ruleset.xml
coverage=$(temp)/coverage
coverageClover=$(coverage)/coverage.xml
php=php
src=src
temp=temp
tests=tests
dirs:=$(src) $(tests)

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
154 changes: 0 additions & 154 deletions build.xml

This file was deleted.

2 changes: 1 addition & 1 deletion codesniffer-ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset name="WavevisionUtils">
<rule ref="vendor/wavevision/coding-standard/php/WavevisionCodingStandard/ruleset.xml"/>
<rule ref="vendor/wavevision/coding-standard/php/ruleset.xml"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
Expand Down
15 changes: 4 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,20 @@
"sort-packages": true
},
"require": {
"php": ">=7.4",
"ext-fileinfo": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-zip": "*",
"flow/jsonpath": "^0.4.0",
"nette/finder": "^2.5",
"nette/utils": "^3.1",
"php": ">=7.4"
"softcreatr/jsonpath": "^0.6.4"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.0",
"mikey179/vfsstream": "^1.6",
"phing/phing": "^3.0-alpha3",
"php-coveralls/php-coveralls": "^2.1",
"php-mock/php-mock-phpunit": "^2.4",
"phpstan/phpstan": "^0.12.3",
"phpunit/phpunit": "^8.3",
"wavevision/coding-standard": "^3.0"
},
"scripts": {
"phing": "phing"
"phpunit/phpunit": "^9.4",
"wavevision/coding-standard": "^5.2"
},
"extra": {
"phpstan": {}
Expand Down
Loading

0 comments on commit c9551b6

Please sign in to comment.