Skip to content

Bump to version 1.5.2 of scssPHP#194

Merged
shadoath merged 18 commits intomasterfrom
master-1.5.2
Jun 16, 2021
Merged

Bump to version 1.5.2 of scssPHP#194
shadoath merged 18 commits intomasterfrom
master-1.5.2

Conversation

@shadoath
Copy link
Copy Markdown
Collaborator

@shadoath shadoath commented May 31, 2021

1.5.2

Fixed:

  • Fix the implementation of the Compiler::getStringText helper
  • Fix the handling of compiling without an input path, to avoid deprecations on PHP
  • Revert the 1.5.0 fix for list indexes in nth and setNth as other spec compliance issues for list are making it break the compilation of Bootstrap 4.6

1.5.1

Fixed:

  • Fix computation on colors to always return integer values for RGB channels

1.5.0

Deprecated:

  • Deprecate the compile method relying on stateful getters for included files
  • Deprecate extending the Compiler class to register custom functions. Use registerFunction instead
  • Deprecate overriding core functions through registerFunction
  • Deprecate returning a file path in custom importers for CSS imports
  • Deprecate Compiler::setEncoding as it was not implemented in a compliant way. Only UTF-8 is supported now
  • Deprecate the --dump-tree option of the pscss CLI
  • Deprecate the scssphp-glob function
  • Deprecate the Compiler::setVariables method
  • Deprecate passing non-converted values when registering variables
  • Deprecate returning a PHP value rather than a Sass value from custom functions
  • Deprecate registering custom functions without an argument declaration
  • Deprecate the @scssphp-import-once directive
  • Deprecate non-standard support for broken interpolation in loud comments
  • Deprecate \ScssPhp\ScssPhp\Exception\ServerException

Added:

  • Add support for writing the output to a file in pscss
  • Add support for writing sourcemaps to a file in pscss
  • Add support for embedding sources in the sourcemap in pscss
  • Add support for $blackness and $whiteness in adjust-color, change-color and scale-color
  • Add a new compileString method returning a CompilationResult
  • Add a new checkImportResolutions cache option to invalidate the compilation cache if imports would resolve differently
  • Add a LoggerInteface to customize the handling of warning and debug messages
  • Add the \ScssPhp\ScssPhp\Warn API to report warnings in custom functions
  • Add Compiler::replaceVariables and Compiler::addVariables to manage custom variables
  • Add the \ScssPhp\ScssPhp\ValueConverter to produce values in the Sass value representation
  • Add Compiler::getStringText to get the text of a Sass string
  • Add Compiler::getArgumentListKeywords to get the keyword arguments of a Sass argument list
  • Add Compiler::isCssImport to allow custom importers to skip CSS imports
  • Add documentation about extending the library

Changed:

  • Add type checks for arguments of core functions
  • Refactor the processing of function arguments to be more spec compliant
  • Forbid unsupported selectors in the @extend directive instead of producing a non-standard behavior
  • Take into account .sass files during import resolution to avoid selecting a different file than dart-sass
  • Change the internal representation of arguments lists to make them compliant lists
  • Tagged all internal APIs with @internal to exclude them from the backward compatibility surface
  • Change the error reporting for Compiler::assert* helpers to be consistent
  • Change scss.inc.php to register an autoloader rather than loading all classes eagerly
  • Improve the phpdoc of the library, with advanced type declarations for phpstan

Removed:

  • Remove support for running (in a non-compliant way) without mbstring and iconv. Either mbstring or iconv is now required
  • Remove non-standard support for ignoring HTML comment delimiters (but not the content of the comment) during parsing

Fixed:

  • Fix the handling of units and bounds in for loop
  • Fix the handling of interpolation in expressions
  • Fix the implementation of str-slice for non-ASCII chars
  • Fix the handling of min and max without arguments
  • Fix the implementation of keywords() for functions called with positional arguments
  • Fix the handling of list indexes in nth and set-nth
  • Fix usage of preg_match flags avoid passing null

