Skip to content

Commit

Permalink
Test against newer PHP versions and use require/autoload-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehaertl committed Jan 7, 2020
1 parent f681040 commit b92efe9
Show file tree
Hide file tree
Showing 22 changed files with 65 additions and 28 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: php
php:
- "7.4"
- "7.3"
- "7.2"
- "7.1"
- "7.0"

install:
Expand Down
56 changes: 32 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
{
"name": "codemix/yii2-localeurls",
"description": "Automatic locale/language management for URLs.",
"keywords": ["yii2", "i18n", "locale"],
"type": "yii2-extension",
"license": "MIT",
"authors": [
{
"name": "Michael Härtl",
"email": "[email protected]"
}
],
"require": {
"yiisoft/yii2": "*"
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"autoload": {
"psr-4": {
"codemix\\localeurls\\": ""
}
"name": "codemix/yii2-localeurls",
"description": "Automatic locale/language management for URLs.",
"keywords": ["yii2", "i18n", "locale"],
"type": "yii2-extension",
"license": "MIT",
"authors": [
{
"name": "Michael Härtl",
"email": "[email protected]"
}
],
"require": {
"yiisoft/yii2": "*"
},
"require-dev": {
"phpunit/phpunit": ">4.0 <8"
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"autoload": {
"psr-4": {
"codemix\\localeurls\\": ""
}
},
"autoload-dev": {
"psr-4": {
"tests\\": "tests"
}
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
stderr="true"
bootstrap="./tests/bootstrap.php"
>
<testsuites>
Expand Down
1 change: 1 addition & 0 deletions tests/EventTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;
use \codemix\localeurls\LanguageChangedEvent;
Expand Down
6 changes: 4 additions & 2 deletions tests/RedirectTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
namespace tests;

use Yii;
use yii\helpers\Url;

class RedirectTest extends TestCase
Expand Down Expand Up @@ -47,7 +49,7 @@ class RedirectTest extends TestCase
'/custom' => 'test/action',
'/slug/<name>' => 'test/slug',
[
'class' => 'TestUrlRule',
'class' => '\tests\TestUrlRule',
],
[
'pattern' => '/slash',
Expand Down Expand Up @@ -179,7 +181,7 @@ class RedirectTest extends TestCase
'/custom' => 'test/action',
'/slug/<name>' => 'test/slug',
[
'class' => 'TestUrlRule',
'class' => '\tests\TestUrlRule',
],
[
'pattern' => '/slash',
Expand Down
1 change: 1 addition & 0 deletions tests/RedirectWithBaseUrlAndScriptNameTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/RedirectWithBaseUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/RedirectWithScriptNameTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/SlugRedirectTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/SlugRedirectWithBaseUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/SlugRedirectWithScriptNameAndBaseUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/SlugRedirectWithScriptNameTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
3 changes: 3 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
namespace tests;

use Yii;
use yii\helpers\ArrayHelper;
use yii\di\Container;

Expand Down
3 changes: 3 additions & 0 deletions tests/TestUrlRule.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
namespace tests;

use Yii;
use yii\web\UrlRuleInterface;

class TestUrlRule implements UrlRuleInterface
Expand Down
3 changes: 2 additions & 1 deletion tests/UrlCreationTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;
use yii\helpers\Url;

class UrlCreationTest extends TestCase
Expand Down Expand Up @@ -35,7 +36,7 @@ class UrlCreationTest extends TestCase
'/custom/<term:.+>/bar' => 'demo/custom',
'http://www.example.com/foo/<term:.+>/bar' => 'demo/absolute-slug',
[
'class' => 'TestUrlRule',
'class' => '\tests\TestUrlRule',
],
[
'pattern' => '/slash',
Expand Down
1 change: 1 addition & 0 deletions tests/UrlCreationWithBaseUrlAndScriptNameTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/UrlCreationWithBaseUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/UrlCreationWithScriptNameTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
2 changes: 2 additions & 0 deletions tests/UrlManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
namespace tests;

use Yii;
use yii\helpers\Url;

class UrlManagerTest extends TestCase
Expand Down
1 change: 1 addition & 0 deletions tests/UrlManagerWithBaseUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/UrlManagerWithScriptNameAndBaseUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down
1 change: 1 addition & 0 deletions tests/UrlManagerWithScriptNameTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace tests;

use yii\helpers\Url;

Expand Down

0 comments on commit b92efe9

Please sign in to comment.