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

[FrameworkBundle][HtmlSanitizer] Fix calling allowStaticElements when setting allow_all_static_elements: true #46538

Merged
merged 1 commit into from Jun 1, 2022

Conversation

norkunas
Copy link
Contributor

@norkunas norkunas commented Jun 1, 2022

Q A
Branch? 6.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR symfony/symfony-docs#...
Symfony\Component\ErrorHandler\Error\UndefinedMethodError {#21964
  #message: """
    Attempted to call an undefined method named "allowAllStaticElements" of class "Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig".\n
    Did you mean to call e.g. "allowSafeElements" or "allowStaticElements"?
    """
  #code: 0
  #file: "./var/cache/dev/ContainerXJ5lfcV/getHtmlSanitizer_Sanitizer_PostContent_SanitizerService.php"
  #line: 25
  trace: {
    ./var/cache/dev/ContainerXJ5lfcV/getHtmlSanitizer_Sanitizer_PostContent_SanitizerService.php:25 {
      ContainerXJ5lfcV\getHtmlSanitizer_Sanitizer_PostContent_SanitizerService::do($container, $lazyLoad = true)
      › $a = new \Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig();
      › $a = $a->allowAllStaticElements();
      › $a = $a->forceHttpsUrls(false);
    }
    ./var/cache/dev/ContainerXJ5lfcV/App_KernelDevDebugContainer.php:981 { …}
    ./var/cache/dev/ContainerXJ5lfcV/getTestCommandService.php:23 { …}
    ./var/cache/dev/ContainerXJ5lfcV/App_KernelDevDebugContainer.php:981 { …}
    ./vendor/symfony/dependency-injection/Container.php:383 { …}
    ./vendor/symfony/dependency-injection/Argument/ServiceLocator.php:43 { …}
    ./vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46 { …}
    ./vendor/symfony/console/Application.php:570 { …}
    ./vendor/symfony/console/Application.php:657 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:114 { …}
    ./vendor/symfony/console/Application.php:259 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:80 { …}
    ./vendor/symfony/console/Application.php:171 { …}
    ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54 { …}
    ./vendor/autoload_runtime.php:29 { …}
    ./bin/console:15 { …}
  }
}

@carsonbot carsonbot added this to the 6.2 milestone Jun 1, 2022
@carsonbot carsonbot changed the title [HtmlSanitizer][FrameworkBundle] Fix calling allowStaticElements when setting allow_all_static_elements: true [FrameworkBundle][HtmlSanitizer] Fix calling allowStaticElements when setting allow_all_static_elements: true Jun 1, 2022
@nicolas-grekas nicolas-grekas changed the base branch from 6.2 to 6.1 Jun 1, 2022
@nicolas-grekas nicolas-grekas modified the milestones: 6.2, 6.1 Jun 1, 2022
@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jun 1, 2022

(please check the ci failures)

@norkunas
Copy link
Contributor Author

@norkunas norkunas commented Jun 1, 2022

(please check the ci failures)

Not sure how to fix these errors because I've already updated all places.

@stof
Copy link
Member

@stof stof commented Jun 1, 2022

Well, according to the CI failure, you haven't updated the XML test for that config

…en setting `allow_all_static_elements: true`
@norkunas
Copy link
Contributor Author

@norkunas norkunas commented Jun 1, 2022

Well, according to the CI failure, you haven't updated the XML test for that config

Found it, thanks :)

stof
stof approved these changes Jun 1, 2022
@chalasr
Copy link
Member

@chalasr chalasr commented Jun 1, 2022

Thank you @norkunas.

@chalasr chalasr merged commit 3c4bc1d into symfony:6.1 Jun 1, 2022
6 of 9 checks passed
@norkunas norkunas deleted the fix-method-call branch Jun 1, 2022
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this issue Jun 2, 2022
This PR was merged into the 6.1 branch.

Discussion
----------

[HtmlSanitizer] Fix wrong method name

Ref symfony/symfony#46538

Commits
-------

c78c78f [HtmlSanitizer] Fix wrong method name
@fabpot fabpot mentioned this pull request Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants