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

Commit

Permalink
Upgrade dependencies to their latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rozsival committed Apr 16, 2021
1 parent fc1a148 commit f75cfe8
Show file tree
Hide file tree
Showing 19 changed files with 2,517 additions and 1,869 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
service_name: travis-ci
service_name: github-actions
json_path: temp/coveralls.json
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI
on:
- push
- pull_request

jobs:
php:
name: Php
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Php extensions cache
id: phpcache
uses: shivammathur/cache-extensions@v1
with:
php-version: 7.4
extensions: pcov
key: v1
- name: Cache Php extensions
uses: actions/cache@v2
with:
path: ${{ steps.phpcache.outputs.dir }}
key: ${{ steps.phpcache.outputs.key }}
restore-keys: ${{ steps.phpcache.outputs.key }}
- name: Setup Php
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Setup composer cache
id: composercache
run: echo ::set-output name=dir::$(composer config cache-files-dir)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Setup PCOV
run: pecl install pcov
- name: Install dependencies
run: composer install
- name: CI
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make ci


19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

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)

# 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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# doctrine-entity-faker
<p align="center"><a href="https://github.com/wavevision"><img alt="Wavevision s.r.o." src="https://wavevision.com/images/wavevision-logo.png" width="120" /></a></p>
<h1 align="center">Doctrine Entity Faker</h1>

[![Build Status](https://travis-ci.org/wavevision/doctrine-entity-faker.svg?branch=master)](https://travis-ci.org/wavevision/doctrine-entity-faker)
[![CI](https://github.com/wavevision/doctrine-entity-faker/workflows/CI/badge.svg)](https://github.com/wavevision/doctrine-entity-faker/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/wavevision/doctrine-entity-faker/badge.svg?branch=master)](https://coveralls.io/github/wavevision/doctrine-entity-faker?branch=master)
[![PHPStan](https://img.shields.io/badge/style-level%20max-brightgreen.svg?label=phpstan)](https://github.com/phpstan/phpstan)

WIP
Fake Doctrine entity data in your tests easily.
153 changes: 0 additions & 153 deletions build.xml

This file was deleted.

4 changes: 2 additions & 2 deletions codesniffer-ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset name="Point">
<rule ref="vendor/wavevision/coding-standard/php/WavevisionCodingStandard/ruleset.xml"/>
<ruleset name="DoctrineEntityFaker">
<rule ref="vendor/wavevision/coding-standard/php/ruleset.xml"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
Expand Down
22 changes: 10 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,22 @@
"Wavevision\\": "tests/"
}
},
"config": {
"sort-packages": true
},
"require": {
"php": ">=7.2",
"php": ">=7.4",
"doctrine/annotations": "^1.8",
"doctrine/orm": "^2.6",
"fzaninotto/faker": "^1.8"
"fzaninotto/faker": "^1.8",
"nette/utils": "^3.2"
},
"require-dev": {
"wavevision/coding-standard": "^1.1",
"phpunit/phpunit": "^8.4",
"phpstan/phpstan": "^0.11.19",
"phing/phing": "^2.16",
"jakub-onderka/php-parallel-lint": "^1.0",
"php-coveralls/php-coveralls": "^2.1",
"phpstan/phpstan-doctrine": "^0.11.6",
"phpstan/extension-installer": "^1.0"
},
"scripts": {
"phing": "phing"
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-doctrine": "^0.12.33",
"phpunit/phpunit": "^9.5",
"wavevision/coding-standard": "^6.0"
},
"extra": {
"phpstan": {}
Expand Down
Loading

0 comments on commit f75cfe8

Please sign in to comment.