updated composer dependencies (#1796)

This commit is contained in:
Kevin Papst
2020-06-28 15:43:38 +02:00
committed by GitHub
parent 8530a03449
commit e566305426
13 changed files with 732 additions and 502 deletions

View File

@@ -19,6 +19,7 @@
"ext-xsl": "*",
"ext-zip": "*",
"beberlei/doctrineextensions": "^1.2",
"composer/package-versions-deprecated": "^1.8",
"doctrine/doctrine-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^2.1",
"doctrine/orm": "^2.7",
@@ -37,7 +38,6 @@
"mpdf/mpdf": "^8.0",
"nelmio/api-doc-bundle": "^3.2",
"nelmio/cors-bundle": "^1.5",
"ocramius/proxy-manager": "^2.1.1",
"onelogin/php-saml": "^3.4",
"pagerfanta/pagerfanta": "^2.1",
"phpoffice/phpspreadsheet": "^1.10",

1169
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,7 @@
# TODO upgrade to 2.8
# https://github.com/FriendsOfSymfony/FOSRestBundle/releases/tag/2.8.0
fos_rest:
# disable_csrf_role: IS_AUTHENTICATED_ANONYMOUSLY
# access_denied_listener:
# enabled: false
# service: null
# formats:
# name: ~
# unauthorized_challenge: null
param_fetcher_listener:
enabled: true
@@ -14,12 +11,11 @@ fos_rest:
# allowed_methods_listener:
# enabled: false
# service: null
# TODO activate with 2.8
# routing_loader: false
routing_loader:
# TODO activate once 2.8 is released
#parse_controller_name: false
default_format: json
include_format: true
# prefix_methods: true
body_converter:
enabled: true
# validate: false
@@ -60,8 +56,12 @@ fos_rest:
# mime_type: application/javascript+jsonp
exception:
enabled: true
# TODO active with 2.8
# serialize_exceptions: false
# TODO deprecated with 2.8
# https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2200#issuecomment-629150462
# https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2224
exception_controller: 'fos_rest.exception.controller:showAction'
# service: null
codes:
# 'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
# 'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT

View File

@@ -5,8 +5,6 @@ includes:
parameters:
tmpDir: %rootDir%/../../../var/cache/phpstan
autoload_directories:
- %rootDir%/../../../src/Migrations
ignoreErrors:
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::scalarNode\(\).#'
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::integerNode\(\).#'

View File

@@ -9,7 +9,6 @@
namespace App\EventSubscriber;
use App\Entity\User;
use App\Event\DashboardEvent;
use App\Repository\ActivityRepository;
use App\Repository\CustomerRepository;

View File

@@ -10,7 +10,6 @@
namespace App\Form;
use App\Entity\ActivityRate;
use App\Entity\Rate;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@@ -10,7 +10,6 @@
namespace App\Form;
use App\Entity\CustomerRate;
use App\Entity\Rate;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@@ -10,7 +10,6 @@
namespace App\Form;
use App\Entity\ProjectRate;
use App\Entity\Rate;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@@ -9,8 +9,6 @@
namespace App\Form;
use App\Entity\Customer;
use App\Entity\Project;
use App\Entity\Timesheet;
use App\Form\Type\DateTimePickerType;
use App\Form\Type\DurationType;

View File

@@ -24,7 +24,6 @@ use App\Repository\Paginator\LoaderPaginator;
use App\Repository\Paginator\PaginatorInterface;
use App\Repository\Query\TimesheetQuery;
use DateTime;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Pagerfanta\Pagerfanta;

View File

@@ -636,6 +636,9 @@
"symfony/polyfill-php73": {
"version": "v1.11.0"
},
"symfony/polyfill-php80": {
"version": "v1.17.1"
},
"symfony/postmark-mailer": {
"version": "4.4",
"recipe": {

View File

@@ -331,9 +331,39 @@ class TimesheetControllerTest extends APIControllerBaseTest
$this->assertEquals(2016, $result['rate']);
}
public function testPostActionForDifferentUser()
{
$dateTime = (new UserDateTimeFactoryFactory($this))->create(self::TEST_TIMEZONE);
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$admin = $this->getUserByRole(User::ROLE_ADMIN);
$user = $this->getUserByRole(User::ROLE_USER);
self::assertNotEquals($admin->getId(), $user->getId());
$data = [
'activity' => 1,
'project' => 1,
'user' => $user->getId(),
'begin' => ($dateTime->createDateTime('- 16 hours'))->format('Y-m-d H:m:0'),
'end' => ($dateTime->createDateTime())->format('Y-m-d H:m:0'),
'description' => 'foo',
'fixedRate' => 2016,
'hourlyRate' => 127
];
$this->request($client, '/api/timesheets', 'POST', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
$this->assertIsArray($result);
$this->assertDefaultStructure($result);
$this->assertNotEmpty($result['id']);
$this->assertEquals($user->getId(), $result['user']);
$this->assertNotEquals($admin->getId(), $result['user']);
}
// check for project, as this is a required field. It will not be included in the select, as it is
// already filtered within the repository due to the hidden customer
public function testPostActionWithInvisibleProjectIsAccepted()
public function testPostActionWithInvisibleProject()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);

View File

@@ -12,7 +12,6 @@ namespace App\Tests\Controller;
use App\DataFixtures\UserFixtures;
use App\Entity\User;
use App\Tests\KernelTestTrait;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\HttpKernelBrowser;