Skip to content

Commit e1ca31b

Browse files
authored
Merge pull request #35 from odolbeau/bump-requirements
Bump requirements
2 parents 8d7b1ea + 1bb40b8 commit e1ca31b

File tree

8 files changed

+45
-56
lines changed

8 files changed

+45
-56
lines changed

.travis.yml

+5-17
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,25 @@ branches:
1212
env:
1313
global:
1414
- TEST_COMMAND="composer test"
15-
- SYMFONY_PHPUNIT_VERSION="6.3"
1615

1716
matrix:
1817
fast_finish: true
1918
include:
2019
# Test with lowest dependencies
21-
- php: 7.1
20+
- php: 7.2
2221
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
23-
- php: 5.5
24-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" SYMFONY_PHPUNIT_VERSION="5.7"
2522

26-
# Test the latest stable release
27-
- php: 5.5
28-
env: SYMFONY_PHPUNIT_VERSION="5.7"
29-
- php: 5.6
30-
env: SYMFONY_PHPUNIT_VERSION="5.7"
31-
- php: 7.0
32-
- php: 7.1
33-
- php: 7.2
23+
- php: 7.3
3424
env: COVERAGE=true TEST_COMMAND="composer test-ci"
3525

3626
# Force some major versions of Symfony
37-
- php: 7.2
38-
env: DEPENDENCIES="dunglas/symfony-lock:^2"
39-
- php: 7.2
27+
- php: 7.3
4028
env: DEPENDENCIES="dunglas/symfony-lock:^3"
41-
- php: 7.2
29+
- php: 7.3
4230
env: DEPENDENCIES="dunglas/symfony-lock:^4"
4331

4432
# Latest commit to master
45-
- php: 7.2
33+
- php: 7.4snapshot
4634
env: STABILITY="dev"
4735

4836
allow_failures:

Changelog.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log
22

3-
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
3+
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
4+
5+
## Unreleased
6+
7+
### Removed
8+
9+
Support of php < 7.2
10+
Support of symfony < 3.4
411

512
## 1.0.1
613

@@ -20,10 +27,10 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
2027

2128
## 0.5.0
2229

23-
### Added
30+
### Added
2431

2532
- Support for php-translation/common: 0.3
26-
- Added the "name" attribute on the "unit" node for XLIFF 2.0.
33+
- Added the "name" attribute on the "unit" node for XLIFF 2.0.
2734

2835
## 0.4.0
2936

@@ -37,8 +44,8 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
3744

3845
### Removed
3946

40-
- Removed type annotation for first parameter of `FileStorage::__construct`. Type checks will be done with if-statements
41-
to support legacy code.
47+
- Removed type annotation for first parameter of `FileStorage::__construct`. Type checks will be done with if-statements
48+
to support legacy code.
4249

4350
## 0.3.3
4451

@@ -63,11 +70,11 @@ to support legacy code.
6370
### Added
6471

6572
- Added more tests
66-
- Improved loader and dumper of Xliff2.0 meta
73+
- Improved loader and dumper of Xliff2.0 meta
6774

6875
### Changed
6976

70-
- We will create an output file if no file exists.
77+
- We will create an output file if no file exists.
7178
- Xliff2.0 is default format
7279

7380
## 0.2.2

