Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Minor README.md updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayesh committed Jun 6, 2020
1 parent e030ddd commit ea5da5b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# PHP 7.3 is_countable polyfill
A trivial but working polyfill for PHP 7.3 is_countable function.
A trivial yet functional polyfill for PHP 7.3 `is_countable()` function.

## Installation
You can use composer to install this polyfill:

`composer require ayesh/is_countable-polyfill`

This will install the polyfill with all the contents, including tests. If
you would like to install without these files while keeping only the core
polyfill, you can use:

`composer require ayesh/is_countable-polyfill --prefer-dist`

## Tests
PHPUnit is used as the test framework. Some of the tested variables are
directly taken from the [commit](https://github.com/php/php-src/pull/3026/commits/587fcc504f8ad2b07ac28c3335cd0fe3ac39b503) that added `is_countable` to PHP source.
Expand All @@ -37,3 +31,11 @@ PHP 7.3 comes with an `is_countable` function that helps to mitigate such
warnings by checking if the variable is countable first. For those who
don't have PHP 7.3 yet, this polyfill will add the same functionality in
user-land code.

**Can I remove this package when I upgrade to PHP 7.3 or later?**

Yes. If you require PHP 7.3 or later as the minimum supported PHP version, you do not need to use this package.
To remove it:

`composer remove ayesh/is_countable-polyfill`

0 comments on commit ea5da5b

Please sign in to comment.