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

Initial RFC for Doctype Replacement Helper #142

Draft
wants to merge 2 commits into
base: 3.0.x
Choose a base branch
from

Conversation

gsteel
Copy link
Member

@gsteel gsteel commented Feb 19, 2022

Q A
BC Break yes
RFC yes

Description

I think the doctype helper could do with a lot of simplification and the added file DoctypeV3 is what I think the helper should look like:

  • Construct expects a single string argument that identifies a doctype declaration
  • There is a method that allows you to retrieve the configured doctype, or any other known doctype by its id
  • Casting to a string yields the configured doctype
  • There are a few other methods that can tell you if the configured or the given doctype is Html5, RDFa or or Xhtml.

Removed functionality:

  • Custom DocTypes are gone (Why would you need one? and if you do, why, not just write your own helper or hard-code it in the layout?)
  • The static registry thing has gone
  • Run-time modification of the doctype is gone.

If something like this can be agreed in principal, I'll rename/replace the existing helper and factory to suit and write/update all the tests broken by the change.

I'll also create a pull for the 2.x series with all the deprecations.

@gsteel gsteel marked this pull request as draft February 19, 2022 19:50
src/Helper/DoctypeV3.php Outdated Show resolved Hide resolved
src/Helper/DoctypeV3.php Outdated Show resolved Hide resolved
src/Helper/DoctypeV3.php Show resolved Hide resolved
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.

3 participants