Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to php8.1 symfony 6.4 #141

Merged
merged 27 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dad3a20
change branch name
xh3n1 Mar 5, 2019
9e4e996
Disable REST API by default
xh3n1 Mar 6, 2019
7d2145f
Change path
xh3n1 Mar 26, 2019
81fd339
Remove prefix
xh3n1 Apr 4, 2019
30fde0d
[FEATURE] Get the number of subscribers of list and added tests (#116)
xh3n1 May 31, 2019
8fca0ef
[BUGFIX] Fix the expected number in an integration test (#119)
xh3n1 May 31, 2019
4364ded
[CLEANUP] Fix a warning with newer PHPMD versions (#125)
Dec 5, 2019
26ea3c8
update php dependencies
michield Oct 4, 2022
110b25d
update to pass building
michield Feb 9, 2023
c07cee1
ISSUE-337: update package versions
tatevikg1 Nov 24, 2024
b687537
ISSUE-337: use local
tatevikg1 Nov 24, 2024
85ab9ce
ISSUE-337: symfony 6.4
tatevikg1 Nov 30, 2024
f09b1f9
ISSUE-337: test fix
tatevikg1 Dec 5, 2024
bf004d0
ISSUE-337: fix the rest of tests
tatevikg1 Dec 10, 2024
86b26f6
GitHub actions (#132)
nfebe Feb 11, 2021
a35a7d5
ISSUE-337: add pipeline
tatevikg1 Dec 11, 2024
276d397
ISSUE-337: fix phpstan
tatevikg1 Dec 11, 2024
acec73c
ISSUE-337: fix phpstmd
tatevikg1 Dec 11, 2024
3453581
ISSUE-337: openapi docs
tatevikg1 Dec 12, 2024
1986e45
merge main
tatevikg1 Dec 12, 2024
2e8300a
ISSUE-337: move to bundle file
tatevikg1 Dec 12, 2024
b483207
ISSUE-337: changelog
tatevikg1 Dec 14, 2024
884fb1e
ISSUE-337: update core
tatevikg1 Dec 15, 2024
8ad8004
ISSUE-337: fix phpstan
tatevikg1 Dec 15, 2024
7502393
ISSUE-337: fix phpcs
tatevikg1 Dec 15, 2024
1e4294c
ISSUE-337: force push
tatevikg1 Dec 15, 2024
2ce9ae1
ISSUE-337: name fix
tatevikg1 Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ISSUE-337: update package versions
tatevikg1 committed Nov 24, 2024
commit c07cee1ee98263add05cca6798372cd712336a31
23 changes: 10 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -25,22 +25,20 @@
"source": "https://github.com/phpList/rest-api"
},
"require": {
"php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",

"phplist/core": "dev-phplist3",
"friendsofsymfony/rest-bundle": "^2.3",
"sensio/framework-extra-bundle": "5.1.0"
"php": "^8.1",
"phplist/core": "dev-ISSUE-337",
"friendsofsymfony/rest-bundle": "*"
},
"require-dev": {
"phpunit/phpunit": "^6.5.6",
"phpunit/phpunit-mock-objects": "^5.0.6",
"phpunit/dbunit": "^3.0.0",
"phpunit/phpunit": "^10.0",
"guzzlehttp/guzzle": "^6.3.0",
"squizlabs/php_codesniffer": "^3.2.0",
"phpstan/phpstan": "^0.7.0",
"nette/caching": "^2.5.0 || ^3.0.0",
"nikic/php-parser": "^3.1.0",
"phpmd/phpmd": "^2.6.0"
"phpstan/phpstan": "^0.7.0|0.12.57",
"nette/caching": "^2.5.0|^3.0.0",
"nikic/php-parser": "^4.19.1",
"phpmd/phpmd": "^2.6.0",
"composer/composer": "^1.6.0",
"doctrine/instantiator": "^1.0.5"
},
"autoload": {
"psr-4": {
@@ -119,7 +117,6 @@
"view_response_listener": {
"enabled": false
}

},
"exception": {
"enabled": true,
8 changes: 4 additions & 4 deletions src/Controller/ListController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

declare(strict_types=1);

namespace PhpList\RestBundle\Controller;

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

/**
* @var SubscriberListRepository
*/
private $subscriberListRepository = null;
private SubscriberListRepository $subscriberListRepository;

/**
* @param Authentication $authentication
12 changes: 6 additions & 6 deletions src/Controller/SessionController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

declare(strict_types=1);

namespace PhpList\RestBundle\Controller;

use FOS\RestBundle\Controller\FOSRestController;
use FOS\RestBundle\Routing\ClassResourceInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use FOS\RestBundle\View\View;
use PhpList\Core\Domain\Model\Identity\Administrator;
use PhpList\Core\Domain\Model\Identity\AdministratorToken;
@@ -23,19 +23,19 @@
*
* @author Oliver Klee <oliver@phplist.com>
*/
class SessionController extends FOSRestController implements ClassResourceInterface
class SessionController extends AbstractController
{
use AuthenticationTrait;

/**
* @var AdministratorRepository
*/
private $administratorRepository = null;
private AdministratorRepository $administratorRepository;

/**
* @var AdministratorTokenRepository
*/
private $tokenRepository = null;
private AdministratorTokenRepository $tokenRepository;

/**
* @param Authentication $authentication
@@ -110,7 +110,7 @@ public function deleteAction(Request $request, AdministratorToken $token): View
*
* @throws BadRequestHttpException
*/
private function validateCreateRequest(Request $request)
private function validateCreateRequest(Request $request): void
{
if ($request->getContent() === '') {
throw new BadRequestHttpException('Empty JSON data', null, 1500559729);
10 changes: 5 additions & 5 deletions src/Controller/SubscriberController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

declare(strict_types=1);

namespace PhpList\RestBundle\Controller;

use FOS\RestBundle\Controller\FOSRestController;
use FOS\RestBundle\Routing\ClassResourceInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use FOS\RestBundle\View\View;
use PhpList\Core\Domain\Model\Subscription\Subscriber;
use PhpList\Core\Domain\Repository\Subscription\SubscriberRepository;
@@ -20,14 +20,14 @@
*
* @author Oliver Klee <oliver@phplist.com>
*/
class SubscriberController extends FOSRestController implements ClassResourceInterface
class SubscriberController extends AbstractController
{
use AuthenticationTrait;

/**
* @var SubscriberRepository
*/
private $subscriberRepository = null;
private SubscriberRepository $subscriberRepository;

/**
* @param Authentication $authentication
@@ -78,7 +78,7 @@ public function postAction(Request $request): View
*
* @throws UnprocessableEntityHttpException
*/
private function validateSubscriber(Request $request)
private function validateSubscriber(Request $request): void
{
/** @var string[] $invalidFields */
$invalidFields = [];
11 changes: 7 additions & 4 deletions src/DependencyInjection/PhpListRestExtension.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?php

declare(strict_types=1);

namespace PhpList\RestBundle\DependencyInjection;

use Exception;
use InvalidArgumentException;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
@@ -19,18 +22,18 @@ class PhpListRestExtension extends Extension
* Loads a specific configuration.
*
* @param array $configs configuration values
* @param ContainerBuilder $containerBuilder
* @param ContainerBuilder $container
*
* @return void
*
* @throws \InvalidArgumentException if the provided tag is not defined in this extension
* @throws InvalidArgumentException|Exception if the provided tag is not defined in this extension
*/
public function load(array $configs, ContainerBuilder $containerBuilder)
public function load(array $configs, ContainerBuilder $container): void
{
// This parameter is unused, but not optional. This line will avoid a static analysis warning this.
$configs;

$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__ . '/../../config'));
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
$loader->load('services.yml');
}
}
1 change: 1 addition & 0 deletions src/PhpListRestBundle.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace PhpList\RestBundle;
2 changes: 1 addition & 1 deletion src/ViewHandler/SecuredViewHandler.php
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
class SecuredViewHandler
{
/**
* @param ViewHandler $viewHandler
* @param ViewHandler $handler
* @param View $view
* @param Request $request
* @param string $format