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

Add support for Symfony 7 #1535

Merged
merged 1 commit into from Nov 14, 2023
Merged

Add support for Symfony 7 #1535

merged 1 commit into from Nov 14, 2023

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Nov 13, 2023

Q A
Branch? 2.x
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets N/A
License MIT
Doc N/A

Just as the title says, adds support for Symfony 7

@coveralls
Copy link

coveralls commented Nov 13, 2023

Coverage Status

coverage: 81.998%. remained the same
when pulling d525335 on mbabker:sf-7
into 1f5d776 on liip:2.x.

Comment on lines -24 to +23
class WarmupCacheHandler implements MessageHandlerInterface
class WarmupCacheHandler
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The interface is removed in favor of the AsMessageHandler attribute for autowiring, but since the service isn't autowired, the attribute isn't really necessary here.

@@ -21,8 +21,6 @@
use Symfony\Component\Mime\MimeTypes;

/**
* @requires PHP 5.4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Package requires PHP 7.2, so this is unnecessary

@@ -21,8 +21,6 @@
use Symfony\Component\Mime\MimeTypes;

/**
* @requires PHP 7.2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Package requires PHP 7.2, so this is unnecessary

@@ -21,8 +21,6 @@
use Symfony\Component\Routing\RequestContext;

/**
* @requires PHP 7.2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Package requires PHP 7.2, so this is unnecessary

use Symfony\Component\Messenger\MessageBusInterface;

/**
* @requires PHP 7.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Package requires PHP 7.2, so this is unnecessary

Comment on lines -39 to -45
public function testShouldImplementMessageHandlerInterface(): void
{
$rc = new \ReflectionClass(WarmupCacheHandler::class);

$this->assertTrue($rc->implementsInterface(MessageHandlerInterface::class));
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the interface is removed from the framework, and the class no longer implements it, the test is unnecessary.

Comment on lines +22 to +27
public static function setUpBeforeClass(): void
{
if (!class_exists(Helper::class)) {
static::markTestSkipped('Test requires deprecated symfony/templating component');
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

symfony/templating is deprecated and removed from the framework in 7.0. So, this can't be tested when working with versions of the framework without the component are installed.

Copy link
Member

@dbu dbu left a comment

Choose a reason for hiding this comment

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

thanks a lot! great cleanups!

i guess we should eventually do a new major version and get rid of legacy things like templating (and also support only the maintained symfony versions to reduce the matrix a bit)

@dbu dbu merged commit d4e8d6a into liip:2.x Nov 14, 2023
30 checks passed
@dbu
Copy link
Member

dbu commented Nov 14, 2023

@mbabker mbabker deleted the sf-7 branch November 14, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants