Skip to content

docs(Roadmap): say when classic goes, and mark what the file says is marked - #2216

Merged
DerManoMann merged 2 commits into
zircote:masterfrom
DerManoMann:docs/roadmap-and-deprecation-markers
Sep 26, 2026
Merged

DerManoMann merged 2 commits into
zircote:masterfrom
DerManoMann:docs/roadmap-and-deprecation-markers

Conversation

@DerManoMann

Copy link
Copy Markdown
Collaborator

Overview

ROADMAP.md says all classic code is marked @deprecated in v7, and that everything marked in
v6 is removed in v7. Neither half was enforced by anything. src/ carries eight @deprecated
markers and not one of them names a version, so "removed in v7" is a claim the code does not
make. And the surface the README has discouraged since 4.8 — docblock annotations — carries no
marker at all.

That leaves two questions a user cannot answer from the repository: when does the thing I am
using go away, and is the thing I am using on the way out. This states the rule — a marker
names the version that removes the thing, and nothing is removed before the version its marker
names
— and brings the code in line with it in the same change, since a plan describing
markers that do not exist would be wrong from the moment it merged.

Two judgement calls worth a second opinion:

  • Generator::UNDEFINED and Generator::isDefault() are dated 8.0, not 7.0. Every classic
    custom processor uses them, and integrations that build the annotation objects directly
    without ever scanning use them too. They belong with classic rather than ahead of it.
  • The docblock surface is dated 8.0 for the same reason. DocBlockAnnotationFactory,
    DocBlockParser and the six alias/namespace methods on Generator — which nothing outside
    that surface calls, and which no CLI option reaches — keep working through v7 untouched.

The relocation shims keep the 7.0 date they were always intended to have, and every existing
marker keeps the version it was actually added in, read off the history rather than dated to
today.

Parsing a docblock annotation now also triggers a runtime deprecation. It fires once per
generator run rather than once per annotation, and only when an annotation is really parsed —
a project that has moved to attributes still has docblocks everywhere.
symfony/deprecation-contracts was already in require and called nowhere.

Changes

  • Rewrite ROADMAP.md: the deprecation rule, what v6 completes, the v7 default-mode switch, the
    v8 namespace move, and the two questions that are still open
  • Add @deprecated since 6.11, removed in 8.0 to Analysers\DocBlockAnnotationFactory,
    Analysers\DocBlockParser and the six alias/namespace methods on Generator
  • Re-target Generator::UNDEFINED and Generator::isDefault() to 8.0
  • Date the relocation shims and TypeResolverInterface::NATIVE_TYPE_MAP at 7.0
  • Trigger a runtime deprecation on the first docblock annotation parsed in a generator run
  • Correct the modes page's version timeline, which said spec code "might" move namespace

…marked

ROADMAP.md said classic code is marked deprecated in v7 and that everything
marked in v6 is removed in v7. Both halves were unenforced: src/ carried eight
markers, none of them naming a version, and the docblock annotation surface the
README has discouraged since 4.8 carried none at all.

The file now states the rule it relies on — a marker names the version that
removes the thing, and nothing is removed before the version its marker names —
and the code is brought in line with it in the same change, because a plan that
describes markers which do not exist is wrong from the moment it merges.

The two judgement calls worth reviewing. Generator::UNDEFINED and isDefault()
move from an open-ended marker to 8.0 rather than 7.0: every classic custom
processor uses them, and at least one integration builds the annotation objects
directly without ever scanning, so they go when classic goes. The docblock
surface — DocBlockAnnotationFactory, DocBlockParser and the six alias/namespace
methods on Generator, which nothing outside that surface calls — is marked for
8.0 for the same reason, and the relocation shims keep their existing 7.0 date.

Each existing marker keeps the version it was actually added in, read off the
history rather than dated to today.

Parsing a docblock annotation also triggers a runtime deprecation, once per
generator run rather than once per annotation, and only when an annotation is
actually parsed — a project that has moved to attributes still has docblocks.
symfony/deprecation-contracts was already required and called nowhere.
The v7 list said `Builder::setMode()` goes and stopped there. Three more
surfaces die with it and nothing said so: the `Builder\Mode` enum,
`Console\GenerateInput::$mode`, and the CLI's `-m`/`--mode` option.

Also worth stating because it makes these unlike every other marker in the file:
they name no replacement. There is one pipeline in 8.0, so there is nothing to
select rather than a different way to select it.
@DerManoMann
DerManoMann merged commit 53b8f5f into zircote:master Sep 26, 2026
19 checks passed
@DerManoMann
DerManoMann deleted the docs/roadmap-and-deprecation-markers branch September 26, 2026 05:57
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