Skip to content

Commit

Permalink
Merge branch '1.x' into allow-symfony-7
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-uret authored Jan 9, 2024
2 parents 26369ef + fa426a5 commit 73d1ffe
Show file tree
Hide file tree
Showing 16 changed files with 191 additions and 213 deletions.
7 changes: 3 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/tests export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/.php-cs-fixer.dist.php export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/ruleset.xml export-ignore
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- '*.x'
pull_request:

jobs:
phpunit:
name: PHP ${{ matrix.php }} ${{ matrix.env.COMPOSER_FLAGS }}
runs-on: ubuntu-20.04
env:
SYMFONY_DEPRECATIONS_HELPER: weak
PHPUNIT_FLAGS: "-v"
strategy:
fail-fast: false
matrix:
include:
- php: '7.2'
env:
SYMFONY_REQUIRE: "*"
- php: '7.3'
env:
SYMFONY_REQUIRE: "*"
- php: '7.4'
env:
SYMFONY_REQUIRE: "*"
- php: '8.0'
env:
SYMFONY_REQUIRE: "*"
- php: '8.1'
env:
SYMFONY_REQUIRE: "*"
- php: '8.2'
env:
SYMFONY_REQUIRE: "*"
- php: '7.2'
env:
COMPOSER_FLAGS: "--prefer-lowest"
- php: '8.0'
env:
COMPOSER_FLAGS: "--prefer-lowest"

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

- name: Checkout code
uses: actions/checkout@v2

- name: Install composer dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress --no-ansi ${COMPOSER_FLAGS}
vendor/bin/simple-phpunit install
- name: Execute tests
run: |
composer validate --strict --no-check-lock
vendor/bin/simple-phpunit
40 changes: 40 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Static analysis

on:
push:
branches:
- '*.x'
pull_request:

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Downgrade composer and require extra extensions
# setting composer config version to be able to install with outdated composer version, see https://github.com/OskarStark/phpstan-ga/pull/50
run: |
composer config version 1.3.3
composer require --no-update phpstan/phpstan-symfony
- name: PHPStan
uses: docker://oskarstark/phpstan-ga
with:
args: analyze --no-progress

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --dry-run --diff
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/composer.lock
/.idea
/.php_cs.cache
/.php-cs-fixer.cache
37 changes: 37 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

$finder = PhpCsFixer\Finder::create()
->notPath('src/AppBundle/Command/TestCommand.php')
->exclude('tests/*/Fixtures')
->exclude('var')
->in(__DIR__);

$config = new PhpCsFixer\Config();

return $config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'non_printable_character' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'random_api_migration' => true,
'psr_autoloading' => true,
'strict_param' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'phpdoc_no_empty_return' => false,
'no_superfluous_phpdoc_tags' => true,
])
->setFinder(
$finder
);
26 changes: 0 additions & 26 deletions .php_cs.dist

This file was deleted.

5 changes: 0 additions & 5 deletions .styleci.yml

This file was deleted.

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

This file was deleted.

19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed
### Security

## 1.4.0 - 2023-03-27

### Fixed

* Compatibility with Symfony 6

### Removed

* Support for PHP 7.1

## 1.3.3 - 2022-01-19

### Fixed

* Deprecation notices

### Removed

* Support for Symfony < 5

## 1.3.2 - 2022-01-19

Expand Down
19 changes: 1 addition & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,7 @@ A [Symfony](http://symfony.com/) bundle for the [Rokka](https://rokka.io/) image

Free account plans are available. Just install the plugin, register and use it.

## Installation Symfony version <= 3

Require the bundle using composer:

`composer require rokka/client-bundle`

Add it to `app/AppKernel.php`

```
$bundles = array(
...
new Rokka\RokkaClientBundle\RokkaClientBundle(),
);
```

Configure the bundle with the parameters below.

## Installation Symfony version >= 4
## Installation

The rokka Symfony bundle comes with a flex recipe.

Expand Down
15 changes: 5 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,14 @@
"psr-4": { "Rokka\\RokkaClientBundle\\Tests\\": "tests" }
},
"require": {
"php": "^7.1 || ^8.0",
"php": "^7.2 || ^8.0",
"rokka/client": "^1.10",
"rokka/client-cli": "^1.8",
"symfony/framework-bundle": "^3.4.26 || ^4.3 || ^5.0 || ^6.0 || ^7.0",
"rokka/client-cli": "^1.9",
"symfony/framework-bundle": "^5.2 || ^6.0 || ^7.0",
"rokka/twig": "^1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.0",
"symfony/phpunit-bridge": "^5.0"
},
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
"friendsofphp/php-cs-fixer": "^3.0",
"symfony/phpunit-bridge": "^5.2 || ^6.0"
}
}
6 changes: 6 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
level: 7
paths:
- src/
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
Loading

0 comments on commit 73d1ffe

Please sign in to comment.