Skip to content

JGLWEB-1835 add generateLocationHtmlTag() to ProviderInterface - #133

Merged
RandyCupic merged 2 commits into
4.0from
JGLWEB-1835-provider-interface-4.0
Nov 13, 2026
Merged

RandyCupic merged 2 commits into
4.0from
JGLWEB-1835-provider-interface-4.0

Conversation

@RandyCupic

@RandyCupic RandyCupic commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #128 for 4.0. 3.0 (up to 3.1.0) is now merged into 4.0, so the diff contains only this change.

In 3.1, generateLocationHtmlTag() is declared with @method on ProviderInterface, so adding it stays backward compatible. The TWIG runtime calls it when the provider implements it. Otherwise it triggers a deprecation and falls back to generateHtmlTag(), applying the location overrides itself.

This PR completes that for 4.0:

  • generateLocationHtmlTag() is a regular method of ProviderInterface.
  • The @method annotation, the method_exists() check, the fallback and the deprecation are removed from the runtime, together with their tests.
  • symfony/deprecation-contracts is no longer required. Nothing else in the bundle triggers deprecations.
  • CHANGELOG (4.0.0, BC breaks) and UPGRADE ("Upgrade from 3.1 to 4.0", code changes) list the BC break.

BC break: custom providers that don't extend AbstractProvider must implement generateLocationHtmlTag(). CloudinaryProvider extends AbstractProvider, which has implemented it since 3.1.

Tested on the merge with the current 4.0: PHPUnit on Symfony 5.4 and 6.4 (603 tests), PHPStan for lib, bundle and tests, and PHP CS Fixer all pass.

@RandyCupic
RandyCupic changed the base branch from 4.0 to 3.0 November 13, 2026 09:41
@RandyCupic
RandyCupic changed the base branch from 3.0 to 4.0 November 13, 2026 09:41
@RandyCupic
RandyCupic marked this pull request as ready for review November 13, 2026 09:43
@RandyCupic
RandyCupic merged commit a5d94d1 into 4.0 Nov 13, 2026
6 checks passed
@RandyCupic
RandyCupic deleted the JGLWEB-1835-provider-interface-4.0 branch November 13, 2026 09:43
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.

1 participant