* fixed php versions used in travis #120 * fixed broken test #120 * updated developer docu
This commit is contained in:
11
.travis.yml
11
.travis.yml
@@ -8,12 +8,8 @@ cache:
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- php: 5.5
|
- php: 7.1
|
||||||
- php: 5.6
|
- php: 7.2
|
||||||
- php: 7.0
|
|
||||||
- php: hhvm
|
|
||||||
allow_failures:
|
|
||||||
- php: hhvm
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi
|
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi
|
||||||
@@ -23,4 +19,5 @@ install:
|
|||||||
- composer install
|
- composer install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- phpunit
|
- vendor/bin/phpunit --exclude-group integration tests/
|
||||||
|
- vendor/bin/phpunit --group integration tests/
|
||||||
|
|||||||
54
composer.lock
generated
54
composer.lock
generated
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "c087646a948295bf4d813107007bed9b",
|
"content-hash": "c087646a948295bf4d813107007bed9b",
|
||||||
@@ -4957,16 +4957,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dama/doctrine-test-bundle",
|
"name": "dama/doctrine-test-bundle",
|
||||||
"version": "v5.0.0",
|
"version": "v5.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/dmaicher/doctrine-test-bundle.git",
|
"url": "https://github.com/dmaicher/doctrine-test-bundle.git",
|
||||||
"reference": "ccdea2ce9fec5048385d1b9b5bc7c4c3f32ab48f"
|
"reference": "c02ff7a3e8502c3ed93b3f40354685e36b9a500a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/ccdea2ce9fec5048385d1b9b5bc7c4c3f32ab48f",
|
"url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/c02ff7a3e8502c3ed93b3f40354685e36b9a500a",
|
||||||
"reference": "ccdea2ce9fec5048385d1b9b5bc7c4c3f32ab48f",
|
"reference": "c02ff7a3e8502c3ed93b3f40354685e36b9a500a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5010,7 +5010,7 @@
|
|||||||
"symfony 2",
|
"symfony 2",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
],
|
||||||
"time": "2018-02-05T12:10:27+00:00"
|
"time": "2018-02-25T14:57:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/data-fixtures",
|
"name": "doctrine/data-fixtures",
|
||||||
@@ -5734,16 +5734,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "5.3.0",
|
"version": "5.3.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1"
|
"reference": "c89677919c5dd6d3b3852f230a663118762218ac"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
|
||||||
"reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1",
|
"reference": "c89677919c5dd6d3b3852f230a663118762218ac",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5793,7 +5793,7 @@
|
|||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2017-12-06T09:29:45+00:00"
|
"time": "2018-04-06T15:36:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
@@ -5983,16 +5983,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "6.5.6",
|
"version": "6.5.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "3330ef26ade05359d006041316ed0fa9e8e3cefe"
|
"reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3330ef26ade05359d006041316ed0fa9e8e3cefe",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4f21a3c6b97c42952fd5c2837bb354ec0199b97b",
|
||||||
"reference": "3330ef26ade05359d006041316ed0fa9e8e3cefe",
|
"reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -6063,20 +6063,20 @@
|
|||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2018-02-01T05:57:37+00:00"
|
"time": "2018-04-10T11:38:34+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit-mock-objects",
|
"name": "phpunit/phpunit-mock-objects",
|
||||||
"version": "5.0.6",
|
"version": "5.0.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||||
"reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf"
|
"reference": "3eaf040f20154d27d6da59ca2c6e28ac8fd56dce"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3eaf040f20154d27d6da59ca2c6e28ac8fd56dce",
|
||||||
"reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
|
"reference": "3eaf040f20154d27d6da59ca2c6e28ac8fd56dce",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -6122,7 +6122,7 @@
|
|||||||
"mock",
|
"mock",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2018-01-06T05:45:45+00:00"
|
"time": "2018-05-29T13:50:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/code-unit-reverse-lookup",
|
"name": "sebastian/code-unit-reverse-lookup",
|
||||||
@@ -6685,16 +6685,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "squizlabs/php_codesniffer",
|
"name": "squizlabs/php_codesniffer",
|
||||||
"version": "3.2.2",
|
"version": "3.2.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||||
"reference": "d7c00c3000ac0ce79c96fcbfef86b49a71158cd1"
|
"reference": "4842476c434e375f9d3182ff7b89059583aa8b27"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7c00c3000ac0ce79c96fcbfef86b49a71158cd1",
|
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4842476c434e375f9d3182ff7b89059583aa8b27",
|
||||||
"reference": "d7c00c3000ac0ce79c96fcbfef86b49a71158cd1",
|
"reference": "4842476c434e375f9d3182ff7b89059583aa8b27",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -6704,7 +6704,7 @@
|
|||||||
"php": ">=5.4.0"
|
"php": ">=5.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0"
|
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"bin/phpcs",
|
"bin/phpcs",
|
||||||
@@ -6732,7 +6732,7 @@
|
|||||||
"phpcs",
|
"phpcs",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"time": "2017-12-19T21:44:46+00:00"
|
"time": "2018-02-20T21:35:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/browser-kit",
|
"name": "symfony/browser-kit",
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ class HelpControllerTest extends ControllerBaseTest
|
|||||||
$this->request($client, '/help/');
|
$this->request($client, '/help/');
|
||||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||||
$this->assertContains('<h1>Kimai documentation</h1>', $client->getResponse()->getContent());
|
$this->assertContains('<h1>Kimai documentation</h1>', $client->getResponse()->getContent());
|
||||||
$this->assertNotContains('<a href="/en/help/">', $client->getResponse()->getContent());
|
$this->assertContains('<a href="configurations">', $client->getResponse()->getContent());
|
||||||
|
$this->assertContains('<a href="developers">', $client->getResponse()->getContent());
|
||||||
|
$this->assertContains('<a href="users">', $client->getResponse()->getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testUsersPage()
|
public function testUsersPage()
|
||||||
@@ -35,7 +37,7 @@ class HelpControllerTest extends ControllerBaseTest
|
|||||||
$client = $this->getClientForAuthenticatedUser();
|
$client = $this->getClientForAuthenticatedUser();
|
||||||
$this->request($client, '/help/users');
|
$this->request($client, '/help/users');
|
||||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||||
$this->assertContains('<a href="/en/help/">', $client->getResponse()->getContent());
|
$this->assertContains('<a href="/en/help/">Back</a>', $client->getResponse()->getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidateRouteDoesNotAllowSpecialChars()
|
public function testValidateRouteDoesNotAllowSpecialChars()
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ yarn install
|
|||||||
|
|
||||||
To rebuild all assets you have to execute:
|
To rebuild all assets you have to execute:
|
||||||
```bash
|
```bash
|
||||||
npm run dev
|
yarn run dev
|
||||||
```
|
```
|
||||||
or
|
or
|
||||||
```bash
|
```bash
|
||||||
npm run prod
|
yarn run prod
|
||||||
```
|
```
|
||||||
|
|
||||||
You can find more information at:
|
You can find more information at:
|
||||||
@@ -43,14 +43,27 @@ You can find more information at:
|
|||||||
- https://symfony.com/doc/current/frontend/encore/installation.html
|
- https://symfony.com/doc/current/frontend/encore/installation.html
|
||||||
- https://symfony.com/doc/current/frontend.html
|
- https://symfony.com/doc/current/frontend.html
|
||||||
|
|
||||||
### Rebuilding assets for use in subdirectory
|
### Rebuilding assets for use in a subdirectory
|
||||||
|
|
||||||
If you want to run Kimai in a subdirectory, you have to rebuild the frontend assets with a different webpack configuration.
|
If you want to run Kimai in a subdirectory, you have to rebuild the frontend assets with a different webpack configuration.
|
||||||
Edit the file [webpack.config.js](../../webpack.config.js) and change `.setPublicPath('/build/')` to your needs.
|
Edit the file [webpack.config.js](../../webpack.config.js) and change `.setPublicPath('/build/')` to your needs.
|
||||||
|
After that re-compile the assets (see above).
|
||||||
|
|
||||||
After that re-compile the assets with:
|
## Running Unit tests
|
||||||
```bash
|
|
||||||
npm run prod
|
You can run unit and integration tests with built-in commands like that:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bin/console kimai:test-unit
|
||||||
|
bin/console kimai:test-integration
|
||||||
|
```
|
||||||
|
|
||||||
|
## Check your code styles
|
||||||
|
|
||||||
|
You can run the code sniffer with a built-in command like that:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bin/console kimai:phpcs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Extending the navigation bar
|
## Extending the navigation bar
|
||||||
|
|||||||
Reference in New Issue
Block a user