Download the PHP package elliotjreed/haveibeenpwned without Composer

On this page you can find all versions of the php package elliotjreed/haveibeenpwned. 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 haveibeenpwned

Have I Been Pwned PHP

PHP 8.1 or above is required. For PHP 7.4 to 8.0 please use verison 1.2.x.

Usage

A Have I Been Pwned API key is required. This can be obtained on a monthly subscription basis, or a one-off monthly access charge.

https://haveibeenpwned.com/API/v3#

Installation

To install this package via Composer:

Count of breaches by email address

Return a count of all breaches for a specified email address (int).

Breaches by email address

Return details of all breaches for a specified email address (ElliotJReed\HaveIBeenPwned\Entity\Breach[]).

Breach names by email address

Return the names of the breaches for a specified email address (string[]);

Count of exposed passwords by password

Return a count of exposed passwords for a specified password (int).

Note: This API call DOES NOT send the actual password to the Have I Been Pwned API, see: https://haveibeenpwned.com/API/v3#PwnedPasswords.

Pastes by email address

Return details of a specified email address appearing on "pastes" online (\ElliotJReed\HaveIBeenPwned\Builder\Paste[]).

Breach sources

Return all breach sources recorded by Have I Been Pwned (\ElliotJReed\HaveIBeenPwned\Entity\Breach[]).

Breach source by name

Return breach details by source name (\ElliotJReed\HaveIBeenPwned\Entity\Breach).

Breach source by domain

Return breach details by domain name (\ElliotJReed\HaveIBeenPwned\Entity\Breach).

Data classes

Return the data classes used by Have I Been Pwned (string[]).

Development

PHP 7.4 or 8.0 and Composer is expected to be installed.

Installing Composer

For instructions on how to install Composer visit getcomposer.org.

Installing

After cloning this repository, change into the newly created directory and run:

or if you have installed Composer locally in your current directory:

This will install all dependencies needed for the project.

Henceforth, the rest of this README will assume composer is installed globally (ie. if you are using composer.phar you will need to use composer.phar instead of composer in your terminal / command-line).

Running the Tests

Unit tests

Unit testing in this project is via PHPUnit.

All unit tests can be run by executing:

Debugging

To have PHPUnit stop and report on the first failing test encountered, run:

Static analysis

Static analysis tools can point to potential "weak spots" in your code, and can be useful in identifying unexpected side-effects.

Psalm is configured at it's highest levels, meaning false positives are quite likely.

All static analysis tests can be run by executing:

Code formatting

A standard for code style can be important when working in teams, as it means that less time is spent by developers processing what they are reading (as everything will be consistent).

Code format checking (via PHP Code Sniffer) can be run by executing:

Running everything

All of the tests can be run by executing:

Outdated dependencies

Checking for outdated Composer dependencies can be performed by executing:

Validating Composer configuration

Checking that the composer.json is valid can be performed by executing:

Running via GNU Make

If GNU Make is installed, you can replace the above composer command prefixes with make.

All of the tests can be run by executing:

Running the tests on a Continuous Integration platform (eg. Travis)

To run all the tests and report code coverage in Clover XML format (which many CI platforms can read, including Travis CI), add the following to your CI config (eg. .travis.yml):

Coding standards

PHP coding standards are quite strict and are defined in ruleset.xml.

The rules are PSR-2 and PSR-12 standards with additionally defined rules.

The code formatting checks can be run by executing:

To automatically fix any issues where possible, run:

Built With

License

This project is licensed under the MIT License - see the LICENCE.md file for details.


All versions of haveibeenpwned with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.0
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 elliotjreed/haveibeenpwned contains the following files

Loading the files please wait ....