Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b2b2414

Browse files
Use GitHub Actions instead of Travis CI
1 parent ef925f6 commit b2b2414

File tree

12 files changed

+191
-61
lines changed

12 files changed

+191
-61
lines changed

‎.coveralls.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎.github/workflows/build.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Build"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "master"
10+
11+
jobs:
12+
lint:
13+
name: "Lint"
14+
runs-on: "ubuntu-latest"
15+
16+
strategy:
17+
matrix:
18+
php-version:
19+
- "7.1"
20+
- "7.2"
21+
- "7.3"
22+
- "7.4"
23+
- "8.0"
24+
25+
steps:
26+
- name: "Checkout"
27+
uses: "actions/checkout@v2"
28+
29+
- name: "Install PHP"
30+
uses: "shivammathur/setup-php@v2"
31+
with:
32+
coverage: "none"
33+
php-version: "${{ matrix.php-version }}"
34+
35+
- name: "Validate Composer"
36+
run: "composer validate"
37+
38+
- name: "Install dependencies"
39+
run: "composer install --no-interaction --no-progress --no-suggest"
40+
41+
- name: "Update PHPUnit"
42+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
43+
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"
44+
45+
46+
- name: "Lint"
47+
run: "vendor/bin/phing lint"
48+
49+
coding-standards:
50+
name: "Coding Standard"
51+
52+
runs-on: "ubuntu-latest"
53+
54+
steps:
55+
- name: "Checkout"
56+
uses: "actions/checkout@v2"
57+
58+
- name: "Install PHP"
59+
uses: "shivammathur/setup-php@v2"
60+
with:
61+
coverage: "none"
62+
php-version: "7.4"
63+
64+
- name: "Validate Composer"
65+
run: "composer validate"
66+
67+
- name: "Install dependencies"
68+
run: "composer install --no-interaction --no-progress --no-suggest"
69+
70+
- name: "Lint"
71+
run: "vendor/bin/phing lint"
72+
73+
- name: "Coding Standard"
74+
run: "vendor/bin/phing cs"
75+
76+
tests:
77+
name: "Tests"
78+
runs-on: "ubuntu-latest"
79+
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
php-version:
84+
- "7.1"
85+
- "7.2"
86+
- "7.3"
87+
- "7.4"
88+
- "8.0"
89+
dependencies:
90+
- "lowest"
91+
- "highest"
92+
93+
steps:
94+
- name: "Checkout"
95+
uses: "actions/checkout@v2"
96+
97+
- name: "Install PHP"
98+
uses: "shivammathur/setup-php@v2"
99+
with:
100+
coverage: "none"
101+
php-version: "${{ matrix.php-version }}"
102+
103+
- name: "Install lowest dependencies"
104+
if: ${{ matrix.dependencies == 'lowest' }}
105+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
106+
107+
- name: "Install highest dependencies"
108+
if: ${{ matrix.dependencies == 'highest' }}
109+
run: "composer update --no-interaction --no-progress --no-suggest"
110+
111+
- name: "Update PHPUnit"
112+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
113+
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"
114+
115+
- name: "Tests"
116+
run: "vendor/bin/phing tests"
117+
118+
static-analysis:
119+
name: "PHPStan"
120+
runs-on: "ubuntu-latest"
121+
122+
strategy:
123+
fail-fast: false
124+
matrix:
125+
php-version:
126+
- "7.1"
127+
- "7.2"
128+
- "7.3"
129+
- "7.4"
130+
- "8.0"
131+
dependencies:
132+
- "lowest"
133+
- "highest"
134+
135+
steps:
136+
- name: "Checkout"
137+
uses: "actions/checkout@v2"
138+
139+
- name: "Install PHP"
140+
uses: "shivammathur/setup-php@v2"
141+
with:
142+
coverage: "none"
143+
php-version: "${{ matrix.php-version }}"
144+
extensions: mbstring
145+
tools: composer:v2
146+
147+
- name: "Install lowest dependencies"
148+
if: ${{ matrix.dependencies == 'lowest' }}
149+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
150+
151+
- name: "Install highest dependencies"
152+
if: ${{ matrix.dependencies == 'highest' }}
153+
run: "composer update --no-interaction --no-progress --no-suggest"
154+
155+
- name: "Update PHPUnit"
156+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
157+
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"
158+
159+
- name: "PHPStan"
160+
run: "vendor/bin/phing phpstan"

