Skip to content

Commit f2f652b

Browse files
author
Stanley Situ
authored
update symfony version to ^3.4|^4.0 (#2)
* update symfony version to ^3.4|^4.0 * add github action workflow * remove preceding "dot" in ".workflow" * add missing ci-test script definition * remove travis-ci
1 parent 791737a commit f2f652b

4 files changed

Lines changed: 74 additions & 41 deletions

File tree

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
9+
runs-on: ubuntu-18.04
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: [ '7.2', '7.3', '7.4' ]
14+
composer: [ '', '--prefer-lowest' ]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Use PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php }}
23+
extensions: sqlite3, zip
24+
coverage: xdebug
25+
tools: composer:v1
26+
27+
- name: Get Composer Cache Directory
28+
id: composer-cache
29+
run: |
30+
echo "::set-output name=dir::$(composer config cache-dir)"
31+
working-directory: ./
32+
33+
- name: cache dependencies
34+
id: cache-dependencies
35+
uses: actions/cache@v1
36+
with:
37+
path: ${{ steps.composer-cache.outputs.dir }}
38+
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-${{ hashFiles('**/composer.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-
41+
42+
- name: Validate composer.json and composer.lock
43+
run: composer validate
44+
working-directory: ./
45+
46+
- name: Install dependencies
47+
env:
48+
COMPOSER_FLAGS: ${{ matrix.composer }}
49+
run: composer update ${COMPOSER_FLAGS} --prefer-source
50+
working-directory: ./
51+
52+
53+
- name: Run Tests
54+
run: composer run-script ci-test
55+
working-directory: ./
56+
env:
57+
SYMFONY_DEPRECATIONS_HELPER: weak

.travis.yml

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

Tests/Resources/config/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ framework:
1616
collect: false
1717

1818
twig:
19-
debug: %kernel.debug%
20-
strict_variables: %kernel.debug%
19+
debug: "%kernel.debug%"
20+
strict_variables: "%kernel.debug%"
2121

composer.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@
1010
"authors": [
1111
{
1212
"name": "Jeffrey Wong",
13-
"email": "jwong@dayspring-tech.com",
14-
"homepage": "http://dayspring-tech.com"
13+
"email": "jwong@dayspringpartners.com",
14+
"homepage": "https://dayspringpartners.com"
15+
},
16+
{
17+
"name": "Stanley Situ",
18+
"email": "ssitu@dayspringpartners.com",
19+
"homepage": "https://dayspringpartners.com"
1520
}
1621
],
1722
"require": {
1823
"php": ">=7.0",
19-
"symfony/framework-bundle": "~3.0",
20-
"symfony/symfony": "^3.0",
24+
"symfony/framework-bundle": "^3.4|^4.0",
25+
"symfony/symfony": "^3.4|^4.0",
2126
"phpunit/phpunit": "^6.0"
2227

2328
},
@@ -28,5 +33,11 @@
2833
"exclude-from-classmap": [
2934
"Tests/"
3035
]
36+
},
37+
"scripts": {
38+
"ci-test": [
39+
"Composer\\Config::disableProcessTimeout",
40+
"vendor/phpunit/phpunit/phpunit -c ./phpunit.xml.dist"
41+
]
3142
}
3243
}

0 commit comments

Comments
 (0)