Readme.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Total Downloads](https://img.shields.io/packagist/dt/php-translation/symfony-storage.svg?style=flat-square)](https://packagist.org/packages/php-translation/symfony-storage)
88

99
This is an PHP-translation storage adapter that uses Symfony's translation writer
10-
and loader.
10+
and loader.
1111

1212
### Install
1313

@@ -18,8 +18,3 @@ composer require php-translation/symfony-storage
1818
### Documentation
1919

2020
Read our documentation at [http://php-translation.readthedocs.io](http://php-translation.readthedocs.io/en/latest/).
21-
22-
### Contribute
23-
24-
Do you want to make a change? This repository is READ ONLY. Submit your
25-
pull request to [php-translation/platform-adapter](https://github.com/php-translation/platform-adapter).

composer.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
}
1010
],
1111
"require": {
12-
"php": "^5.5 || ^7.0",
12+
"php": "^7.2",
1313
"php-translation/common": "^1.0",
14-
"symfony/translation": "^2.7 || ^3.0 || ^4.0",
14+
"symfony/translation": "^3.4 || ^4.2",
1515
"nyholm/nsa": "^1.1"
1616
},
1717
"require-dev": {
18-
"symfony/phpunit-bridge": "^3.4 || ^4.0",
19-
"symfony/framework-bundle": "^2.7.39 || ^3.0 || ^4.0"
18+
"phpunit/phpunit": "^8.4",
19+
"symfony/phpunit-bridge": "^4.2",
20+
"symfony/framework-bundle": " ^3.4 || ^4.2"
2021
},
2122
"autoload": {
2223
"psr-4": {
@@ -29,8 +30,8 @@
2930
}
3031
},
3132
"scripts": {
32-
"test": "vendor/bin/simple-phpunit",
33-
"test-ci": "vendor/bin/simple-phpunit --coverage-text --coverage-clover=build/coverage.xml"
33+
"test": "vendor/bin/phpunit",
34+
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
3435
},
3536
"extra": {
3637
"branch-alias": {

phpunit.xml.dist

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
12-
codecoverage="true"
1311
bootstrap="./vendor/autoload.php"
14-
>
12+
>
13+
14+
<listeners>
15+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
16+
</listeners>
1517

16-
<formatter type="clover" usefile="false"/>
1718
<testsuites>
1819
<testsuite name="Tests">
1920
<directory>./tests</directory>

tests/Unit/Dumper/XliffDumperTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ public function testDumpXliff12()
2626
$dumper = new XliffDumper();
2727
$output = $dumper->formatCatalogue($catalogue, 'messages', ['xliff_version' => '1.2']);
2828

29-
$this->assertContains('<source>key0</source>', $output);
30-
$this->assertContains('<target>trans0</target>', $output);
31-
$this->assertContains('<source>key1</source>', $output);
32-
$this->assertContains('<target>trans1</target>', $output);
29+
$this->assertStringContainsString('<source>key0</source>', $output);
30+
$this->assertStringContainsString('<target>trans0</target>', $output);
31+
$this->assertStringContainsString('<source>key1</source>', $output);
32+
$this->assertStringContainsString('<target>trans1</target>', $output);
3333
}
3434

3535
public function testDumpXliff20Meta()
@@ -49,7 +49,7 @@ public function testDumpXliff20Meta()
4949
$dumper = new XliffDumper();
5050
$output = $dumper->formatCatalogue($catalogue, 'messages', ['xliff_version' => '2.0']);
5151

52-
$this->assertContains('<note category="approved">yes</note>', $output);
53-
$this->assertContains('<note category="state">new</note>', $output);
52+
$this->assertStringContainsString('<note category="approved">yes</note>', $output);
53+
$this->assertStringContainsString('<note category="state">new</note>', $output);
5454
}
5555
}

tests/Unit/FileStorageTest.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ public function testConstructor()
3232
$this->assertInstanceOf(FileStorage::class, $storage);
3333
}
3434

35-
/**
36-
* @expectedException \LogicException
37-
*/
3835
public function testConstructorInvalidLoader()
3936
{
37+
$this->expectException(\LogicException::class);
38+
4039
new FileStorage(new TranslationWriter(), new TranslationWriter(), ['foo']);
4140
}
4241

43-
/**
44-
* @expectedException \LogicException
45-
*/
4642
public function testConstructorEmptyArray()
4743
{
44+
$this->expectException(\LogicException::class);
45+
4846
new FileStorage(new TranslationWriter(), $this->createTranslationLoader(), []);
4947
}
5048

tests/Unit/Loader/XliffLoaderTest.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121
*/
2222
class XliffLoaderTest extends TestCase
2323
{
24-
/**
25-
* @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException
26-
*/
2724
public function testEmptyContent()
2825
{
26+
$this->expectException(InvalidResourceException::class);
27+
2928
$loader = new XliffLoader();
3029
$loader->extractFromContent(' ', new MessageCatalogue('en'), 'messages');
3130
}
@@ -39,7 +38,7 @@ public function testInvalidContent()
3938
} catch (InvalidResourceException $e) {
4039
$invalidArgument = $e->getPrevious();
4140
$this->assertNotNull($invalidArgument);
42-
$this->assertContains('[ERROR 4] Start tag expected', $invalidArgument->getMessage());
41+
$this->assertStringContainsString('[ERROR 4] Start tag expected', $invalidArgument->getMessage());
4342

4443
return;
4544
}

0 commit comments

Comments
 (0)