-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix integration tests by fixing a PHP 8.1+ deprecation warnings in ReflectionClass #1351
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mfn
changed the title
gha: get more insights when/if logs exist
gha: integration-tests: get more insights when/if logs exist
May 21, 2022
mfn
force-pushed
the
mfn-integration-tests
branch
3 times, most recently
from
May 21, 2022 19:32
5bc2929
to
90e175c
Compare
The problem with `null` being passed to `ReflectionClass` was always there but in PHP 8.1+ it triggers a deprecation warnings. Since having `null` in `$concrete` doesn't make sense to reflect anything anyway, we just throw a custom exception (which gets caught a couple lines below) and just carry on. When using `-v` this can be seen, example: ``` $ ./artisan ide-helper:meta -v Cannot make 'Faker\Generator': Class 'Faker\Provider\en_US\Barcode' not found. Cannot make 'Illuminate\Contracts\Auth\Authenticatable': Class does not exist Cannot make 'cache.psr6': Class 'Symfony\Component\Cache\Adapter\Psr16Adapter' not found. Cannot make 'csp-nonce': Class 'Wza3Mf4CXIvCkcp9K3boMUGJoK6S9maO' not found. Cannot make 'env': Class 'local' not found. Cannot make 'filesystem.cloud': Disk [s3] does not have a configured driver. Cannot make 'redis.connection': Redis connection [default] not configured. A new meta file was written to .phpstorm.meta.php ```
Helps when debugging things
mfn
force-pushed
the
mfn-integration-tests
branch
from
May 21, 2022 19:33
90e175c
to
1656c84
Compare
mfn
changed the title
gha: integration-tests: get more insights when/if logs exist
Fix integration tests by fixing a PHP 8.1+ deprecation warnings in ReflectionClass
May 21, 2022
6 tasks
barryvdh
approved these changes
May 21, 2022
d3v2a
pushed a commit
to d3v2a/laravel-ide-helper
that referenced
this pull request
Feb 16, 2024
…flectionClass (barryvdh#1351) * gha: get more insights when/if logs exist * Better handle cases when we can receive a concrete instance The problem with `null` being passed to `ReflectionClass` was always there but in PHP 8.1+ it triggers a deprecation warnings. Since having `null` in `$concrete` doesn't make sense to reflect anything anyway, we just throw a custom exception (which gets caught a couple lines below) and just carry on. When using `-v` this can be seen, example: ``` $ ./artisan ide-helper:meta -v Cannot make 'Faker\Generator': Class 'Faker\Provider\en_US\Barcode' not found. Cannot make 'Illuminate\Contracts\Auth\Authenticatable': Class does not exist Cannot make 'cache.psr6': Class 'Symfony\Component\Cache\Adapter\Psr16Adapter' not found. Cannot make 'csp-nonce': Class 'Wza3Mf4CXIvCkcp9K3boMUGJoK6S9maO' not found. Cannot make 'env': Class 'local' not found. Cannot make 'filesystem.cloud': Disk [s3] does not have a configured driver. Cannot make 'redis.connection': Redis connection [default] not configured. A new meta file was written to .phpstorm.meta.php ``` * gha: make sure to run meta with -v to see all output Helps when debugging things * Add CHANGELOG.md entry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
new ReflectClass
does not silently swallownull
values anymore as it did before-v
was used, examplenull
values and throwing aRuntimeException
Type of change
Checklist
composer fix-style