You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes on the current editor setup, from working on #143.
What assets/js/codemirror.js is today
It contains no psalm.dev code (that all lives in includes/script.php), but it can't be regenerated from anything:
Core is labelled 5.52.0 but is not the published 5.52.0 lib/codemirror.js: ~490 lines differ, mostly bundler renames (map$$1), so it looks like a different build of a similar version.
addon/lint matches 5.52.0 exactly; mode/clike differs from 5.52.0 by ~90 lines (older copy).
mode/php has one local edit (0ccbaed: enum, readonly, match keywords), which upstream 5.65 already has verbatim.
package.json has codemirror: ^5.52.0 (installs 5.65.21) but nothing uses it; build:js only minifies the committed file.
Cheap step before (or instead of) v6
Build codemirror.min.js straight from node_modules/codemirror (core, php/clike/xml/javascript/css/htmlmixed modes, lint/closebrackets/matchbrackets/runmode addons), pin the exact version and delete the hand-made codemirror.js. That moves us to the latest 5.x (5.65) and makes later upgrades a version bump. Some of the highlighting annoyances may already be fixed in 5.65's PHP mode.
What a v6 migration would have to port
The playground uses the v5 API fairly widely: fromTextArea, the lint addon (getAnnotations/performLint, and its CodeMirror-lint-mark-* classes, also reused in the homepage heading), markText for hover and navigation highlights, addWidget for signature help, runMode for the fix-preview diff highlighting, plus posFromIndex/indexFromPos, coordsChar/charCoords, extraKeys and autoCloseBrackets. v6 has equivalents for all of these (@codemirror/lint, decorations, tooltips, @codemirror/lang-php, closeBrackets), but it is a rewrite of that integration plus a real JS build step (ES modules), not a drop-in update.
Activity
alies-dev commentedon Nov 8, 2026
Notes on the current editor setup, from working on #143.
What
assets/js/codemirror.jsis todayIt contains no psalm.dev code (that all lives in
includes/script.php), but it can't be regenerated from anything:5.52.0but is not the published 5.52.0lib/codemirror.js: ~490 lines differ, mostly bundler renames (map$$1), so it looks like a different build of a similar version.addon/lintmatches 5.52.0 exactly;mode/clikediffers from 5.52.0 by ~90 lines (older copy).mode/phphas one local edit (0ccbaed:enum,readonly,matchkeywords), which upstream 5.65 already has verbatim.closebrackets,matchbracketsandrunmodefrom 5.65.21.package.jsonhascodemirror: ^5.52.0(installs 5.65.21) but nothing uses it;build:jsonly minifies the committed file.Cheap step before (or instead of) v6
Build
codemirror.min.jsstraight fromnode_modules/codemirror(core, php/clike/xml/javascript/css/htmlmixed modes, lint/closebrackets/matchbrackets/runmode addons), pin the exact version and delete the hand-madecodemirror.js. That moves us to the latest 5.x (5.65) and makes later upgrades a version bump. Some of the highlighting annoyances may already be fixed in 5.65's PHP mode.What a v6 migration would have to port
The playground uses the v5 API fairly widely:
fromTextArea, the lint addon (getAnnotations/performLint, and itsCodeMirror-lint-mark-*classes, also reused in the homepage heading),markTextfor hover and navigation highlights,addWidgetfor signature help,runModefor the fix-preview diff highlighting, plusposFromIndex/indexFromPos,coordsChar/charCoords,extraKeysandautoCloseBrackets. v6 has equivalents for all of these (@codemirror/lint, decorations, tooltips,@codemirror/lang-php,closeBrackets), but it is a rewrite of that integration plus a real JS build step (ES modules), not a drop-in update.