Skip to content

Conversation

@ddevsr
Copy link
Contributor

@ddevsr ddevsr commented Aug 15, 2025

As of PHP 8.1.0, calling Reflection*::setAccessible() has no effect; all properties are accessible by default. Currently, there is a RFC which proposes to issue a deprecation warning starting with Php 8.5.

cc @jnvsor

@jnvsor
Copy link
Member

jnvsor commented Aug 15, 2025

Hi @ddevsr, can you use the KINT_PHP_81 constant instead and squash it into a single commit? Thanks!

@ddevsr
Copy link
Contributor Author

ddevsr commented Aug 16, 2025

You mean new constant KINT_PHP_81 in init.php?

Edit: Ohh ok use KINT_PHP81 === false

@ddevsr ddevsr force-pushed the setaccessible-deprecated branch from b7b0980 to 97e3c54 Compare August 16, 2025 07:52
@jnvsor
Copy link
Member

jnvsor commented Aug 16, 2025

I'd use !KINT_PHP81 but no real difference.

Could you run composer format and composer build and commit the changes? That way the phar file will be reproducible and CI will go green :)

Update ClassStaticsPlugin.php

Update ClassStringsPluginTest.php

Update DomPluginTest.php

Update SimpleXMLElementPluginTest.php

refactor: using constant KINT_PHP81 instead

run composer format

run composer build
@ddevsr ddevsr force-pushed the setaccessible-deprecated branch from 97e3c54 to 71490e0 Compare August 16, 2025 08:44
@jnvsor
Copy link
Member

jnvsor commented Aug 16, 2025

I see what's happening, php-cs-fixer is reordering some docblocks and that's making the build fail. Can you run a composer install and explicitly use the php-cs-fixer version in the lockfile? PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix should set things straight before the build

@ddevsr
Copy link
Contributor Author

ddevsr commented Aug 16, 2025

Push unecessary file in this PR?

@jnvsor
Copy link
Member

jnvsor commented Aug 16, 2025

Nah, if you have the php-cs-fixer version in the lockfile (So just a composer install with the version in that commit) it won't make those changes and the build will succeed

If you don't want to composer install for some reason you could checkout other changes before the format and build from there and it should work too

Edit: If that's too much I could rebuild it for you and push the PR manually

@jnvsor
Copy link
Member

jnvsor commented Aug 17, 2025

Merged as 33e535c

@jnvsor jnvsor closed this Aug 17, 2025
@ddevsr ddevsr deleted the setaccessible-deprecated branch August 17, 2025 10:02
@ddevsr
Copy link
Contributor Author

ddevsr commented Aug 20, 2025

@jnvsor Tagged new version for support PHP 8.5 soon?

@jnvsor
Copy link
Member

jnvsor commented Aug 25, 2025

@ddevsr before php8.5 release yes, but because kint is very sensitive to very niche parts of PHP I like to leave it as late as possible before release since even with a feature freeze there can be breaking changes in the last week

Edit: but if you're concerned about the version constraint in codeigniter don't worry, I don't put upper version limits on kint so it probably won't break anything to just leave it on the current version so long as you're not committing the lockfile or update the version when updating to 8.5

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.

2 participants