Skip to content

Commit 7ce41e1

Browse files
Add Symfony 7 support ; drop Symfony < 5.4 support and PHP < 8 support (#258)
* Fix tests * Add SF 7 support * Update CI * Fix cs * Solve tests deprecations * Update gitattributes * Bump ci
1 parent 8ac8ff5 commit 7ce41e1

File tree

14 files changed

+75
-83
lines changed

14 files changed

+75
-83
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.env.dist export-ignore
66
.gitattributes export-ignore
77
.gitignore export-ignore
8-
.php_cs export-ignore
8+
.php-cs-fixer.php export-ignore
99
.scrutinizer.yml export-ignore
1010
.travis.yml export-ignore
1111
.styleci.yml export-ignore

.github/workflows/test.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ jobs:
1111
strategy:
1212
matrix:
1313
php-version:
14-
- 7.2
15-
- 7.3
16-
- 7.4
1714
- 8.0
1815
- 8.1
16+
- 8.2
17+
- 8.3
1918
dependencies: [highest]
2019

2120
steps:
2221
- name: Checkout
23-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2423

2524
- name: Install PHP with extensions
2625
uses: shivammathur/setup-php@v2
@@ -31,7 +30,7 @@ jobs:
3130
extensions: zip
3231

3332
- name: Install Composer dependencies
34-
uses: ramsey/composer-install@v1
33+
uses: ramsey/composer-install@v2
3534
with:
3635
dependency-versions: ${{ matrix.dependencies }}
3736
composer-options: --prefer-dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/.env
77

88
# PHP CS Fixer
9-
/.php_cs.cache
9+
/.php-cs-fixer.cache
1010

1111
# PHPUnit
1212
/build

.php_cs renamed to .php-cs-fixer.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
->in(__DIR__)
1717
->exclude('vendor');
1818

19-
return Config::create()
19+
$config = new Config();
20+
21+
return $config
2022
->setUsingCache(true)
2123
->setRules([
22-
'@Symfony' => true,
23-
'array_syntax' => ['syntax' => 'short'],
24-
'ordered_imports' => true,
25-
'yoda_style' => false,
24+
'@Symfony' => true,
25+
'array_syntax' => ['syntax' => 'short'],
26+
'ordered_imports' => true,
27+
'yoda_style' => false,
2628
])
2729
->setFinder($finder);

composer.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,33 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.1|^8.0",
20+
"php": "^8.0",
2121
"ext-zip": "*",
2222
"ext-json": "*",
23-
"symfony/asset": "^4.4 || ^5.0 || ^6.0",
24-
"symfony/config": "^4.4 || ^5.0 || ^6.0",
25-
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
26-
"symfony/expression-language": "^4.4 || ^5.0 || ^6.0",
27-
"symfony/form": "^4.4 || ^5.0 || ^6.0",
28-
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
29-
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0",
30-
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0",
31-
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
32-
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
33-
"symfony/routing": "^4.4 || ^5.0 || ^6.0",
34-
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0",
23+
"symfony/asset": "^5.4 || ^6.0 || ^7.0",
24+
"symfony/config": "^5.4 || ^6.0 || ^7.0",
25+
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
26+
"symfony/expression-language": "^5.4 || ^6.0 || ^7.0",
27+
"symfony/form": "^5.4 || ^6.0 || ^7.0",
28+
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
29+
"symfony/http-foundation": "^5.4 || ^6.0 || ^7.0",
30+
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
31+
"symfony/options-resolver": "^5.4 || ^6.0 || ^7.0",
32+
"symfony/property-access": "^5.4 || ^6.0 || ^7.0",
33+
"symfony/routing": "^5.4 || ^6.0 || ^7.0",
34+
"symfony/twig-bundle": "^5.4 || ^6.0 || ^7.0",
3535
"twig/twig": "^2.4 || ^3.0"
3636
},
3737
"conflict": {
3838
"sebastian/environment": "<1.3.4",
3939
"sebastian/exporter": "<2.0.0"
4040
},
4141
"require-dev": {
42-
"friendsofphp/php-cs-fixer": "^2.0",
43-
"matthiasnoback/symfony-dependency-injection-test": "^3.0 || ^4.0",
44-
"symfony/console": "^4.4 || ^5.0 || ^6.0",
45-
"symfony/phpunit-bridge": "^4.4 || ^5.0 || ^6.0",
46-
"symfony/yaml": "^4.4 || ^5.0 || ^6.0"
42+
"friendsofphp/php-cs-fixer": "^3.41",
43+
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
44+
"symfony/console": "^5.4 || ^6.0 || ^7.0",
45+
"symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0",
46+
"symfony/yaml": "^5.4 || ^6.0 || ^7.0"
4747
},
4848
"suggest": {
4949
"egeloen/form-extra-bundle": "Allows to load CKEditor asynchronously"

src/Builder/JsonBuilder.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ public function setValues(array $values, string $pathPrefix = null): self
8383
return $this;
8484
}
8585

86-
/**
87-
* @param mixed $value
88-
*/
89-
public function setValue(string $path, $value, bool $escapeValue = true): self
86+
public function setValue(string $path, mixed $value, bool $escapeValue = true): self
9087
{
9188
if (!$escapeValue) {
9289
$placeholder = uniqid('friendsofsymfony', true);

src/Config/CKEditorConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function getToolbar(string $name): array
275275

276276
foreach ($this->toolbarConfigs[$name] as $name => $item) {
277277
$items[] = is_string($item) && '@' === substr($item, 0, 1)
278-
? $this->toolbarItems[(substr($item, 1))]
278+
? $this->toolbarItems[substr($item, 1)]
279279
: $item;
280280
}
281281

src/Exception/BadProxyUrlException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212

1313
namespace FOS\CKEditorBundle\Exception;
1414

15-
use RuntimeException;
16-
1715
/**
1816
* @author Marko Kunic <[email protected]>
1917
*/
20-
final class BadProxyUrlException extends RuntimeException implements FOSCKEditorException
18+
final class BadProxyUrlException extends \RuntimeException implements FOSCKEditorException
2119
{
2220
public static function fromEnvUrl(string $url): self
2321
{

src/Exception/ConfigException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212

1313
namespace FOS\CKEditorBundle\Exception;
1414

15-
use RuntimeException;
16-
1715
/**
1816
* @author GeLo <[email protected]>
1917
*/
20-
final class ConfigException extends RuntimeException implements FOSCKEditorException
18+
final class ConfigException extends \RuntimeException implements FOSCKEditorException
2119
{
2220
public static function configDoesNotExist(string $name): self
2321
{

src/Exception/FOSCKEditorException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212

1313
namespace FOS\CKEditorBundle\Exception;
1414

15-
use Throwable;
16-
1715
/**
1816
* @author GeLo <[email protected]>
1917
*/
20-
interface FOSCKEditorException extends Throwable
18+
interface FOSCKEditorException extends \Throwable
2119
{
2220
}

0 commit comments

Comments
 (0)