ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.03k stars 323 forks source link

PHP 8.1 Deprecated funcs #311

Closed xkpx64 closed 2 years ago

xkpx64 commented 2 years ago

Deprecated: Return type of HTMLPurifier_PropertyListIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Xampp\htdocs\libs\formr\HTMLPurifier.standalone.php on line 8340

Deprecated: Return type of HTMLPurifier_StringHash::offsetGet($index) should either be compatible with ArrayObject::offsetGet(mixed $key): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Xampp\htdocs\libs\formr\HTMLPurifier.standalone.php on line 8458

davidrans commented 2 years ago

Is this fixed by https://github.com/ezyang/htmlpurifier/pull/310?

What's the process for getting that change incorporated into a release?

zerocrates commented 2 years ago

Yes, that PR included the attributes used to silence those two deprecation notices.

marcovtwout commented 2 years ago

@ezyang Since https://github.com/ezyang/htmlpurifier/pull/310 was merged this issue can be closed. And could you please tag a new release so HTMLPurifier has PHP 8.1 support?

mashb1t commented 2 years ago

@ezyang which topics do still need to be finished until a new release can be created and can we support on that?

ezyang commented 2 years ago

just need me to find some time

mashb1t commented 2 years ago

@ezyang what is your rough estimate when you'll find the time to do the release? Currently this blocks the Yii1 compatibility PR for PHP8.1 compatibility https://github.com/yiisoft/yii/pull/4386 which would allow us as a business to add basically one more year of PHP support for our customers. We as a business would highly appreciate to upgrade our Yii1 version at the start of next week including this fix.

bytestream commented 2 years ago

@mashb1t there is nothing stopping you from forking the lib temporarily and coming back when a release is done. Open source doesn't have time requirements.

mashb1t commented 2 years ago

@bytestream yes of course, thank you for mentioning this alternative. This is in fact another option but as far as i understood only a release/version tag is missing for this htmlpurifier to be officially PHP8.1 compatible to not break minimum stability requirements and having to fork both the yii1 framework repo and the htmlpurifier repo.

mashb1t commented 2 years ago

@ezyang is there any chance you find the time to create a new release in the next 2 weeks?

c-schmitz commented 2 years ago

Yes, please release.

ezyang commented 2 years ago

it turns out baby life makes you very very lazy

marcovtwout commented 2 years ago

@ezyang Could you let me know if you plan to release it within the next 2-3 weeks? Otherwise I will use a development version for the next Yii 1 release. Thanks!

pszalko commented 2 years ago

@ezyang Will you be able to release a version with PHP 8.1 support anytime soon? Thanks!