Skip to content

Commit e0f8afc

Browse files
authored
Merge pull request #6 from timonf/symfony-upgrade
Upgrade to Symfony 4 and higher
2 parents 1822233 + 2b99287 commit e0f8afc

20 files changed

+185
-106
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = LF
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{dist,json,lock,neon,php,xml,yml}]
10+
indent_style = space
11+
indent_size = 4

.github/workflows/test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "Test"
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 04 * * 1' # At 04:00 on Monday.
8+
9+
jobs:
10+
tests:
11+
name: "Tests"
12+
13+
runs-on: ${{ matrix.operating-system }}
14+
15+
strategy:
16+
matrix:
17+
dependencies: ["lowest", "highest"]
18+
php-version:
19+
- "7.4"
20+
- "8.0"
21+
- "8.1"
22+
operating-system: ["ubuntu-latest"]
23+
24+
steps:
25+
- name: "Checkout"
26+
uses: "actions/checkout@v2"
27+
28+
- name: "Install PHP"
29+
uses: "shivammathur/setup-php@v2"
30+
with:
31+
coverage: "none"
32+
php-version: "${{ matrix.php-version }}"
33+
34+
- name: "Cache dependencies"
35+
uses: "actions/cache@v2"
36+
with:
37+
path: "~/.composer/cache"
38+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
39+
restore-keys: "php-${{ matrix.php-version }}-composer-"
40+
41+
- name: "Install lowest dependencies"
42+
if: ${{ matrix.dependencies == 'lowest' }}
43+
run: "composer update --prefer-lowest --prefer-dist --no-interaction --no-progress --no-suggest"
44+
45+
- name: "Install highest dependencies"
46+
if: ${{ matrix.dependencies == 'highest' }}
47+
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest"
48+
49+
- name: "Unit tests"
50+
run: "vendor/bin/phpunit --colors"
51+
52+
- name: "Coding style"
53+
run: "vendor/bin/phpcs --report=summary"
54+
55+
- name: "Static analysis"
56+
run: "vendor/bin/phpstan --configuration=phpstan.neon --no-progress"

.scrutinizer.yml

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

.travis.yml

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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012-2016 brainbits GmbH (http://www.brainbits.net)
1+
Copyright (c) 2012-2021 brainbits GmbH (https://www.brainbits.net)
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
Transcoder Bundle
22
=================
33

4-
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/c4ed9ba2-820a-4e27-8439-40133427ffdc/mini.png)](https://insight.sensiolabs.com/projects/c4ed9ba2-820a-4e27-8439-40133427ffdc)
5-
[![Build Status](https://travis-ci.org/brainbits/transcoder-bundle.svg?branch=master)](https://travis-ci.org/brainbits/transcoder-bundle)
6-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/brainbits/transcoder-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/brainbits/transcoder-bundle/?branch=master)
7-
[![Scrutinizer Code Coverage](https://scrutinizer-ci.com/g/brainbits/transcoder-bundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/brainbits/transcoder-bundle/?branch=master)
84
[![Latest Stable Version](https://poser.pugx.org/brainbits/transcoder-bundle/v/stable.svg)](https://packagist.org/packages/brainbits/transcoder-bundle)
95
[![Total Downloads](https://poser.pugx.org/brainbits/transcoder-bundle/downloads.svg)](https://packagist.org/packages/brainbits/transcoder-bundle)
10-
[![Dependency Status](https://www.versioneye.com/php/brainbits:transcoder-bundle/master/badge.svg)](https://www.versioneye.com/php/brainbits:transcoder-bundle/master)
6+
[![Tests](https://github.com/brainbits/transcoder-bundle/actions/workflows/test.yml/badge.svg)](https://github.com/brainbits/transcoder-bundle/actions)
117

128
The Transcoder Bundle provides methods to transcode data.

composer.json

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "brainbits/transcoder-bundle",
33
"description": "Bundle for encoding, decoding transcoding data.",
44
"keywords": ["symfony", "encoder", "decoder"],
5-
"homepage": "http://brainbits.net",
5+
"homepage": "https://www.brainbits.net",
66
"license": "MIT",
77
"authors": [
88
{
@@ -19,26 +19,35 @@
1919
}
2020
],
2121
"require": {
22-
"php": "^7.1",
23-
"brainbits/transcoder": "^3.0"
22+
"php": "^7.4|^8.0",
23+
"brainbits/transcoder": "^4.0",
24+
"symfony/config": ">=4.4.12",
25+
"symfony/dependency-injection": ">=4.4.12",
26+
"symfony/http-kernel": ">=4.4"
2427
},
2528
"require-dev": {
26-
"phpunit/phpunit": "^6.0",
27-
"symfony/config": "^2.8|^3.0",
28-
"symfony/dependency-injection": "^2.8|^3.0",
29-
"symfony/http-kernel": "^2.8|^3.0",
30-
"matthiasnoback/symfony-config-test": "^3.0",
31-
"matthiasnoback/symfony-dependency-injection-test": "^2.0"
29+
"brainbits/phpcs-standard": "^5.0",
30+
"brainbits/phpstan-rules": "^2.0",
31+
"jangregor/phpstan-prophecy": "^0.8.1",
32+
"matthiasnoback/symfony-config-test": "^4.3",
33+
"matthiasnoback/symfony-dependency-injection-test": "^4.3",
34+
"phpspec/prophecy-phpunit": "^2.0",
35+
"phpstan/phpstan": "^0.12.99",
36+
"phpunit/phpunit": "^9.5",
37+
"squizlabs/php_codesniffer": "^3.6"
3238
},
3339
"autoload": {
3440
"psr-4": { "Brainbits\\TranscoderBundle\\": "src/" }
3541
},
3642
"autoload-dev": {
3743
"psr-4": { "Brainbits\\TranscoderBundle\\Tests\\": "tests/" }
3844
},
45+
"config": {
46+
"sort-packages": true
47+
},
3948
"extra": {
4049
"branch-alias": {
41-
"dev-master": "3.0-dev"
50+
"dev-master": "4.0-dev"
4251
}
4352
},
4453
"minimum-stability": "dev",

phpcs.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0"?>
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
3+
<file extension="php">src/</file>
4+
<file extension="php">tests/</file>
5+
<arg name="basepath" value="." />
6+
<arg name="colors" />
7+
<rule ref="Brainbits" />
8+
</ruleset>

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
parameters:
2+
level: max
3+
paths:
4+
- src
5+
- tests
6+
bootstrapFiles:
7+
- vendor/autoload.php
8+
includes:
9+
- vendor/jangregor/phpstan-prophecy/extension.neon
10+
- vendor/brainbits/phpstan-rules/rules.neon

phpunit.xml.dist

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
<phpunit backupGlobals="false"
2-
backupStaticAttributes="false"
3-
colors="true"
4-
convertErrorsToExceptions="true"
5-
convertNoticesToExceptions="true"
6-
convertWarningsToExceptions="true"
7-
syntaxCheck="true">
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
</coverage>
88
<testsuite name="transcoder-bundle">
99
<directory>tests</directory>
1010
</testsuite>
11-
<filter>
12-
<whitelist>
13-
<directory suffix=".php">src</directory>
14-
</whitelist>
15-
</filter>
1611
</phpunit>

0 commit comments

Comments
 (0)