From 2d809b4f06d5083a66bb618d9e2adabe9b152e15 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Fri, 17 Feb 2023 21:06:05 +0100 Subject: [PATCH] Release 1.30.8 (#3854) * fix weekly timesheets can delete wrong records * pin phpunit to prevent deprecations --- composer.json | 4 +- composer.lock | 352 +++++++++--------- src/Command/KimaiImporterCommand.php | 2 +- src/Constants.php | 4 +- src/DataFixtures/TeamFixtures.php | 14 +- src/Entity/Timesheet.php | 11 +- .../TimesheetBudgetUsedValidator.php | 16 +- .../Export/TimesheetExportRepositoryTest.php | 1 - .../TimesheetInvoiceItemRepositoryTest.php | 1 - .../TimesheetBudgetUsedValidatorTest.php | 1 + 10 files changed, 213 insertions(+), 193 deletions(-) diff --git a/composer.json b/composer.json index 18fdd2102..7a4525e66 100644 --- a/composer.json +++ b/composer.json @@ -86,8 +86,8 @@ "phpstan/phpstan": "^1.0", "phpstan/phpstan-doctrine": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-symfony": "^1.0", - "phpunit/phpunit": "^9.0", + "phpstan/phpstan-symfony": "1.2.18", + "phpunit/phpunit": "9.5.*", "symfony/browser-kit": "^4.4", "symfony/css-selector": "^4.4", "symfony/debug-bundle": "^4.4", diff --git a/composer.lock b/composer.lock index 776854742..d988a1283 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6e9c77287bc1717bd97278ef2410c6de", + "content-hash": "ece8e0ef7040f24d45aec3c3fb4cb482", "packages": [ { "name": "beberlei/doctrineextensions", @@ -187,16 +187,16 @@ }, { "name": "doctrine/annotations", - "version": "1.14.2", + "version": "1.14.3", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", "shasum": "" }, "require": { @@ -257,9 +257,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.2" + "source": "https://github.com/doctrine/annotations/tree/1.14.3" }, - "time": "2022-12-15T06:48:22+00:00" + "time": "2023-02-01T09:20:38+00:00" }, { "name": "doctrine/cache", @@ -1404,16 +1404,16 @@ }, { "name": "doctrine/persistence", - "version": "2.5.6", + "version": "2.5.7", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "7729fc2a7e5efc8bbfa408a3b8adeb8f5b84f5d1" + "reference": "e36f22765f4d10a7748228babbf73da5edfeed3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/7729fc2a7e5efc8bbfa408a3b8adeb8f5b84f5d1", - "reference": "7729fc2a7e5efc8bbfa408a3b8adeb8f5b84f5d1", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/e36f22765f4d10a7748228babbf73da5edfeed3c", + "reference": "e36f22765f4d10a7748228babbf73da5edfeed3c", "shasum": "" }, "require": { @@ -1486,7 +1486,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/2.5.6" + "source": "https://github.com/doctrine/persistence/tree/2.5.7" }, "funding": [ { @@ -1502,7 +1502,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T18:11:10+00:00" + "time": "2023-02-03T15:51:16+00:00" }, { "name": "doctrine/sql-formatter", @@ -1779,16 +1779,16 @@ }, { "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.13", + "version": "v1.0.14", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "88354616f4cf4f6620910fd035e282173ba453e8" + "reference": "a527c9d9d5348e012bd24482d83a5cd643bcbc9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/88354616f4cf4f6620910fd035e282173ba453e8", - "reference": "88354616f4cf4f6620910fd035e282173ba453e8", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/a527c9d9d5348e012bd24482d83a5cd643bcbc9e", + "reference": "a527c9d9d5348e012bd24482d83a5cd643bcbc9e", "shasum": "" }, "require": { @@ -1845,7 +1845,7 @@ ], "support": { "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.13" + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.14" }, "funding": [ { @@ -1857,7 +1857,7 @@ "type": "tidelift" } ], - "time": "2022-10-17T19:48:16+00:00" + "time": "2023-01-30T10:40:19+00:00" }, { "name": "friendsofsymfony/rest-bundle", @@ -1967,28 +1967,29 @@ }, { "name": "gedmo/doctrine-extensions", - "version": "v3.10.0", + "version": "v3.11.0", "source": { "type": "git", "url": "https://github.com/doctrine-extensions/DoctrineExtensions.git", - "reference": "5a956a448f67b917b05958429b224e8955dc9b8c" + "reference": "a2364710d2f367f74d9f041c3356f2929b8c6690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/5a956a448f67b917b05958429b224e8955dc9b8c", - "reference": "5a956a448f67b917b05958429b224e8955dc9b8c", + "url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/a2364710d2f367f74d9f041c3356f2929b8c6690", + "reference": "a2364710d2f367f74d9f041c3356f2929b8c6690", "shasum": "" }, "require": { "behat/transliterator": "~1.2", - "doctrine/annotations": "^1.13", - "doctrine/collections": "^1.0", + "doctrine/annotations": "^1.13 || ^2.0", + "doctrine/collections": "^1.2 || ^2.0", "doctrine/common": "^2.13 || ^3.0", - "doctrine/event-manager": "^1.2", + "doctrine/event-manager": "^1.2 || ^2.0", "doctrine/persistence": "^2.2 || ^3.0", "php": "^7.2 || ^8.0", "psr/cache": "^1 || ^2 || ^3", - "symfony/cache": "^4.4 || ^5.3 || ^6.0" + "symfony/cache": "^4.4 || ^5.3 || ^6.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0" }, "conflict": { "doctrine/cache": "<1.11", @@ -2005,7 +2006,7 @@ "doctrine/orm": "^2.10.2", "friendsofphp/php-cs-fixer": "^3.4.0,<3.10", "nesbot/carbon": "^2.55", - "phpstan/phpstan": "^1.1", + "phpstan/phpstan": "^1.9", "phpstan/phpstan-doctrine": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^8.5 || ^9.5", @@ -2021,7 +2022,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.11-dev" + "dev-main": "3.12-dev" } }, "autoload": { @@ -2067,10 +2068,10 @@ "support": { "email": "gediminas.morkevicius@gmail.com", "issues": "https://github.com/doctrine-extensions/DoctrineExtensions/issues", - "source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.10.0", + "source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.11.0", "wiki": "https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc" }, - "time": "2022-11-14T20:25:40+00:00" + "time": "2023-01-26T00:14:07+00:00" }, { "name": "handcraftedinthealps/rest-routing-bundle", @@ -2151,16 +2152,16 @@ }, { "name": "jms/metadata", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/metadata.git", - "reference": "283c714831d272d78ddd6e52e08ac16d76be30fd" + "reference": "7ca240dcac0c655eb15933ee55736ccd2ea0d7a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/283c714831d272d78ddd6e52e08ac16d76be30fd", - "reference": "283c714831d272d78ddd6e52e08ac16d76be30fd", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/7ca240dcac0c655eb15933ee55736ccd2ea0d7a6", + "reference": "7ca240dcac0c655eb15933ee55736ccd2ea0d7a6", "shasum": "" }, "require": { @@ -2171,7 +2172,7 @@ "doctrine/coding-standard": "^8.0", "mikey179/vfsstream": "^1.6.7", "phpunit/phpunit": "^8.5|^9.0", - "psr/container": "^1.0", + "psr/container": "^1.0|^2.0", "symfony/cache": "^3.1|^4.0|^5.0", "symfony/dependency-injection": "^3.1|^4.0|^5.0" }, @@ -2209,22 +2210,22 @@ ], "support": { "issues": "https://github.com/schmittjoh/metadata/issues", - "source": "https://github.com/schmittjoh/metadata/tree/2.7.0" + "source": "https://github.com/schmittjoh/metadata/tree/2.8.0" }, - "time": "2022-09-13T19:18:27+00:00" + "time": "2023-02-15T13:44:18+00:00" }, { "name": "jms/serializer", - "version": "3.21.0", + "version": "3.22.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd" + "reference": "576d226178697534e214531dbf80058637a10ebc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/cc49ca6cd97baa173166c1f4fc54521964cf28bd", - "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/576d226178697534e214531dbf80058637a10ebc", + "reference": "576d226178697534e214531dbf80058637a10ebc", "shasum": "" }, "require": { @@ -2299,7 +2300,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.21.0" + "source": "https://github.com/schmittjoh/serializer/tree/3.22.0" }, "funding": [ { @@ -2307,7 +2308,7 @@ "type": "github" } ], - "time": "2023-01-10T13:08:17+00:00" + "time": "2023-02-03T04:58:11+00:00" }, { "name": "jms/serializer-bundle", @@ -3528,29 +3529,30 @@ }, { "name": "nelmio/cors-bundle", - "version": "2.2.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/nelmio/NelmioCorsBundle.git", - "reference": "0ee5ee30b0ee08ea122d431ae6e0ddeb87f035c0" + "reference": "185d2c0ae50a3f0b628790170164d5f1c5b7c281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/0ee5ee30b0ee08ea122d431ae6e0ddeb87f035c0", - "reference": "0ee5ee30b0ee08ea122d431ae6e0ddeb87f035c0", + "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/185d2c0ae50a3f0b628790170164d5f1c5b7c281", + "reference": "185d2c0ae50a3f0b628790170164d5f1c5b7c281", "shasum": "" }, "require": { - "symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0" + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0" }, "require-dev": { "mockery/mockery": "^1.2", - "symfony/phpunit-bridge": "^4.3 || ^5.0 || ^6.0" + "symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -3583,9 +3585,9 @@ ], "support": { "issues": "https://github.com/nelmio/NelmioCorsBundle/issues", - "source": "https://github.com/nelmio/NelmioCorsBundle/tree/2.2.0" + "source": "https://github.com/nelmio/NelmioCorsBundle/tree/2.3.1" }, - "time": "2021-12-01T09:34:27+00:00" + "time": "2023-02-16T08:49:29+00:00" }, { "name": "onelogin/php-saml", @@ -4221,16 +4223,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.15.3", + "version": "1.16.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "61800f71a5526081d1b5633766aa88341f1ade76" + "reference": "e27e92d939e2e3636f0a1f0afaba59692c0bf571" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/61800f71a5526081d1b5633766aa88341f1ade76", - "reference": "61800f71a5526081d1b5633766aa88341f1ade76", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/e27e92d939e2e3636f0a1f0afaba59692c0bf571", + "reference": "e27e92d939e2e3636f0a1f0afaba59692c0bf571", "shasum": "" }, "require": { @@ -4260,9 +4262,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.15.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.16.1" }, - "time": "2022-12-20T20:56:55+00:00" + "time": "2023-02-07T18:11:17+00:00" }, { "name": "psr/cache", @@ -4745,16 +4747,16 @@ }, { "name": "setasign/fpdi", - "version": "v2.3.6", + "version": "v2.3.7", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "6231e315f73e4f62d72b73f3d6d78ff0eed93c31" + "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/6231e315f73e4f62d72b73f3d6d78ff0eed93c31", - "reference": "6231e315f73e4f62d72b73f3d6d78ff0eed93c31", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05", + "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05", "shasum": "" }, "require": { @@ -4805,7 +4807,7 @@ ], "support": { "issues": "https://github.com/Setasign/FPDI/issues", - "source": "https://github.com/Setasign/FPDI/tree/v2.3.6" + "source": "https://github.com/Setasign/FPDI/tree/v2.3.7" }, "funding": [ { @@ -4813,7 +4815,7 @@ "type": "tidelift" } ], - "time": "2021-02-11T11:37:01+00:00" + "time": "2023-02-09T10:38:43+00:00" }, { "name": "symfony/amazon-mailer", @@ -6777,16 +6779,16 @@ }, { "name": "symfony/http-kernel", - "version": "v4.4.49", + "version": "v4.4.50", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4e36db8103062c62b3882b1bd297b02de6b021c4" + "reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4e36db8103062c62b3882b1bd297b02de6b021c4", - "reference": "4e36db8103062c62b3882b1bd297b02de6b021c4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aa6df6c045f034aa13ac752fc234bb300b9488ef", + "reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef", "shasum": "" }, "require": { @@ -6861,7 +6863,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v4.4.49" + "source": "https://github.com/symfony/http-kernel/tree/v4.4.50" }, "funding": [ { @@ -6877,7 +6879,7 @@ "type": "tidelift" } ], - "time": "2022-11-28T17:58:43+00:00" + "time": "2023-02-01T08:01:31+00:00" }, { "name": "symfony/inflector", @@ -8623,16 +8625,16 @@ }, { "name": "symfony/security-bundle", - "version": "v4.4.44", + "version": "v4.4.50", "source": { "type": "git", "url": "https://github.com/symfony/security-bundle.git", - "reference": "d2a6bf4aeb75e75d3faacf9bec286e0de58394b6" + "reference": "076fd2088ada33d760758d98ff07ddedbf567946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-bundle/zipball/d2a6bf4aeb75e75d3faacf9bec286e0de58394b6", - "reference": "d2a6bf4aeb75e75d3faacf9bec286e0de58394b6", + "url": "https://api.github.com/repos/symfony/security-bundle/zipball/076fd2088ada33d760758d98ff07ddedbf567946", + "reference": "076fd2088ada33d760758d98ff07ddedbf567946", "shasum": "" }, "require": { @@ -8645,7 +8647,7 @@ "symfony/security-core": "^4.4", "symfony/security-csrf": "^4.2|^5.0", "symfony/security-guard": "^4.2|^5.0", - "symfony/security-http": "^4.4.5" + "symfony/security-http": "^4.4.50" }, "conflict": { "symfony/browser-kit": "<4.2", @@ -8699,7 +8701,7 @@ "description": "Provides a tight integration of the Security component into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-bundle/tree/v4.4.44" + "source": "https://github.com/symfony/security-bundle/tree/v4.4.50" }, "funding": [ { @@ -8715,7 +8717,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T09:59:04+00:00" + "time": "2023-01-24T10:39:54+00:00" }, { "name": "symfony/security-core", @@ -8944,16 +8946,16 @@ }, { "name": "symfony/security-http", - "version": "v4.4.48", + "version": "v4.4.50", "source": { "type": "git", "url": "https://github.com/symfony/security-http.git", - "reference": "41e7666313f140ac8560f8db64ab54cc7348615a" + "reference": "7fa4a0cac16f02cb534a6e9adcdb17385f94004f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/41e7666313f140ac8560f8db64ab54cc7348615a", - "reference": "41e7666313f140ac8560f8db64ab54cc7348615a", + "url": "https://api.github.com/repos/symfony/security-http/zipball/7fa4a0cac16f02cb534a6e9adcdb17385f94004f", + "reference": "7fa4a0cac16f02cb534a6e9adcdb17385f94004f", "shasum": "" }, "require": { @@ -9003,7 +9005,7 @@ "description": "Symfony Security Component - HTTP Integration", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-http/tree/v4.4.48" + "source": "https://github.com/symfony/security-http/tree/v4.4.50" }, "funding": [ { @@ -9019,7 +9021,7 @@ "type": "tidelift" } ], - "time": "2022-10-20T10:00:58+00:00" + "time": "2023-01-24T10:39:54+00:00" }, { "name": "symfony/sendgrid-mailer", @@ -9330,16 +9332,16 @@ }, { "name": "symfony/string", - "version": "v5.4.17", + "version": "v5.4.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b" + "reference": "0a01071610fd861cc160dfb7e2682ceec66064cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/55733a8664b8853b003e70251c58bc8cb2d82a6b", - "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b", + "url": "https://api.github.com/repos/symfony/string/zipball/0a01071610fd861cc160dfb7e2682ceec66064cb", + "reference": "0a01071610fd861cc160dfb7e2682ceec66064cb", "shasum": "" }, "require": { @@ -9396,7 +9398,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.17" + "source": "https://github.com/symfony/string/tree/v5.4.19" }, "funding": [ { @@ -9412,7 +9414,7 @@ "type": "tidelift" } ], - "time": "2022-12-12T15:54:21+00:00" + "time": "2023-01-01T08:32:19+00:00" }, { "name": "symfony/translation", @@ -9788,16 +9790,16 @@ }, { "name": "symfony/uid", - "version": "v5.4.13", + "version": "v5.4.19", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "7e727b75ee099d530d1e93ed0897a0d89c146d16" + "reference": "962c08ab8e0621e966ff1a19d398308b34f24aa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/7e727b75ee099d530d1e93ed0897a0d89c146d16", - "reference": "7e727b75ee099d530d1e93ed0897a0d89c146d16", + "url": "https://api.github.com/repos/symfony/uid/zipball/962c08ab8e0621e966ff1a19d398308b34f24aa2", + "reference": "962c08ab8e0621e966ff1a19d398308b34f24aa2", "shasum": "" }, "require": { @@ -9842,7 +9844,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v5.4.13" + "source": "https://github.com/symfony/uid/tree/v5.4.19" }, "funding": [ { @@ -9858,7 +9860,7 @@ "type": "tidelift" } ], - "time": "2022-09-09T09:04:10+00:00" + "time": "2023-01-01T08:32:19+00:00" }, { "name": "symfony/validator", @@ -10327,16 +10329,16 @@ }, { "name": "twig/cssinliner-extra", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/cssinliner-extra.git", - "reference": "2917fc4a5d4d2a95dcaf79f0c21c0c2a0a30eff4" + "reference": "381877765d17b0178322d68b818e0c67f9c93187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/cssinliner-extra/zipball/2917fc4a5d4d2a95dcaf79f0c21c0c2a0a30eff4", - "reference": "2917fc4a5d4d2a95dcaf79f0c21c0c2a0a30eff4", + "url": "https://api.github.com/repos/twigphp/cssinliner-extra/zipball/381877765d17b0178322d68b818e0c67f9c93187", + "reference": "381877765d17b0178322d68b818e0c67f9c93187", "shasum": "" }, "require": { @@ -10381,7 +10383,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/cssinliner-extra/tree/v3.5.0" + "source": "https://github.com/twigphp/cssinliner-extra/tree/v3.5.1" }, "funding": [ { @@ -10393,20 +10395,20 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:23:36+00:00" + "time": "2023-02-08T07:44:55+00:00" }, { "name": "twig/extra-bundle", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/twig-extra-bundle.git", - "reference": "edfcdbdc943b52101011d57ec546af393dc56537" + "reference": "a961e553a624eebdbd423ad5ab931497ca6d87cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/edfcdbdc943b52101011d57ec546af393dc56537", - "reference": "edfcdbdc943b52101011d57ec546af393dc56537", + "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/a961e553a624eebdbd423ad5ab931497ca6d87cd", + "reference": "a961e553a624eebdbd423ad5ab931497ca6d87cd", "shasum": "" }, "require": { @@ -10460,7 +10462,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.5.0" + "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.5.1" }, "funding": [ { @@ -10472,20 +10474,20 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:23:36+00:00" + "time": "2023-02-08T07:44:55+00:00" }, { "name": "twig/inky-extra", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/inky-extra.git", - "reference": "2845c9c7ad25227c3b79285a2421ee9cebbf48e8" + "reference": "4efde499b99942a27e206898e55208a8692c16ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/inky-extra/zipball/2845c9c7ad25227c3b79285a2421ee9cebbf48e8", - "reference": "2845c9c7ad25227c3b79285a2421ee9cebbf48e8", + "url": "https://api.github.com/repos/twigphp/inky-extra/zipball/4efde499b99942a27e206898e55208a8692c16ca", + "reference": "4efde499b99942a27e206898e55208a8692c16ca", "shasum": "" }, "require": { @@ -10531,7 +10533,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/inky-extra/tree/v3.5.0" + "source": "https://github.com/twigphp/inky-extra/tree/v3.5.1" }, "funding": [ { @@ -10543,20 +10545,20 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:23:36+00:00" + "time": "2023-02-08T07:44:55+00:00" }, { "name": "twig/intl-extra", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/intl-extra.git", - "reference": "92f2c73471e077d0f72195a331c9a245da2010cd" + "reference": "c3ebfac1624228c0556de57a34af6b7d83a1a408" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/intl-extra/zipball/92f2c73471e077d0f72195a331c9a245da2010cd", - "reference": "92f2c73471e077d0f72195a331c9a245da2010cd", + "url": "https://api.github.com/repos/twigphp/intl-extra/zipball/c3ebfac1624228c0556de57a34af6b7d83a1a408", + "reference": "c3ebfac1624228c0556de57a34af6b7d83a1a408", "shasum": "" }, "require": { @@ -10600,7 +10602,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/intl-extra/tree/v3.5.0" + "source": "https://github.com/twigphp/intl-extra/tree/v3.5.1" }, "funding": [ { @@ -10612,20 +10614,20 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:23:36+00:00" + "time": "2023-02-08T07:44:55+00:00" }, { "name": "twig/string-extra", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/string-extra.git", - "reference": "73c458625c685b3cb3986ec2f5f83ebd1247bcb3" + "reference": "e8403cf7140319917577604be406dfb371246437" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/string-extra/zipball/73c458625c685b3cb3986ec2f5f83ebd1247bcb3", - "reference": "73c458625c685b3cb3986ec2f5f83ebd1247bcb3", + "url": "https://api.github.com/repos/twigphp/string-extra/zipball/e8403cf7140319917577604be406dfb371246437", + "reference": "e8403cf7140319917577604be406dfb371246437", "shasum": "" }, "require": { @@ -10672,7 +10674,7 @@ "unicode" ], "support": { - "source": "https://github.com/twigphp/string-extra/tree/v3.5.0" + "source": "https://github.com/twigphp/string-extra/tree/v3.5.1" }, "funding": [ { @@ -10684,20 +10686,20 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:23:36+00:00" + "time": "2023-02-08T07:44:55+00:00" }, { "name": "twig/twig", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" + "reference": "a6e0510cc793912b451fd40ab983a1d28f611c15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a6e0510cc793912b451fd40ab983a1d28f611c15", + "reference": "a6e0510cc793912b451fd40ab983a1d28f611c15", "shasum": "" }, "require": { @@ -10748,7 +10750,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.5.0" + "source": "https://github.com/twigphp/Twig/tree/v3.5.1" }, "funding": [ { @@ -10760,7 +10762,7 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:28:18+00:00" + "time": "2023-02-08T07:49:20+00:00" }, { "name": "webmozart/assert", @@ -11814,16 +11816,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.14", + "version": "1.9.18", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e5fcc96289cf737304286a9b505fbed091f02e58" + "reference": "f2d5cf71be91172a57c649770b73c20ebcffb0bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58", - "reference": "e5fcc96289cf737304286a9b505fbed091f02e58", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f2d5cf71be91172a57c649770b73c20ebcffb0bf", + "reference": "f2d5cf71be91172a57c649770b73c20ebcffb0bf", "shasum": "" }, "require": { @@ -11853,7 +11855,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.14" + "source": "https://github.com/phpstan/phpstan/tree/1.9.18" }, "funding": [ { @@ -11869,7 +11871,7 @@ "type": "tidelift" } ], - "time": "2023-01-19T10:47:09+00:00" + "time": "2023-02-17T15:01:27+00:00" }, { "name": "phpstan/phpstan-doctrine", @@ -11943,16 +11945,16 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.3", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "54a24bd23e9e80ee918cdc24f909d376c2e273f7" + "reference": "d77af96c1aaec28f7c0293677132eaaad079e01b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/54a24bd23e9e80ee918cdc24f909d376c2e273f7", - "reference": "54a24bd23e9e80ee918cdc24f909d376c2e273f7", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d77af96c1aaec28f7c0293677132eaaad079e01b", + "reference": "d77af96c1aaec28f7c0293677132eaaad079e01b", "shasum": "" }, "require": { @@ -11989,22 +11991,22 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.3" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.4" }, - "time": "2022-12-21T15:25:00+00:00" + "time": "2023-02-09T08:05:29+00:00" }, { "name": "phpstan/phpstan-symfony", - "version": "1.2.20", + "version": "1.2.18", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "d89a521e7e31822409bf37f70691f7a12a6e7d76" + "reference": "3178f15a60b62df21ddd202f6a668851eeb138c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/d89a521e7e31822409bf37f70691f7a12a6e7d76", - "reference": "d89a521e7e31822409bf37f70691f7a12a6e7d76", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/3178f15a60b62df21ddd202f6a668851eeb138c7", + "reference": "3178f15a60b62df21ddd202f6a668851eeb138c7", "shasum": "" }, "require": { @@ -12060,22 +12062,22 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.20" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.18" }, - "time": "2023-01-15T12:28:31+00:00" + "time": "2022-12-16T09:43:26+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "shasum": "" }, "require": { @@ -12131,7 +12133,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" }, "funding": [ { @@ -12139,7 +12141,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-01-26T08:26:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -12850,16 +12852,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -12901,7 +12903,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -12909,7 +12911,7 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", @@ -13223,16 +13225,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -13271,10 +13273,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -13282,7 +13284,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -13341,16 +13343,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -13385,7 +13387,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -13393,7 +13395,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", diff --git a/src/Command/KimaiImporterCommand.php b/src/Command/KimaiImporterCommand.php index 1e60e8d2b..8e63643bf 100755 --- a/src/Command/KimaiImporterCommand.php +++ b/src/Command/KimaiImporterCommand.php @@ -1579,7 +1579,7 @@ final class KimaiImporterCommand extends Command continue; } - if (empty($oldRecord['end']) || $oldRecord['end'] === 0) { + if (empty($oldRecord['end'])) { $io->error('Cannot import running timesheet record, skipping: ' . $oldRecord['timeEntryID']); $failed++; continue; diff --git a/src/Constants.php b/src/Constants.php index 258eb3328..bd7bc9a5f 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -17,11 +17,11 @@ class Constants /** * The current release version */ - public const VERSION = '1.30.7'; + public const VERSION = '1.30.8'; /** * The current release: major * 10000 + minor * 100 + patch */ - public const VERSION_ID = 13007; + public const VERSION_ID = 13008; /** * The current release status, either "stable" or "dev" */ diff --git a/src/DataFixtures/TeamFixtures.php b/src/DataFixtures/TeamFixtures.php index 960b90b0a..c2c54dbd8 100644 --- a/src/DataFixtures/TeamFixtures.php +++ b/src/DataFixtures/TeamFixtures.php @@ -95,14 +95,12 @@ class TeamFixtures extends Fixture $team->setName($faker->company . ' ' . $i); $team->addTeamlead($allUsers[array_rand($allUsers)]); - if ($userCount > 0) { - $userKeys = array_rand($allUsers, $userCount); - if (!\is_array($userKeys)) { - $userKeys = [$userKeys]; - } - foreach ($userKeys as $userKey) { - $team->addUser($allUsers[$userKey]); - } + $userKeys = array_rand($allUsers, $userCount); + if (!\is_array($userKeys)) { + $userKeys = [$userKeys]; + } + foreach ($userKeys as $userKey) { + $team->addUser($allUsers[$userKey]); } if ($projectCount > 0) { diff --git a/src/Entity/Timesheet.php b/src/Entity/Timesheet.php index 868c97913..b456e6f13 100644 --- a/src/Entity/Timesheet.php +++ b/src/Entity/Timesheet.php @@ -437,12 +437,21 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface { // only auto calculate if manually set duration is null - the result is important for eg. validations if ($calculate && $this->duration === null && $this->begin !== null && $this->end !== null) { - return $this->end->getTimestamp() - $this->begin->getTimestamp(); + return $this->getCalculatedDuration(); } return $this->duration; } + public function getCalculatedDuration(): ?int + { + if ($this->begin !== null && $this->end !== null) { + return $this->end->getTimestamp() - $this->begin->getTimestamp(); + } + + return null; + } + /** * @param User $user * @return Timesheet diff --git a/src/Validator/Constraints/TimesheetBudgetUsedValidator.php b/src/Validator/Constraints/TimesheetBudgetUsedValidator.php index d47c73e9d..88e0c5aa2 100644 --- a/src/Validator/Constraints/TimesheetBudgetUsedValidator.php +++ b/src/Validator/Constraints/TimesheetBudgetUsedValidator.php @@ -81,8 +81,20 @@ final class TimesheetBudgetUsedValidator extends ConstraintValidator // when changing the date via the calendar and/or the API, the duration will not be reset by the // duration calculator (which runs after validation!) so we manually reset the duration before - $timesheet->setDuration(null); - $duration = $timesheet->getDuration(); + + // ------------------------------------------------------------------------ + // Old solution (buggy) - duration MAY NOT BE RESET! + // this will cause the timesheet to be deleted in the Weekly-QuickEntry-Flow + // ------------------------------------------------------------------------ + // $timesheet->setDuration(null); + // $duration = $timesheet->getDuration(); + + // another possible solution is cloning the timesheet + // $timesheet = clone $timesheet; + // $timesheet->setDuration(null); + // $duration = $timesheet->getDuration(); + + $duration = $timesheet->getCalculatedDuration(); $timeRate = $this->rateService->calculate($timesheet); $rate = $timeRate->getRate(); diff --git a/tests/Export/TimesheetExportRepositoryTest.php b/tests/Export/TimesheetExportRepositoryTest.php index 8bba9b22b..1712f58f2 100644 --- a/tests/Export/TimesheetExportRepositoryTest.php +++ b/tests/Export/TimesheetExportRepositoryTest.php @@ -31,7 +31,6 @@ class TimesheetExportRepositoryTest extends TestCase $sut = new TimesheetExportRepository($repository); - /* @phpstan-ignore-next-line */ $sut->setExported([new Timesheet(), null, new \stdClass(), new Timesheet(), new Activity()]); // test else for empty array /* @phpstan-ignore-next-line */ diff --git a/tests/Repository/TimesheetInvoiceItemRepositoryTest.php b/tests/Repository/TimesheetInvoiceItemRepositoryTest.php index 4ea52e9ea..282653669 100644 --- a/tests/Repository/TimesheetInvoiceItemRepositoryTest.php +++ b/tests/Repository/TimesheetInvoiceItemRepositoryTest.php @@ -31,7 +31,6 @@ class TimesheetInvoiceItemRepositoryTest extends TestCase $sut = new TimesheetInvoiceItemRepository($repository); - /* @phpstan-ignore-next-line */ $sut->setExported([new Timesheet(), null, new \stdClass(), new Timesheet(), new Activity()]); // test else for empty array /* @phpstan-ignore-next-line */ diff --git a/tests/Validator/Constraints/TimesheetBudgetUsedValidatorTest.php b/tests/Validator/Constraints/TimesheetBudgetUsedValidatorTest.php index d03512c74..499082dc2 100644 --- a/tests/Validator/Constraints/TimesheetBudgetUsedValidatorTest.php +++ b/tests/Validator/Constraints/TimesheetBudgetUsedValidatorTest.php @@ -412,6 +412,7 @@ class TimesheetBudgetUsedValidatorTest extends ConstraintValidatorTestCase $timesheet->method('getBegin')->willReturn($begin); $timesheet->method('getEnd')->willReturn($end); $timesheet->method('getDuration')->willReturn($end->getTimestamp() - $begin->getTimestamp()); + $timesheet->method('getCalculatedDuration')->willReturn($end->getTimestamp() - $begin->getTimestamp()); $timesheet->method('getUser')->willReturn(new User()); $timesheet->method('getProject')->willReturn($project); $timesheet->method('getActivity')->willReturn($activity);