Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies to their latest versions #3

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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