‎.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Doctrine extensions for PHPStan
22

3-
[![Build Status](https://travis-ci.com/phpstan/phpstan-doctrine.svg?branch=master)](https://travis-ci.com/phpstan/phpstan-doctrine)
3+
[![Build](https://github.com/phpstan/phpstan-doctrine/workflows/Build/badge.svg)](https://github.com/phpstan/phpstan-doctrine/actions)
44
[![Latest Stable Version](https://poser.pugx.org/phpstan/phpstan-doctrine/v/stable)](https://packagist.org/packages/phpstan/phpstan-doctrine)
55
[![License](https://poser.pugx.org/phpstan/phpstan-doctrine/license)](https://packagist.org/packages/phpstan/phpstan-doctrine)
66

‎build-cs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/composer.lock
2+
/vendor

‎build-cs/composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"require-dev": {
3+
"consistence/coding-standard": "^3.10",
4+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
5+
"slevomat/coding-standard": "^6.4"
6+
}
7+
}

‎build.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,18 @@
3636

3737
<target name="cs">
3838
<exec
39-
executable="vendor/bin/phpcs"
39+
executable="composer"
40+
logoutput="true"
41+
passthru="true"
42+
checkreturn="true"
43+
>
44+
<arg value="install"/>
45+
<arg value="--working-dir"/>
46+
<arg path="build-cs"/>
47+
<arg value="--ansi"/>
48+
</exec>
49+
<exec
50+
executable="build-cs/vendor/bin/phpcs"
4051
logoutput="true"
4152
passthru="true"
4253
checkreturn="true"
@@ -52,7 +63,7 @@
5263

5364
<target name="cs-fix">
5465
<exec
55-
executable="vendor/bin/phpcbf"
66+
executable="build-cs/vendor/bin/phpcbf"
5667
logoutput="true"
5768
passthru="true"
5869
checkreturn="true"

‎composer.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@
1717
"doctrine/persistence": "<1.3"
1818
},
1919
"require-dev": {
20-
"consistence/coding-standard": "^3.10",
21-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
20+
"doctrine/annotations": "^1.10.0",
2221
"doctrine/collections": "^1.0",
2322
"doctrine/common": "^2.7 || ^3.0",
2423
"doctrine/mongodb-odm": "^1.3 || ^2.1",
2524
"doctrine/orm": "^2.5",
2625
"doctrine/persistence": "^1.1 || ^2.0",
27-
"phing/phing": "^2.16.0",
26+
"phing/phing": "^2.16.3",
2827
"php-parallel-lint/php-parallel-lint": "^1.2",
29-
"phpstan/phpstan-phpunit": "^0.12",
30-
"phpstan/phpstan-strict-rules": "^0.12",
31-
"phpunit/phpunit": "^7.0",
32-
"ramsey/uuid-doctrine": "^1.5.0",
33-
"slevomat/coding-standard": "^6.4"
28+
"phpstan/phpstan-phpunit": "^0.12.16",
29+
"phpstan/phpstan-strict-rules": "^0.12.5",
30+
"phpunit/phpunit": "^7.5.20",
31+
"ramsey/uuid-doctrine": "^1.5.0"
3432
},
3533
"config": {
3634
"platform": {
35+
"php": "7.3.24",
3736
"ext-mongo": "1.6.16"
3837
},
3938
"sort-packages": true

‎phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<ruleset name="PHPStan Doctrine">
3-
<rule ref="vendor/consistence/coding-standard/Consistence/ruleset.xml">
3+
<rule ref="build-cs/vendor/consistence/coding-standard/Consistence/ruleset.xml">
44
<exclude name="Squiz.Functions.GlobalFunction.Found"/>
55
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
66
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>

‎tests/DoctrineIntegration/ODM/document-manager.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
<?php declare(strict_types = 1);
22

33
use Doctrine\Common\Annotations\AnnotationReader;
4-
use Doctrine\Common\Annotations\AnnotationRegistry;
54
use Doctrine\Common\Cache\ArrayCache;
65
use Doctrine\ODM\MongoDB\Configuration;
76
use Doctrine\ODM\MongoDB\DocumentManager;
87
use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
98

10-
AnnotationRegistry::registerUniqueLoader('class_exists');
11-
129
$config = new Configuration();
1310
$config->setProxyDir(__DIR__);
1411
$config->setProxyNamespace('PHPstan\Doctrine\OdmProxies');

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /