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 #3 from wavevision/feature/latest-dependencies
Browse files Browse the repository at this point in the history
Update dependencies to their latest versions
  • Loading branch information
rozsival authored Oct 22, 2020
2 parents 7862ff4 + e7079b8 commit 87c3830
Show file tree
Hide file tree
Showing 17 changed files with 1,673 additions and 1,251 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="WavevisionPropsControl">
<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
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,12 @@
},
"require-dev": {
"latte/latte": "^2.5",
"phing/phing": "^3.0.0-alpha3",
"nette/bootstrap": "^3.0",
"php-coveralls/php-coveralls": "^2.1",
"php-parallel-lint/php-parallel-lint": "^1.0",
"phpstan/phpstan": "^0.11.16",
"phpunit/phpunit": "^8.3",
"phpunit/phpunit": "^9.3",
"symfony/css-selector": "^4.3",
"symfony/dom-crawler": "^4.3",
"wavevision/coding-standard": "^3.1"
},
"scripts": {
"phing": "phing"
"wavevision/coding-standard": "^5.2"
},
"extra": {
"phpstan": {}
Expand Down
Loading

0 comments on commit 87c3830

Please sign in to comment.