PHPackages                             masgeek/windows-ext-ignorer - 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. masgeek/windows-ext-ignorer

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

masgeek/windows-ext-ignorer
===========================

Composer plugin to ignore pcntl/posix platform reqs on Windows

0.1.5(1mo ago)2816↑100%[1 issues](https://github.com/masgeek/windows-ext-ignorer/issues)[2 PRs](https://github.com/masgeek/windows-ext-ignorer/pulls)MITPHPPHP ^8.0CI passing

Since Mar 24Pushed 1w ago1 watchersCompare

[ Source](https://github.com/masgeek/windows-ext-ignorer)[ Packagist](https://packagist.org/packages/masgeek/windows-ext-ignorer)[ RSS](/packages/masgeek-windows-ext-ignorer/feed)WikiDiscussions develop Synced 3w ago

READMEChangelog (7)Dependencies (4)Versions (11)Used By (0)

Windows Extension Ignorer for Composer
======================================

[](#windows-extension-ignorer-for-composer)

A Composer plugin that automatically ignores platform requirements like `ext-pcntl` and `ext-posix` on Windows systems.

---

🚧 The Problem
-------------

[](#-the-problem)

Many PHP packages require extensions such as `ext-pcntl` and `ext-posix`—extensions that are **not available** on Windows. As a Windows developer, you're often forced to:

1. Add the `--ignore-platform-reqs` flag to every Composer command
2. Set up custom command aliases
3. Modify `composer.json` manually to workaround the missing extensions

---

✅ The Solution
--------------

[](#-the-solution)

This plugin **automatically** detects when you're on a Windows system and **spoofs** the required extensions for you—no flags, no aliases, no extra steps.

It works **out of the box** with sensible defaults (ignoring `ext-pcntl` and `ext-posix`), and you can also **customize** which extensions you want to ignore via `composer.json`!

---

⚠️ Production Environment Disclaimer
------------------------------------

[](#️-production-environment-disclaimer)

> **Important:**
> This plugin is designed for **development environments on Windows** only.
> It should **not** be used in production environments, staging servers, or CI pipelines that require accurate platform checks.
>
> Ignoring required PHP extensions may cause runtime errors or unexpected behavior in your application. Always ensure your production environment meets the actual extension requirements of your packages.

---

⚙️ Installation
---------------

[](#️-installation)

It’s recommended to install the plugin as a **development dependency**, since it’s only useful in development environments:

```
composer require --dev masgeek/windows-ext-ignorer
```

---

🚀 Usage
-------

[](#-usage)

Once installed, the plugin **just works** on Windows.

When running any Composer command:

1. The plugin detects that you're on Windows
2. It automatically **injects** the specified extensions into Composer’s platform config
3. Composer proceeds without showing errors about missing extensions

---

🔧 Customizing Ignored Extensions
--------------------------------

[](#-customizing-ignored-extensions)

By default, the plugin injects these extensions into Composer’s `platform` config:

- `ext-pcntl`: `1.0.0`
- `ext-posix`: `1.0.0`

If you want to ignore additional (or different) extensions, you can specify them in your `composer.json` file under the `extra` section.

### Example `composer.json` Configuration:

[](#example-composerjson-configuration)

```
{
  "extra": {
    "ignored-extensions": {
      "ext-pcntl": "1.0.0",
      "ext-posix": "1.0.0",
      "ext-sockets": "1.0.0"
    }
  }
}
```

You can specify **any** extensions that are not supported or available in your Windows environment.

---

🖥️ Verbose Output
-----------------

[](#️-verbose-output)

To see the plugin in action, run Composer with the `-v` or `-vvv` flag:

```
composer require some/package -vvv
```

Example output:

```
➡️  Running Composer Command: require
🔧 Found ignored-extensions in composer.json: {"ext-pcntl":"1.0.0","ext-posix":"1.0.0","ext-sockets":"1.0.0"}
🛠️  Ignoring missing platform requirement: ext-pcntl=1.0.0
🛠️  Ignoring missing platform requirement: ext-posix=1.0.0
🛠️  Ignoring missing platform requirement: ext-sockets=1.0.0
✅ Platform config updated to spoof missing extensions.

```

---

⚙️ How It Works
---------------

[](#️-how-it-works)

1. Subscribes to Composer’s `pre-command-run` event
2. Detects if the OS is Windows
3. If true, it merges default and `composer.json` configured ignored extensions
4. It updates Composer’s `platform` config at runtime
5. After Composer runs, the overrides are cleared (no changes are persisted to your files)

---

❓ FAQ
-----

[](#-faq)

**Q:** Will this modify my `composer.json`?
**A:** No. It temporarily adjusts Composer’s internal configuration and does **not** write to your `composer.json` file.

**Q:** Can I use this on Linux or Mac?
**A:** No. The plugin only activates on Windows (`PHP_OS_FAMILY === 'Windows'`). On other operating systems, it does nothing.

---

📝 License
---------

[](#-license)

MIT License
Author: Sammy Barasa

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance86

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~106 days

Total

7

Last Release

34d ago

PHP version history (2 changes)0.0.1PHP ^7.2 || ^8.0

0.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7697b801e0b866d1e274ac0e73cb0f09772e5a851bc50ae1bc0e74355e27c2e9?d=identicon)[masgeek](/maintainers/masgeek)

---

Top Contributors

[![masgeek](https://avatars.githubusercontent.com/u/6058175?v=4)](https://github.com/masgeek "masgeek (36 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (8 commits)")

### Embed Badge

![Health badge](/badges/masgeek-windows-ext-ignorer/health.svg)

```
[![Health](https://phpackages.com/badges/masgeek-windows-ext-ignorer/health.svg)](https://phpackages.com/packages/masgeek-windows-ext-ignorer)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74694.9M938](/packages/symfony-runtime)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k40.0M2.6k](/packages/ergebnis-composer-normalize)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M526](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.0M193](/packages/drupal-core-project-message)[sandersander/composer-link

Adds ability to link local packages for development with composer

94441.4k](/packages/sandersander-composer-link)[phpro/grumphp-shim

GrumPHP Phar distribution

284.6M333](/packages/phpro-grumphp-shim)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
