Skip to content

fix: Neos 8.3–9.2 support and inline rendering of overrides - #89

Merged
hphoeksma merged 3 commits into
mainfrom
chore/neos-8-9-support
Nov 19, 2026
Merged

hphoeksma merged 3 commits into
mainfrom
chore/neos-8-9-support

Conversation

@hphoeksma

Copy link
Copy Markdown
Owner

Summary

Makes the package work on Neos 8.3, 8.4, 9.0, 9.1 and 9.2. Before this, the module crashed on Neos 9, found no variables on any version, and the overrides never reached the frontend.

  • Neos 9: cast Site::getNodeName() to string (SiteNodeName object was used as array key).
  • The default excludedPaths entry (-) excluded every CSS file; empty entries are now skipped.
  • Overrides are stored only in Data/Persistent/Theme/CssVariables/<site>/custom.css and rendered inline as <style data-theme-cssvariables> via the new CssVariables.customCss(site) Eel helper. No more symlink inside the package directory (that symlink could make every page return a 500).
  • Content cache is flushed after save and restore.
  • Custom properties are read from minified CSS too.
  • Variable names and values are sanitised before storing.
  • Constraints: neos/flow and neos/neos ^8.3 || ^9.0 instead of *; symfony/finder ^7.0 || ^8.0 is now required explicitly.
  • README: behaviour and compatibility table. CHANGELOG: Unreleased section.

Test plan

Tested end-to-end in local installs of Neos 8.3, 8.4, 9.0, 9.1 and 9.2 (demo site + a fixture package with plain CSS variables):

  • Module loads and lists the variables
  • Saving a colour shows the new value and the restore button
  • Frontend renders the inline <style> with the override
  • Restore removes the override from module and frontend
  • composer validate

🤖 Generated with Claude Code

- Cast Site::getNodeName() to string (SiteNodeName object in Neos 9)
- Skip empty excludedPaths entries; the default `-` excluded every CSS file
- Require neos/flow and neos/neos ^8.3 || ^9.0 instead of *
- Require symfony/finder explicitly (was only a transitive dependency)
…heet

- Store overrides only in Data/Persistent; no symlink in the package directory
- Render them as <style data-theme-cssvariables> via the CssVariables Eel helper
- Flush the content cache after save and restore
- Read custom properties from minified CSS and the stored override file
- Sanitise variable names and values before storing
- Document the behaviour, Neos compatibility and changes in README and CHANGELOG
@hphoeksma
hphoeksma merged commit bc6a7a8 into main Nov 19, 2026
1 check passed
@hphoeksma
hphoeksma deleted the chore/neos-8-9-support branch November 19, 2026 08:54
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