Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIx Deprecated Implicit Nullable Parameter in compileFile Method for PHP 8.4.1 Compatibility #88

Open
medofrh opened this issue Jan 14, 2025 · 0 comments

Comments

@medofrh
Copy link

medofrh commented Jan 14, 2025

The compileFile method in Compiler.php line 60 uses an implicitly nullable parameter $cssFilePath without explicitly marking it as nullable, which triggers a deprecation notice in PHP 8.4.1. This needs to be updated to ensure compatibility with PHP 8.4.1 and future versions.

the current method is:

public static function compileFile(string $scssFilePath, array $variables, string $cssFilePath = null, bool $useSourceMap = false, string $outputStyle = OutputStyle::COMPRESSED): string

To fix this issue, $cssFilePAth should be explicitly marked as nullable using ?String, as follows:

public static function compileFile(string $scssFilePath, array $variables, ?string $cssFilePath = null, bool $useSourceMap = false, string $outputStyle = OutputStyle::COMPRESSED): string

Thank you for addressing this issue!

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

No branches or pull requests

1 participant