Skip to content

Commit c07cee1

Browse files
committed
ISSUE-337: update package versions
1 parent 110b25d commit c07cee1

File tree

7 files changed

+34
-33
lines changed

7 files changed

+34
-33
lines changed

composer.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,20 @@
2525
"source": "https://github.com/phpList/rest-api"
2626
},
2727
"require": {
28-
"php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
29-
30-
"phplist/core": "dev-phplist3",
31-
"friendsofsymfony/rest-bundle": "^2.3",
32-
"sensio/framework-extra-bundle": "5.1.0"
28+
"php": "^8.1",
29+
"phplist/core": "dev-ISSUE-337",
30+
"friendsofsymfony/rest-bundle": "*"
3331
},
3432
"require-dev": {
35-
"phpunit/phpunit": "^6.5.6",
36-
"phpunit/phpunit-mock-objects": "^5.0.6",
37-
"phpunit/dbunit": "^3.0.0",
33+
"phpunit/phpunit": "^10.0",
3834
"guzzlehttp/guzzle": "^6.3.0",
3935
"squizlabs/php_codesniffer": "^3.2.0",
40-
"phpstan/phpstan": "^0.7.0",
41-
"nette/caching": "^2.5.0 || ^3.0.0",
42-
"nikic/php-parser": "^3.1.0",
43-
"phpmd/phpmd": "^2.6.0"
36+
"phpstan/phpstan": "^0.7.0|0.12.57",
37+
"nette/caching": "^2.5.0|^3.0.0",
38+
"nikic/php-parser": "^4.19.1",
39+
"phpmd/phpmd": "^2.6.0",
40+
"composer/composer": "^1.6.0",
41+
"doctrine/instantiator": "^1.0.5"
4442
},
4543
"autoload": {
4644
"psr-4": {
@@ -119,7 +117,6 @@
119117
"view_response_listener": {
120118
"enabled": false
121119
}
122-
123120
},
124121
"exception": {
125122
"enabled": true,

src/Controller/ListController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace PhpList\RestBundle\Controller;
56

6-
use FOS\RestBundle\Controller\FOSRestController;
7-
use FOS\RestBundle\Routing\ClassResourceInterface;
7+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
88
use FOS\RestBundle\View\View;
99
use PhpList\Core\Domain\Model\Messaging\SubscriberList;
1010
use PhpList\Core\Domain\Repository\Messaging\SubscriberListRepository;
@@ -18,14 +18,14 @@
1818
* @author Oliver Klee <oliver@phplist.com>
1919
* @author Xheni Myrtaj <xheni@phplist.com>
2020
*/
21-
class ListController extends FOSRestController implements ClassResourceInterface
21+
class ListController extends AbstractController
2222
{
2323
use AuthenticationTrait;
2424

2525
/**
2626
* @var SubscriberListRepository
2727
*/
28-
private $subscriberListRepository = null;
28+
private SubscriberListRepository $subscriberListRepository;
2929

3030
/**
3131
* @param Authentication $authentication

src/Controller/SessionController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace PhpList\RestBundle\Controller;
56

6-
use FOS\RestBundle\Controller\FOSRestController;
7-
use FOS\RestBundle\Routing\ClassResourceInterface;
7+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
88
use FOS\RestBundle\View\View;
99
use PhpList\Core\Domain\Model\Identity\Administrator;
1010
use PhpList\Core\Domain\Model\Identity\AdministratorToken;
@@ -23,19 +23,19 @@
2323
*
2424
* @author Oliver Klee <oliver@phplist.com>
2525
*/
26-
class SessionController extends FOSRestController implements ClassResourceInterface
26+
class SessionController extends AbstractController
2727
{
2828
use AuthenticationTrait;
2929

3030
/**
3131
* @var AdministratorRepository
3232
*/
33-
private $administratorRepository = null;
33+
private AdministratorRepository $administratorRepository;
3434

3535
/**
3636
* @var AdministratorTokenRepository
3737
*/
38-
private $tokenRepository = null;
38+
private AdministratorTokenRepository $tokenRepository;
3939

4040
/**
4141
* @param Authentication $authentication
@@ -110,7 +110,7 @@ public function deleteAction(Request $request, AdministratorToken $token): View
110110
*
111111
* @throws BadRequestHttpException
112112
*/
113-
private function validateCreateRequest(Request $request)
113+
private function validateCreateRequest(Request $request): void
114114
{
115115
if ($request->getContent() === '') {
116116
throw new BadRequestHttpException('Empty JSON data', null, 1500559729);

src/Controller/SubscriberController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace PhpList\RestBundle\Controller;
56

6-
use FOS\RestBundle\Controller\FOSRestController;
7-
use FOS\RestBundle\Routing\ClassResourceInterface;
7+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
88
use FOS\RestBundle\View\View;
99
use PhpList\Core\Domain\Model\Subscription\Subscriber;
1010
use PhpList\Core\Domain\Repository\Subscription\SubscriberRepository;
@@ -20,14 +20,14 @@
2020
*
2121
* @author Oliver Klee <oliver@phplist.com>
2222
*/
23-
class SubscriberController extends FOSRestController implements ClassResourceInterface
23+
class SubscriberController extends AbstractController
2424
{
2525
use AuthenticationTrait;
2626

2727
/**
2828
* @var SubscriberRepository
2929
*/
30-
private $subscriberRepository = null;
30+
private SubscriberRepository $subscriberRepository;
3131

3232
/**
3333
* @param Authentication $authentication
@@ -78,7 +78,7 @@ public function postAction(Request $request): View
7878
*
7979
* @throws UnprocessableEntityHttpException
8080
*/
81-
private function validateSubscriber(Request $request)
81+
private function validateSubscriber(Request $request): void
8282
{
8383
/** @var string[] $invalidFields */
8484
$invalidFields = [];

src/DependencyInjection/PhpListRestExtension.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace PhpList\RestBundle\DependencyInjection;
56

7+
use Exception;
8+
use InvalidArgumentException;
69
use Symfony\Component\Config\FileLocator;
710
use Symfony\Component\DependencyInjection\ContainerBuilder;
811
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
@@ -19,18 +22,18 @@ class PhpListRestExtension extends Extension
1922
* Loads a specific configuration.
2023
*
2124
* @param array $configs configuration values
22-
* @param ContainerBuilder $containerBuilder
25+
* @param ContainerBuilder $container
2326
*
2427
* @return void
2528
*
26-
* @throws \InvalidArgumentException if the provided tag is not defined in this extension
29+
* @throws InvalidArgumentException|Exception if the provided tag is not defined in this extension
2730
*/
28-
public function load(array $configs, ContainerBuilder $containerBuilder)
31+
public function load(array $configs, ContainerBuilder $container): void
2932
{
3033
// This parameter is unused, but not optional. This line will avoid a static analysis warning this.
3134
$configs;
3235

33-
$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__ . '/../../config'));
36+
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
3437
$loader->load('services.yml');
3538
}
3639
}

src/PhpListRestBundle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace PhpList\RestBundle;

src/ViewHandler/SecuredViewHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class SecuredViewHandler
1717
{
1818
/**
19-
* @param ViewHandler $viewHandler
19+
* @param ViewHandler $handler
2020
* @param View $view
2121
* @param Request $request
2222
* @param string $format

0 commit comments

Comments
 (0)