Skip to content

Symfony 6 7 8 php 8 3#24

Closed
alexver wants to merge 9 commits into
Bee-Lab:masterfrom
alexver:symfony-6_7_8_php_8_3
Closed

Symfony 6 7 8 php 8 3#24
alexver wants to merge 9 commits into
Bee-Lab:masterfrom
alexver:symfony-6_7_8_php_8_3

Conversation

@alexver

@alexver alexver commented Jun 10, 2026

Copy link
Copy Markdown

Symfony 6/7/8 compatible
Fix #21 and #23

alexver and others added 9 commits April 9, 2025 22:33
Extend the compatibility range so the bundle stops capping downstream
consumers at Symfony 6.x, while keeping 6.4 in range (no core upgrade).

- composer: symfony/* => ^6.4 || ^7.0 || ^8.0, php => >=8.3
- composer: phpunit/phpunit => ^11.5 || ^12.0
- tests: replace removed MockBuilder::setMethods()/addMethods() with a
  mock of the concrete ExpressAuthorizeRequest (onlyMethods)
- phpunit.xml.dist: migrate removed <filter><whitelist> to <source>
- fix PHP 8 typed-property regressions so the suite passes (Service
  transaction guard via isset(), nullable amount, empty response => null)

Verified resolvable on 6.4 and 7.x; suite green on Symfony 6.4 + PHPUnit 12.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
->cannotBeEmpty()
->defaultValue('Beelab\PaypalBundle\Paypal\Service')
->setDeprecated('The "service_class" option is deprecated. Define your class as service instead.')
->setDeprecated('The "service_class" option is deprecated. Define your class as service instead.', '')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of this empty string?

Comment thread Entity/Transaction.php

namespace Beelab\PaypalBundle\Entity;

use DateTime;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is useless

Comment thread Entity/Transaction.php
{
return $this->response;
$result = $this->response;
if (empty($result) && $this->responseText != '') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty should be avoided, use a proper check

Comment thread Entity/Transaction.php
$this->status = self::STATUS_OK;
$this->end = new \DateTime();
$this->response = $response;
$this->response = $response??[];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong spacing

Comment thread Entity/Transaction.php
$this->status = self::STATUS_ERROR;
$this->end = new \DateTime();
$this->response = $response;
$this->response = $response??[];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong spacing

Comment thread .gitignore
@@ -1,4 +1,5 @@
.*.cache
.idea

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a big no-no. Use your global ignore for local files

Comment thread CLAUDE.md
@@ -0,0 +1,41 @@
# CLAUDE.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this file

Comment thread composer.json
"require": {
"php": "^7.1",
"doctrine/orm": "^2.5",
"php": ">=8.3",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is too loose, we can't guarantee this bundle will work on PHP 9+

Comment thread composer.json
"omnipay/common": "^3.0",
"php-http/guzzle6-adapter": "^2.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.1"
"phpunit/phpunit": "^11.5 || ^12.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove 11, add 13

Comment thread phpunit.xml.dist
<phpunit bootstrap="./Tests/bootstrap.php" colors="true">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="./Tests/bootstrap.php"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the bootstrap file anymore

@garak

garak commented Jul 2, 2026

Copy link
Copy Markdown
Member

No activity here, closing

@garak garak closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

php 8 support

2 participants