PHPackages                             composer-fallback/php-80.symfony-polyfill - 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. composer-fallback/php-80.symfony-polyfill

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

composer-fallback/php-80.symfony-polyfill
=========================================

Satisfy "php 8.0" with packages provided by user, or fallback to "symfony-polyfill".

1.1(5y ago)024MITPHP &gt;=8.0

Since Oct 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/composer-fallback/php-80.symfony-polyfill)[ Packagist](https://packagist.org/packages/composer-fallback/php-80.symfony-polyfill)[ RSS](/packages/composer-fallback-php-80symfony-polyfill/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Fallback for `php 8.0` using `symfony-polyfill`
===============================================

[](#fallback-for-php-80-using-symfony-polyfill)

Provides a metapackage for library needing `php 8.0`that fallback to a default implementation when user does not meet the initial requirements.

Usage
-----

[](#usage)

```
composer require "composer-fallback/php-80.symfony-polyfill:*"
```

Composer will, by preference:

- check if user has `php>=8.0`
- otherwise, fallbacks to `symfony/polyfill-php80`

How does it works
-----------------

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

This package contains 2 versions:

1. The highest [1.1](https://github.com/composer-fallback/php-80.symfony-polyfill/blob/1.1/composer.json) needs `php: >=8.0`.
2. The lowest [1.0](https://github.com/composer-fallback/php-80.symfony-polyfill/blob/1.0/composer.json) triggers install of `symfony/polyfill-php80`.

Composer will choose this highest version when user has the right version of php. Otherwise, composer will choose the lowest version and in that case will download the following packages: `symfony/polyfill-php80`.

What problem does it solve?
---------------------------

[](#what-problem-does-it-solve)

You are maintaining a library that need an implementation of `php 8.0`, but you don't want requiring a specific implementation.

ie. you need function defined in `php 8.0`, but polyfill exists and would be enough.

When end users requires you library with the following code

```
{
    "name": "end-user/app",
    "require": {
      "acme/lib": "^1.0"
    }
}
```

They probably ends with such error

```
composer up

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for acme/lib ^1.0 -> satisfiable by acme/lib[1.0].
    - acme/lib 1.0 requires php >=8.0 -> no matching package found.
```

You can ask user to install a random package, it works, but the DX is very bad, and confusing at first.

By using `composer-fallback/php-80.symfony-polyfill`, users will provide the native implementation or fallback to your default choice

### Example of user that meet the preferred requirements

[](#example-of-user-that-meet-the-preferred-requirements)

```
{
    "name": "end-user/app",
    "require": {
        "acme/lib": "^1.0",
        "third-party/provide-implementation": "^1.0"
    }
}
```

```
composer up
...
Package operations: 2 installs, 0 updates, 0 removals
  - Installing acme/lib (1.0)
  - Installing composer-fallback/php-80.symfony-polyfill (1.1)
```

### Example of user that fallback to your recommendations

[](#example-of-user-that-fallback-to-your-recommendations)

```
{
    "name": "end-user/app",
    "require": {
        "acme/lib": "^1.0"
    }
}
```

```
composer up
...
Package operations: 3 installs, 0 updates, 0 removals
  - Installing acme/lib (1.0)
  - Installing composer-fallback/php-80.symfony-polyfill (1.0)
  - Installing symfony/polyfill-php80 (1.0)
```

Contributing
------------

[](#contributing)

This repository is automatically generated. If you want contributing and submitting an issue or a Pull Request, please use [composer-fallback/generator](https://github.com/composer-fallback/generator).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

2049d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3f32527fbf2e4214a29d86a441db4d130535437cf1911a6b0e6ef13db1c84aa?d=identicon)[jderusse](/maintainers/jderusse)

---

Top Contributors

[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (3 commits)")

---

Tags

composerfallbackdefaultphp 8.0

### Embed Badge

![Health badge](/badges/composer-fallback-php-80symfony-polyfill/health.svg)

```
[![Health](https://phpackages.com/badges/composer-fallback-php-80symfony-polyfill/health.svg)](https://phpackages.com/packages/composer-fallback-php-80symfony-polyfill)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[composer/metadata-minifier

Small utility library that handles metadata minification and expansion.

181115.0M13](/packages/composer-metadata-minifier)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6076.7M435](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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