-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Upgrade to Symfony 6.1 #1339
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
Upgrade to Symfony 6.1 #1339
Conversation
For the DbalLogger, the work is in progress at doctrine/DoctrineBundle#1517 |
src/Twig/AppExtension.php
Outdated
|
||
public function sanitize(string $unsafeHtmlContents): string | ||
{ | ||
$htmlSanitizer = new HtmlSanitizer((new HtmlSanitizerConfig())->allowSafeElements()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should rather showcase using the service configured by FrameworkBundle (by injecting the HtmlSanitizerInterface)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ... but HtmlSanitizer component will probably add the Twig extension again ... so we'll remove ours. Let's wait a bit before doing any change. Thanks!
@javiereguiluz regarding
unfortunately there is no way to fix this deprecation 😕 Also see dmaicher/doctrine-test-bundle#188 (comment) |
@dmaicher thanks a lot for your reply. However, I'm afraid I don't understand this well:
You mean that this can't be fixed in DoctrineTestBundle and need to be fixed somewhere else (e.g. Doctrine DBAL) or you really mean that it cannot be fixed in any way. Thanks! |
There is no way currently to get rid of this deprecation because of DBAL. The So I don't see any way of fixing this unless maybe there is a forward compatibility path on DBAL itself that would allow not implementing the interface. |
I've deleted the custom But, I'm seeing this error: Any clue? Thanks! |
…er services (nicolas-grekas) This PR was merged into the 6.1 branch. Discussion ---------- [FrameworkBundle][TwigBundle] Fix registering html-sanitizer services | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | symfony/demo#1339 (comment) | License | MIT | Doc PR | - Commits ------- 9876f2f [FrameworkBundle][TwigBundle] Fix registering html-sanitizer services
}, | ||
"require": { | ||
"php": ">=8.0.2", | ||
"php": ">=8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not forget the readme file's requirements :)
Fixed! The |
@@ -9,10 +9,11 @@ | |||
"symfony/polyfill-php72": "*", | |||
"symfony/polyfill-php73": "*", | |||
"symfony/polyfill-php74": "*", | |||
"symfony/polyfill-php80": "*" | |||
"symfony/polyfill-php80": "*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both can be removed as now the php version is forced via the require
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure ... all these are in the replace
section of composer.json
. If I'm right, listing them here means that Composer won't download those packages even if some dependency requires them. So, the idea is that you add new polyfills when you upgrade your minimum required PHP version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ho right! I did not pay attention where the location were at first :s my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is indeed the list of polyfills that are replaced by the project platform requirements. So they should be added, not removed.
Don't mind much about the
sanitize_html
Twig filter. I added it quickly to make the application work. We're discussing about how adding again this Twig filter in the Symfony HtmlSanitizer component.These are the remaining deprecations:
@dmaicher do you know how can we remove the deprecation notice about DoctrineTestBundle? Thanks!
@derrabus do you know how can we fix the deprecation about
Symfony\Bridge\Doctrine\Logger\DbalLogger
? Thanks!