Skip to content
This repository was archived by the owner on Nov 21, 2021. It is now read-only.

Commit 8e1580e

Browse files
authored
migrate to github actions (#8)
1 parent 5008c5e commit 8e1580e

3 files changed

Lines changed: 91 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Build
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
name: Test
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- php: 7.2
14+
- php: 7.3
15+
SYMFONY_REQUIRE: 4.4.*
16+
- php: 7.4
17+
SYMFONY_REQUIRE: 5.3.*
18+
- php: 8.0
19+
- php: 8.1
20+
stability: dev
21+
SYMFONY_REQUIRE: 6.0.*
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: "${{ matrix.php }}"
30+
coverage: none
31+
32+
- name: Configure Composer minimum stability
33+
if: matrix.stability
34+
run: composer config minimum-stability ${{ matrix.stability }}
35+
36+
- name: Install symfony/flex
37+
run: composer global require symfony/flex
38+
39+
- name: Install dependencies
40+
env:
41+
SYMFONY_REQUIRE: "${{ matrix.SYMFONY_REQUIRE }}"
42+
run: composer update ${{ matrix.composer-flags }} --prefer-dist
43+
44+
- name: Phpunit
45+
run: make test
46+
47+
php-stan:
48+
runs-on: ubuntu-latest
49+
name: php-stan
50+
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: "7.4"
58+
59+
- name: Install dependencies
60+
run: composer update --prefer-dist
61+
62+
- name: PHPStan
63+
run: make phpstan
64+
65+
cs-fixer:
66+
runs-on: ubuntu-latest
67+
name: CS-Fixer
68+
69+
steps:
70+
- uses: actions/checkout@v2
71+
72+
- name: Setup PHP
73+
uses: shivammathur/setup-php@v2
74+
with:
75+
php-version: "7.4"
76+
77+
- name: Install dependencies
78+
run: composer update --prefer-dist
79+
80+
- name: PHP CS Fixer
81+
run: make php_cs_fixer_check

.travis.yml

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

src/DataCollector.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ public function failCurrentRequest(): void
155155
$this->currentEndpoint = null;
156156
}
157157

158+
public function __serialize(): array
159+
{
160+
return $this->data;
161+
}
162+
163+
public function __unserialize(array $data): void
164+
{
165+
$this->data = $data;
166+
}
167+
158168
public function serialize()
159169
{
160170
return serialize($this->data);

0 commit comments

Comments
 (0)