Skip to content

Commit 81ffea5

Browse files
Drop support for Symfony < 5
1 parent 0533c16 commit 81ffea5

File tree

5 files changed

+20
-28
lines changed

5 files changed

+20
-28
lines changed

.travis.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,9 @@ language: php
33
matrix:
44
include:
55
- php: 7.2
6-
env: SYMFONY_VERSION=3.4.*
7-
- php: 7.2
8-
env: SYMFONY_VERSION=4.0.*
9-
- php: 7.4
10-
env: SYMFONY_VERSION=5.0.*
11-
12-
before_install:
13-
- >
14-
composer require --dev --no-update symfony/framework-bundle "$SYMFONY_VERSION" &&
15-
composer require --dev --no-update symfony/console "$SYMFONY_VERSION" &&
16-
composer require --dev --no-update symfony/validator "$SYMFONY_VERSION" &&
17-
composer require --dev --no-update symfony/form "$SYMFONY_VERSION" &&
18-
composer require --dev --no-update symfony/yaml "$SYMFONY_VERSION" &&
19-
composer require --dev --no-update symfony/finder "$SYMFONY_VERSION" &&
20-
composer require --dev --no-update symfony/translation "$SYMFONY_VERSION"
216

227
install:
23-
- composer update --prefer-dist
8+
- composer install --prefer-dist
249

2510
script:
2611
- vendor/bin/php-cs-fixer fix -v --diff --dry-run

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
}
2424
},
2525
"require": {
26-
"php": ">=7.1",
27-
"symfony/form": "~3.4|~4.0|~5.0",
28-
"symfony/console": "~3.4|~4.0|~5.0",
29-
"symfony/translation": "~3.4|~4.0|~5.0"
26+
"php": ">=7.2",
27+
"symfony/form": "~5.0",
28+
"symfony/console": "~5.0",
29+
"symfony/translation": "~5.0"
3030
},
3131
"require-dev": {
3232
"beberlei/assert": "~2.1",
3333
"behat/behat": "^3.6",
34-
"friendsofphp/php-cs-fixer": "^1.10|^2.2",
35-
"symfony/finder": "~3.4|~4.0|~5.0",
36-
"symfony/framework-bundle": "~3.4|~4.0|~5.0",
37-
"symfony/validator": "~3.4|~4.0|~5.0",
38-
"symfony/yaml": "~3.4|~4.0|~5.0",
39-
"symfony/security": "~3.4|~4.0|~5.0",
34+
"friendsofphp/php-cs-fixer": "^2.2",
35+
"symfony/finder": "~5.0",
36+
"symfony/framework-bundle": "~5.0",
37+
"symfony/validator": "~5.0",
38+
"symfony/yaml": "~5.0",
39+
"symfony/security-csrf": "~5.0",
4040
"phpunit/phpunit": "^7"
4141
}
4242
}

test/AppKernel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public function registerContainerConfiguration(LoaderInterface $loader)
2222
$loader->load(__DIR__.'/config.yml');
2323
}
2424

25+
public function getProjectDir()
26+
{
27+
return __DIR__;
28+
}
29+
2530
public function getCacheDir()
2631
{
2732
return __DIR__.'/temp/cache';

test/Command/PrintFormDataCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class PrintFormDataCommand extends DynamicFormBasedCommand
1010
{
11-
protected function execute(InputInterface $input, OutputInterface $output)
11+
protected function execute(InputInterface $input, OutputInterface $output): int
1212
{
1313
$formData = $this->formData();
1414

@@ -21,5 +21,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
2121
}, (array)$formData);
2222

2323
$output->write(print_r($printData, true));
24+
25+
return 0;
2426
}
2527
}

test/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ framework:
123123
handler_id: ~
124124
translator:
125125
paths:
126-
- "%kernel.root_dir%/translations"
126+
- "%kernel.project_dir%/translations"

0 commit comments

Comments
 (0)