Skip to content

Allow symfony/html-sanitizer ^8.0#19194

Merged
danharrin merged 1 commit intofilamentphp:4.xfrom
ejunker:patch-1
Feb 4, 2026
Merged

Allow symfony/html-sanitizer ^8.0#19194
danharrin merged 1 commit intofilamentphp:4.xfrom
ejunker:patch-1

Conversation

@ejunker
Copy link

@ejunker ejunker commented Feb 4, 2026

Description

Update composer.json version constraint for symfony/html-sanitizer to also allow ^8.0.

Note: this is my first PR to Filament. I am not sure if this should target 4.x or 5.x branch.

Visual changes

None

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

Update composer.json version constraint for symfony/html-sanitizer to also allow ^8.0.

Signed-off-by: Eric Junker <ejunker@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Feb 4, 2026
@danharrin danharrin added the dependencies Pull requests that update a dependency file label Feb 4, 2026
@danharrin danharrin added this to the v4 milestone Feb 4, 2026
@danharrin danharrin merged commit ff25201 into filamentphp:4.x Feb 4, 2026
24 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Feb 4, 2026
@FlorianWeigang
Copy link

@danharrin

Hey guys,

just FYI after composer update I started getting 500 Errors on my Servers with sth like:

Class \"Dom\\HTMLDocument\" not found at /app/vendor/symfony/html-sanitizer/Parser/NativeParser.php:21

Using Filament v4 + PHP 8.3 and my html-sanitizer got updated to v8.0 causes the error.

Fix:
Actually pinning it back to "symfony/html-sanitizer": "^7.0" in my composer.json fixed it.

In case anybody else got the issue.

Best Flo

@danharrin
Copy link
Member

Please open an issue with a reproduction repository so we can look into it

@ejunker
Copy link
Author

ejunker commented Feb 6, 2026

I apologize. I didn't realize symfony/html-sanitizer 8.0 requires PHP 8.4 since the class \Dom\HTMLDocument is part of the new, modern DOM extension introduced in PHP 8.4

@danharrin
Copy link
Member

Composer should not even allow that dependency version on that PHP version then, why is that happening?

@ejunker
Copy link
Author

ejunker commented Feb 6, 2026

Maybe he installed with composer install --ignore-platform-reqs to ignore the PHP version constraint

@FlorianWeigang
Copy link

Just checked everything again:

Local: PHP 8.4
Deployment Script: composer install --no-interaction --optimize-autoloader --ignore-platform-reqs
Server: PHP 8.3

So yep, --ignore-platform-reqs explains why Composer allowed it despite the PHP constraint.

Really appreciate your quick responses, thanks everyone! Have a great weekend and don’t work too late!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants