Comments (4)
You can add an entry to functionMap.php with the correction, but to be honest if I were you I would just place the correction in your application code. For example:
/**
* @var array<int|string, array{
* setting: string,
* code: string,
* message: string,
* type: string,
* }> $errors
*/
$errors = get_settings_errors( ... );
from wordpress-stubs.
How would you introduce this change?
With psalm/psalm-plugin-wordpress, the solution so far has been add new type information to a stubs override file. I recently started tinkering with that file but there's issues with it.
You can add an entry to functionMap.php with the correction [β¦]
Thanks for the information. I had not looked into the specific details of how this package builds the stubs.
[β¦] but to be honest if I were you I would just place the correction in your application code.
I agree. Especially, if the ticket might be merged in time for the next maintenance release of WordPress or a few years from now π
from wordpress-stubs.
My ticket on the WordPress Trac has been merged, thanks to @johnbillion.
from wordpress-stubs.
Hello @mcaskill! ππ»
Thank you for your report.
Stubs are automatically generated.
There are two files in the root: generator and visitor.
How would you introduce this change?
from wordpress-stubs.
Related Issues (20)
- Include `wp-includes/compat.php` HOT 10
- `wp_is_development_mode()` is missing from the stubs HOT 5
- wp_insert_attachment doesn't show WP_Error as possible return value HOT 5
- Handle `@type` tags without static keys HOT 2
- Create releases of tags HOT 3
- php deprication notices in 8.1 HOT 7
- False positive when slashing data for wp_insert_post() and wp_update_post() HOT 7
- PHPStan documentation of wp_update_post() seems to be too restrictive HOT 5
- Fix page link types HOT 2
- Incorrect stubs since >5.9.3 + mismatch between packagist.org and GitHub HOT 17
- Does anyone know when Request v2 will be part of core? HOT 2
- Test with new nikic/php-parser HOT 2
- Why globals are not included? HOT 5
- Improve types for `WP_REST_Request` HOT 3
- Check if function exists in wordpress-stubs.php HOT 7
- WordPress 6.2 in WordPress any more HOT 7
- functionMap.php wrong HOT 4
- `WP_Filesystem_Base::dirlist` returns an array<array> HOT 6
- OndΕej says: It doesn't make sense to combine void with something else in a union type. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-stubs.