Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Wordpress Globals Laravel Package

php-stubs/wordpress-globals

Stub declarations for WordPress globals like $wpdb, $post, and $wp_query, giving PHPStan, Psalm, and other static analyzers accurate types. Pairs with php-stubs/wordpress-stubs to silence undefined-variable warnings and improve autocompletion in plugin and theme code.

Deep Wiki
Context7

Technical Evaluation

php-stubs/wordpress-globals is a development-time static-analysis aid, not a runtime Laravel package. It provides WordPress core global variables and constants so tools such as PHPStan/Psalm can resolve references when Laravel code, packages, or bridge layers interact with WordPress APIs. Architecture fit is narrow: high value only for Laravel applications or packages that intentionally integrate with WordPress, such as headless WordPress clients, WooCommerce bridges, migration tooling, plugin-adjacent packages, or shared PHP libraries used by both Laravel and WordPress. For a standard Laravel application with no WordPress dependency, architectural fit is poor and the package should not be introduced.

Integration feasibility is straightforward from a Composer perspective: it can be added as a require-dev dependency and referenced through static-analysis configuration, with no production runtime footprint. The main technical risk is staleness. The package has a very low maturity signal: 13 stars, an unknown repository reference in this assessment, a low score of 0.095, and a last release dated 2020-08-09. WordPress globals and constants evolve, so newer WordPress versions may produce missing-symbol false positives or incomplete analysis. Compatibility with current PHPStan/Psalm versions and modern PHP versions is also unverified and should be validated in a spike. Key questions: Which WordPress version and globals are actually needed? Is php-stubs/wordpress-stubs already present or a better primary dependency? Does the team’s static-analysis tool and baseline tolerate stale stubs? Is the integration strategic enough to justify maintaining supplemental stub definitions?

Integration Approach

Stack fit is best as a CI/developer-tooling dependency in a Laravel codebase that already has a defined WordPress integration boundary. It should not be used to justify ad hoc WordPress calls inside Laravel domain code. The practical integration is Composer require-dev, PHPStan/Psalm configuration to include the stub files, and a baseline or ignore rules for known gaps. If the project uses Laravel alone, do not add it; if it uses WordPress stubs, pair this package with a maintained WordPress stub package and treat globals as a supplemental layer.

Migration path is low-risk because there is no runtime migration. Add the package behind a branch, run the existing static-analysis suite, and compare new findings against the current baseline. Compatibility should be proven against the project’s PHP version, Composer resolution, and static-analysis tool version. Because the last release is from 2020, pin the version explicitly and avoid relying on it as the sole source of WordPress type information. If coverage is incomplete, supplement with local stub files or upgrade to a more actively maintained stub set rather than patching vendor code.

Sequencing should be: first confirm the WordPress integration use case and inventory the globals/constants actually referenced; second establish or validate a primary WordPress stub source; third add wordpress-globals as a dev-only supplement; fourth configure static analysis and run in CI; fifth triage false positives and document ownership. Rollout should be gated to projects with WordPress interaction and measured by reduced unresolved-symbol errors, not by runtime behavior.

Operational Impact

Maintenance impact is low operationally but moderate from a dependency-governance perspective. The package is dev-only, so it does not affect production runtime, deployment size, or request latency. However, the 2020 last release and low community signal mean the team should expect to own supplementation and periodic review. Support is community-based and likely limited; there is no clear vendor SLA. Scaling impact is negligible because static analysis runs in CI or developer environments, though large codebases may see longer analysis times if stubs expand the scan surface.

Primary failure modes are false positives from missing or outdated globals/constants, false negatives from over-broad stubs, incompatibility with newer PHPStan/Psalm versions, and confusion when developers mistake dev-only stubs for runtime WordPress availability. Ramp-up is low for engineers familiar with PHP static analysis and WordPress globals, but moderate for teams without a clear WordPress boundary because the package can encourage leaking WordPress assumptions into Laravel code. Overall TPM recommendation: leverage only as a pinned, dev-only supplemental static-analysis dependency for Laravel projects with an explicit WordPress integration; otherwise defer and avoid adding an unmaintained package with minimal strategic value.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels