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

update dependencies for php 8.2 #59

Merged

Conversation

menno-ll
Copy link
Contributor

@menno-ll menno-ll commented May 10, 2024

Using the package in PHP 8.2 causes the following deprecations to happen.

Deprecated: Return type of GetOpt\GetOpt::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Volumes/data/projects/cordaid-nl/wp-content/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 583

Call Stack:
    0.0022     597184   1. {main}() /Volumes/data/projects/cordaid-nl/wp-content/vendor/bin/php-doc-check:0
    0.0042     610736   2. include('/Volumes/data/projects/cordaid-nl/wp-content/vendor/niels-de-blaauw/php-doc-check/bin/php-doc-check') /Volumes/data/projects/cordaid-nl/wp-content/vendor/bin/php-doc-check:120
    0.0246    2512032   3. NdB\PhpDocCheck\ApplicationArgumentsProvider->__construct() /Volumes/data/projects/cordaid-nl/wp-content/vendor/niels-de-blaauw/php-doc-check/bin/php-doc-check:11
    0.0246    2512032   4. Composer\Autoload\ClassLoader->loadClass($class = 'GetOpt\\GetOpt') /Volumes/data/projects/cordaid-nl/wp-content/vendor/niels-de-blaauw/php-doc-check/src/ApplicationArgumentsProvider.php:10
    0.0246    2512160   5. Composer\Autoload\{closure:/Volumes/data/projects/cordaid-nl/wp-content/vendor/composer/ClassLoader.php:575-577}($file = '/Volumes/data/projects/cordaid-nl/wp-content/vendor/composer/../ulrichsg/getopt-php/src/GetOpt.php') /Volumes/data/projects/cordaid-nl/wp-content/vendor/composer/ClassLoader.php:427
    0.0258    2568880   6. include('/Volumes/data/projects/cordaid-nl/wp-content/vendor/ulrichsg/getopt-php/src/GetOpt.php') /Volumes/data/projects/cordaid-nl/wp-content/vendor/composer/ClassLoader.php:576

To resolve this, I've had to allow installing ulrichsg/getopt-php:4+ (as in v3 they did not even officially support php 8.0 yet).
And this required updates of phpstan and phpunit.

So I've updated those packages and this should remove those deprecations.


@NielsdeBlaauw NielsdeBlaauw merged commit 426738a into NielsdeBlaauw:master May 23, 2024
@NielsdeBlaauw
Copy link
Owner

👍

@menno-ll menno-ll deleted the feature/update_dependencies branch May 23, 2024 15:12
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