Skip to content

Add the deprecation-handling Sass options#99

Open
Amoifr wants to merge 1 commit into
SymfonyCasts:mainfrom
Amoifr:add-deprecation-options
Open

Add the deprecation-handling Sass options#99
Amoifr wants to merge 1 commit into
SymfonyCasts:mainfrom
Amoifr:add-deprecation-options

Conversation

@Amoifr

@Amoifr Amoifr commented Jul 12, 2026

Copy link
Copy Markdown

Closes #89.

@stof spotted that the supported Sass options were missing the deprecation-related ones, and suspected #67 (repeated options) would need solving first. Good news: that part is already done — #37 taught SassBuilder to expand array values into repeated flags, which load_path already relies on. So this is just wiring up what's missing:

Config Sass flag
verbose --verbose boolean
fatal_deprecation --fatal-deprecation repeatable
future_deprecation --future-deprecation repeatable
silence_deprecation --silence-deprecation repeatable
symfonycasts_sass:
    sass_options:
        fatal_deprecation: ['import']
        silence_deprecation: ['color-functions']

One caveat worth flagging: --silence-deprecation only exists since Dart Sass 1.74.0, while the binary this bundle downloads is pinned to 1.69.7. The other three work fine on the pinned binary (--future-deprecation works there even though sass --help doesn't advertise it — verified 🕵️). Every option defaults to null and is only emitted when set, so nothing changes for existing users; the docs note the version requirement.

Tests cover both the CLI flag expansion and a functional build: opting into the import deprecation early warns, and marking it fatal turns it into a build error. I also fixed the $sassOptions docblocks, which still claimed bool|string while load_path has been passing arrays since #37.

Thanks for the bundle! 🙏

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.

the supported Sass options are incomplete

1 participant