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

feat: support symfony 7 #555

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ jobs:
- php: 8.1
symfony: 6.0.*
- php: 8.1
symfony: 6.1.*
symfony: 6.4.*
- php: 8.2
symfony: 6.2.*
symfony: 6.4.*
- php: 8.2
symfony: 7.0.*
- php: 8.3
symfony: 7.0.*

steps:
- name: Checkout
Expand Down
5 changes: 0 additions & 5 deletions Profiler/PayumCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ class PayumCollector extends DataCollector implements ExtensionInterface
*/
private array $contexts = [];

/**
* @var array|Data
*/
protected $data = [];

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp(): void
*/
public function couldBeCreatedByFormFactory(): void
{
if (Kernel::MAJOR_VERSION === 6) {
if (Kernel::MAJOR_VERSION >= 6) {
/** @var RequestStack $requestStack */
$requestStack = self::getContainer()->get(RequestStack::class);
$request = Request::createFromGlobals();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Form/Type/CreditCardTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp(): void
*/
public function couldBeCreatedByFormFactory(): void
{
if (Kernel::MAJOR_VERSION === 6) {
if (Kernel::MAJOR_VERSION >= 6) {
/** @var RequestStack $requestStack */
$requestStack = self::getContainer()->get(RequestStack::class);
$request = Request::createFromGlobals();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Form/Type/GatewayConfigTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp(): void
*/
public function couldBeCreatedByFormFactory(): void
{
if (Kernel::MAJOR_VERSION === 6) {
if (Kernel::MAJOR_VERSION >= 6) {
/** @var RequestStack $requestStack */
$requestStack = self::getContainer()->get(RequestStack::class);
$request = Request::createFromGlobals();
Expand Down
3 changes: 2 additions & 1 deletion Tests/Functional/WebTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerInterface;
use function get_parent_class;
use function method_exists;
Expand Down Expand Up @@ -30,7 +31,7 @@ protected function setUp(): void
}
}

protected static function getContainer(): ContainerInterface
protected static function getContainer(): Container
{
if (method_exists(get_parent_class(self::class), 'getContainer')) {
return parent::getContainer();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/app/AppKernelShared.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function registerBundles(): array
return $bundles;
}

protected function build(ContainerBuilder $container)
protected function build(ContainerBuilder $container): void
{
parent::build($container);

Expand Down
6 changes: 6 additions & 0 deletions Tests/Functional/app/config/config_sf7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework:
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.mock_file
2 changes: 1 addition & 1 deletion Traits/ControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Symfony\Component\HttpKernel\Kernel;
use function array_merge;

if (Kernel::MAJOR_VERSION === 6) {
if (Kernel::MAJOR_VERSION >= 6 ) {
trait ControllerTrait
{
public static function getSubscribedServices(): array
Expand Down
34 changes: 19 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,34 @@
"require": {
"php": "^7.4 || ^8.0",
"payum/core": "^1.7.2",
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0",
"symfony/form": "^4.4.20 || ^5.4 || ^6.0",
"symfony/validator": "^4.4 || ^5.4 || ^6.0",
"symfony/security-csrf": "^4.4 || ^5.4 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/form": "^4.4.20 || ^5.4 || ^6.0 || ^7.0",
"symfony/validator": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/security-csrf": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.4",
"symfony/polyfill-php80": "^1.26"
},
"require-dev": {
"defuse/php-encryption": "^2",
"doctrine/orm": "^2.8",
"doctrine/orm": "^2.8 || 3.0",
"omnipay/common": "^3@dev",
"omnipay/dummy": "^3@alpha",
"omnipay/paypal": "^3@dev",
"payum/offline": "^1.7",
"payum/paypal-express-checkout-nvp": "^1.7",
"payum/stripe": "^1.7",
"payum/omnipay-v3-bridge": "^1@alpha",
"payum/omnipay-v3-bridge": "dev-master",
"php-http/guzzle7-adapter": "^1.0",
"phpunit/phpunit": "^9.5",
"psr/log": "^1 || ^2",
"psr/log": "^1 || ^2 || ^3",
"stripe/stripe-php": "~7.0",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.0",
"symfony/expression-language": "^4.4 || ^5.4 || ^6.0",
"symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0",
"symfony/templating": "^4.4 || ^5.4 || ^6.0",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^4.4 || ^5.4 || ^6.0",
"symfony/yaml": "^4.4 || ^5.4 || ^6.0",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/expression-language": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/templating": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/web-profiler-bundle": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/yaml": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"twig/twig": "^2.0 || ^3.0"
},
"suggest": {
Expand All @@ -83,7 +84,10 @@
}
},
"config": {
"bin-dir": "bin"
"bin-dir": "bin",
"allow-plugins": {
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down
Loading