1.4.1

  • Fix support for absolute paths in imports
  • Fix support for custom properties in plain CSS imports
  • Fix the BC layer for cwd-based import resolution to support code disabling it in the old API
  • Fix sourcemaps for the compressed output
  • Fix the escaping in selectors
  • Add the library version as a cache busting criteria
  • Fix the parser to apply realpath to the path used for error reporting as well
  • Fix the phpdoc in the Compiler

1.4.0

  • fix the injection of the @charset rule without mbstring
  • Add a CI job running tests without mbstring
  • Stop changing current directory in pscss
  • Refactor the resolution of imports to be spec compliant
  • Add a factory method for SassScriptException with an argument name
  • Expose SassScriptException as a non internal class
  • Fix regression with whitespaces or comments at the beginning of interpolated selectors
  • Fix the implementation of to-uppercase and to-lowercase to avoid being locale dependant
  • Add a better error rendering of sass errors in pscss
  • Deprecate setFormatter in favor of setOutputStyle
  • Deprecate all formatters except Expanded and Compressed
  • Change the default formatter to be Expanded
  • Migrate CI to github actions
  • Fix the generation of sourcemaps
  • Adjust the source map to account for the charset prefix
  • Improve the phpdoc
  • Fix the behavior of str-index
  • Deprecate color arithmetic
  • Fix spec compliance for the call function
  • Fix the matching of the space ending an escape sequence
  • Fix the behavior of to-uppercase and to-lowercase
  • Fix the implementation of == and != between number and colors
  • Fix the implementation of modulo
  • Mark the units-level-3 feature as implemented

1.3.0

  • Better quote() compliance
  • Improve string compliance with sass-spec
  • Fix issue with argument values being swapped
  • Fix parsing of comment in selector list
  • Fix for double dash in class names
  • Drop support for /foo/ selector
  • Fix compatibility issues with PHP 5.6 and 7.2
  • Migrate from throwParseError to parseError factory
  • Refactor Number for better spec compliance of units
  • Remove dead code, support for numbered output, and ruby-sass tests
  • Remove experimental spaceship operator and @break and @continue
  • Deprecate Compiler::addFeature()
  • Move gh-pages to /docs folder on main branch
  • Add php 8 support for phpunit

@stof
Copy link
Copy Markdown

stof commented May 31, 2021

@shadoath IMO, you should also migrate the code to use the new APIs instead of the deprecated ones.

@shadoath
Copy link
Copy Markdown
Collaborator Author

@stof I concur, Do you have a recommended path to find and update the deprecated APIs?

@Daijobou
Copy link
Copy Markdown

Daijobou commented May 31, 2021

Why was this topic automatically subscribed to me? I do not even know this project.

@stof
Copy link
Copy Markdown

stof commented May 31, 2021

Well, if you use an error handler that is compatible with the Symfony convention of using @trigger_error('...', E_USER_DEPRECATED) to report deprecations, you might have tooling for that, as scssphp relies on the same convention to report deprecation warnings. But I have no idea how error reporting is configured in wordpress.

Static analysis (using phpstan, psalm or your IDE) will also help you find cases where a whole method has been deprecated, as those are annotated as @deprecated. Unfortunately, this won't cover 100% of deprecations, as some of them don't deprecate the whole method but only some of its usages.

@Daijobou because @shadoath copy-pasted the scssphp changelog including the mentions of the contributors, and you contributed to the 1.3.0 release (a long time ago)

@Daijobou
Copy link
Copy Markdown

Thank you for the explanation. ;)

@shadoath
Copy link
Copy Markdown
Collaborator Author

shadoath commented May 31, 2021

Sorry for pinging all the mentions on this. Wanted to have a local changelog. EDIT - I removed the mentions and will do so in the future too.
@stof I pulled it up with VScode and it is giving me feedback on deprecated methods. Looks like I have a good bit of work to do.

@shadoath shadoath merged commit b7d969c into master Jun 16, 2021
@shadoath shadoath deleted the master-1.5.2 branch June 16, 2021 14:16
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.

4 participants