ezyang / htmlpurifier

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

Class HTMLPurifier_Language_en_x_test does not comply with psr-0 autoloading standard #246

Closed xpetter closed 4 years ago

xpetter commented 4 years ago

I get this from composer: Deprecation Notice: Class HTMLPurifier_Language_en_x_test located in ./vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///composer.phar/src/Composer/Autoload/ClassMapGenerator.php:185

ricardomartos commented 4 years ago

Same here

cap-akimrey commented 4 years ago

Same Composer notice here, but citing psr-4 non-compliance: Deprecation Notice: Class HTMLPurifier_Language_en_x_test located in ./vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:185

maxxscho commented 4 years ago

Same here with PSR-0 non compliance:

Deprecation Notice: Class HTMLPurifier_Language_en_x_test located in ./vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:185
tgfarias commented 4 years ago

Deprecation Notice: Class HTMLPurifier_Language_en_x_test located in ./vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Same here

sebastiansulinski commented 4 years ago

And here.

lphilps commented 4 years ago

It appears that the problem is that the class name "HTMLPurifier_Language_en_x_test" doesn't match the file name "en-x-test.php".

Composer v1.10.0 started producing this error, previous versions of composer didn't care.

Any chance of getting a new release that fixes this?

ezyang commented 4 years ago

We should probably just delete this file and the tests associated with it.

maxxscho commented 4 years ago

Since there aren't any tests in this file, I guess nobody will miss it 😄

roelofr commented 4 years ago

The file isn't a test, it's used for a test though.

https://github.com/ezyang/htmlpurifier/blob/b81690c17eae5dbea7557d1f359af8dd17e9beef/tests/HTMLPurifier/LanguageFactoryTest.php#L37-L38

The HTMLPurifier_LanguageFactoryTest should be re-written to use a dev-only response, which would remove the file from autoloading.

kghbln commented 4 years ago

Will be cool to get rid of this warning. People are already starting to duplicate this issue here.

Jimbolino commented 4 years ago

The problem was actually fixed some time ago: https://github.com/ezyang/htmlpurifier/commit/4faca32a4d4b8152d17956606e1fb5043fcc1f10

Maybe it's time for a new v4.13.0 release, because most people require a stable version in their projects

roelofr commented 4 years ago

In my tests Composer will still throw the warning, despite excluding them from the classmap (I don't know why, seems weird to me).

Jimbolino commented 4 years ago

I think you are trying to exclude files that are part of vendor/ezyang/htmlpurifier. With me the errors disappeared when i switched my dependecy from "^4.7" to "dev-master"

roelofr commented 4 years ago

Hmm, could be. I was replying from the top of my head.

A tag is absolutely a good idea.

williamdes commented 4 years ago

https://github.com/ezyang/htmlpurifier/blob/master/.gitattributes could be used to exclude the file from composer vendor bundles But fixing the real issue is the best option.

jbdelhommeau commented 4 years ago

Bug will be fixed with this commit : https://github.com/ezyang/htmlpurifier/commit/4faca32a4d4b8152d17956606e1fb5043fcc1f10 the 31 Oct 2019 juste after the laster release 28 Oct 2019. https://github.com/ezyang/htmlpurifier/releases/tag/v4.12.0

Can you release a new version to fix it please !?

roelofr commented 4 years ago

Basically everyone has been waiting for a tag on a commit from ¾ year ago.

That's quite a scary sign for the future of this project.

jbdelhommeau commented 4 years ago

Poke @ezyang !

ezyang commented 4 years ago

4.13.0 is tagged and released