Download the PHP package roave/no-floaters without Composer

On this page you can find all versions of the php package roave/no-floaters. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package no-floaters

roave/no-floaters

Latest Stable Version

This library is a PHPStan plugin that disallows:

The reason for this restriction is that rounding errors coming from floating point arithmetic operations are not acceptable in certain business logic scenario, such as dealing with money, evaluating exam results, rocket science, etc.

An example of such problems can be seen with the following typical example:

This can mean no trouble at all, or a lot of trouble, depending on how many numbers you are running through your system, so it is advisable to avoid float for domains where rounding can potentially lead to trouble.

float is still perfectly acceptable in many programming contexts, and this ruleset should only be applied where it is critical not to introduce rounding errors.

Installation

Configuration

In your phpstan.neon configuration, add following section:

Optionally, you can configure the library to disallow any float-producing expression at all, by adding following to your phpstan.neon:

If the above is enabled, given the following example-file.php contents:

You should get something like following:

roave/no-floaters for enterprise

Available as part of the Tidelift Subscription.

The maintainers of roave/no-floaters and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more..

If you need help with setting up this library in your project, you can contact us at [email protected] for consulting/support.


All versions of no-floaters with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0
nikic/php-parser Version ^4.17.1
phpstan/phpstan Version ^1.10.47
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package roave/no-floaters contains the following files

Loading the files please wait ....