PHPackages                             wptechnix/php-scoper-wordpress-excludes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wptechnix/php-scoper-wordpress-excludes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wptechnix/php-scoper-wordpress-excludes
=======================================

Curated, auto-updated PHP-Scoper exclude-symbol lists for WordPress core, WooCommerce, Action Scheduler, ACF PRO, WP-CLI and Plugin Update Checker.

v1.0.2(2w ago)1912↑1025%MITPHPPHP ^8.0CI passing

Since Jul 9Pushed 2w agoCompare

[ Source](https://github.com/WPTechnix/php-scoper-wordpress-excludes)[ Packagist](https://packagist.org/packages/wptechnix/php-scoper-wordpress-excludes)[ Docs](https://github.com/WPTechnix/php-scoper-wordpress-excludes)[ RSS](/packages/wptechnix-php-scoper-wordpress-excludes/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

php-scoper-wordpress-excludes
=============================

[](#php-scoper-wordpress-excludes)

[![CI](https://github.com/WPTechnix/php-scoper-wordpress-excludes/actions/workflows/ci.yml/badge.svg)](https://github.com/WPTechnix/php-scoper-wordpress-excludes/actions/workflows/ci.yml)[![Update Exclusion Symbols](https://github.com/WPTechnix/php-scoper-wordpress-excludes/actions/workflows/update.yml/badge.svg)](https://github.com/WPTechnix/php-scoper-wordpress-excludes/actions/workflows/update.yml)[![Packagist Version](https://camo.githubusercontent.com/8924add2550ee64ab148f6f513ff408ea302bcc695001ab5f3f9b679946a04b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7770746563686e69782f7068702d73636f7065722d776f726470726573732d6578636c75646573)](https://packagist.org/packages/wptechnix/php-scoper-wordpress-excludes)[![License](https://camo.githubusercontent.com/f380fad7be943d2d27d2b8bbfe22f5e3041f070b18533271a0c2510386b32621/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7770746563686e69782f7068702d73636f7065722d776f726470726573732d6578636c75646573)](LICENSE)

Automatically generated, curated exclude lists for [PHP-Scoper](https://github.com/humbug/php-scoper) covering the WordPress ecosystem.

Instead of maintaining large `exclude-classes`, `exclude-functions` and `exclude-constants` arrays by hand, this package generates them from upstream packages and keeps them up to date.

---

Why this exists
---------------

[](#why-this-exists)

When you scope a WordPress plugin or theme with PHP-Scoper, symbols provided by the host environment must **not** be prefixed. This includes WordPress itself, WooCommerce, Action Scheduler, ACF, WP-CLI and other commonly used packages.

Maintaining those symbol lists yourself is tedious, error-prone and quickly becomes outdated as upstream packages evolve.

This package automatically generates those lists from upstream source or stub packages, so you always have an up-to-date set of exclusions without any manual maintenance.

---

Installation
------------

[](#installation)

```
composer require --dev wptechnix/php-scoper-wordpress-excludes
```

---

Supported packages
------------------

[](#supported-packages)

PackageUpstream sourceCoverage`wordpress``php-stubs/wordpress-stubs` + `php-stubs/wordpress-globals`WordPress core`woocommerce``php-stubs/woocommerce-stubs`WooCommerce core and bundled packages`action-scheduler``woocommerce/action-scheduler`Action Scheduler`acf``php-stubs/acf-pro-stubs`Advanced Custom Fields Pro (superset of free ACF)`wp-cli``php-stubs/wp-cli-stubs`WP-CLI`plugin-update-checker``yahnis-elsts/plugin-update-checker`Plugin Update CheckerAll supported packages are included by default.

---

Usage
-----

[](#usage)

Require the helper from your `scoper.inc.php`:

```
