For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HUMAN DashboardHUMAN WebsiteRequest a Demo
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
  • General
    • About Enforcers
    • Support first-party HUMAN calls
    • Troubleshoot Enforcer configurations
  • Enforcer frameworks
    • Akamai ESI
    • Apache - C Module
    • ASP.NET
    • Callout Enforcer
    • Envoy Proxy
    • F5 BIGIP
    • Fastly JavaScript Compute@Edge
    • Google Cloud Platform (GCP) Callout Enforcer
    • Kong Plugin
    • NGINX - C Module
    • NGINX - LUA Module
    • PHP
      • What's New
      • Upgrading
      • Configuration Options
      • Advanced Configuration
      • Contributing
    • Python
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
On this page
  • Fork/Clone
  • Code/Run
  • Test
  • Pull Request
Enforcer frameworksPHP

Contributing

Was this page helpful?
Previous

Python

Next
Built with

The following steps are welcome when contributing to our project.

Fork/Clone

First and foremost, create a fork of the repository, and clone it locally. Create a branch on your fork, preferably using a descriptive branch name.

Code/Run

Help improve our project by implementing missing features, adding capabilities, or fixing bugs.

To run the code, simply follow the steps in the installation guide. Grab the keys from the HUMAN Portal and try refreshing your page several times continuously. If no default behaviors have been overridden, you should see the HUMAN block page. Solve the captcha and start fresh again.

Feel free to check out the example app, to have a feel of the project.

Test

Tests for this project are written using PHPUnit.

Don’t forget to test. The project relies heavily on tests, thus ensuring each user has the same experience, and no new features break the code. Before you create any pull request, make sure your project has passed all tests, and if any new features require it, write your own.

To run any of the tests in the available suite, first open the bootstrap.php.dist file, and change the values according to the in-file instructions. Then, rename the bootstrap.php.dist to bootstrap.php.

Finally, run the phpunit tests/PerimeterxCookieValidatorTest command to run all tests, or phpunit <testName> to execute a specific test (e.g. phpunit PerimeterxCookieTest)

To run coverage tests, run phpunit --coverage-html tests/coverage. This will create a directory tests/coverage with an html coverage for inspection.

Pull Request

After you have completed this process, create a pull request to the upstream repository. Please provide a complete and thorough description, explaining the changes. Remember, this code has to be read by our maintainers, so keep it simple, smart, and accurate.