WapplerSystems / ws_scss

SASS Compiler for TYPO3
11 stars 25 forks source link

PHP 8 support #44

Closed ThiemoD closed 2 years ago

ThiemoD commented 3 years ago

Hello! I'm currently trying to use this extension on a typo3 v11 setup with PHP 8.0.6, but I can't install it using the composer, as the ext_emconf.php file only allows for php 7.2 - 7.4.

Is there anything that may break when using this extension with php 8 or can I simply update the php version in the ext_emconf.php file?

svewap commented 3 years ago

Hi, that's correct because no release of typo3 core is officially compatible to PHP 8. See: https://typo3.org/cms/roadmap This extension uses external libraries ( scssphp/scssphp , css-crush/css-crush ). They must be compatible first and then the whole extension can be made compatible. But I don't know their status.

ThiemoD commented 3 years ago

Thanks for the amazingly quick answer!

That's interesting, didn't know that v11 isn't officially compatible to PHP 8. I actually started this project using PHP 7.4, but there was one extension (I think it was typo3/cms-form) that required PHP ^8 (at least that's what composer told me), so I upgraded.

I checked the status of the 2 external libraries you mentioned and they're both compatible with PHP 8.0.6, the current stable PHP release. I was also able to install them to my local composer setup.

svewap commented 3 years ago

Do both projects claim to be compatible? Because just because it is installable does not mean that it is executable.

ThiemoD commented 3 years ago

scssphp/scssphp definitely is (as stated in changelog for version 1.3) but css-crush/css-crush hasn't been updated since January 2020 and thus doesn't claim to be compatible.

I'll try doing some tests later this week to see if it works with php 8...

ThiemoD commented 3 years ago

Alright so I tested the extension on a Typo3 11.2.0 installation with PHP 8.0.3 and everything seems to work: The scss-File gets automatically compiled and saved into the given outputdir using the given formatter. Setting and using variables also worked for me. I don't know which functions of css-crush are used within the extension, so I cannot test them on their own.

Knowing that my typo3 installation isn't compatible with PHP 8, I also managed to locate the composer-package that required it and was able to downgrade the package so that I can now use PHP 7.4. Therefore, I don't need the extension to run on PHP 8 anymore, but I still thought, I'd let you know of my findings. Again Thanks a lot for your time & help!

svewap commented 2 years ago

Now works with PHP 8