PHPackages                             maxbeckers/google-actions-php - 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. [API Development](/categories/api)
4. /
5. maxbeckers/google-actions-php

ActiveLibrary[API Development](/categories/api)

maxbeckers/google-actions-php
=============================

This library is a helper for google actions with php.

0.1.0(8y ago)22364[4 issues](https://github.com/maxbeckers/google-actions-php/issues)MITPHPPHP &gt;=7.0CI failing

Since Aug 7Pushed 1y ago5 watchersCompare

[ Source](https://github.com/maxbeckers/google-actions-php)[ Packagist](https://packagist.org/packages/maxbeckers/google-actions-php)[ RSS](/packages/maxbeckers-google-actions-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Google actions php library
==========================

[](#google-actions-php-library)

This library is a helper for google actions with php.

Install via composer
--------------------

[](#install-via-composer)

Require the package with composer:

```
composer require maxbeckers/google-actions-php

```

Usage
-----

[](#usage)

Handle the request:

- map request data to request object
- validate request
- handle request data
- create response
- send response

### Map request data to request object

[](#map-request-data-to-request-object)

Map needed request headers and request body to `Request`.

```
use MaxBeckers\GoogleActions\Request\Request;
...
$requestBody  = file_get_contents('php://input');
$googleRequest = Request::fromGoogleRequest($requestBody);
```

### Validate request

[](#validate-request)

The `RequestValidator` will handle the google request validation.

```
use MaxBeckers\GoogleActions\Validation\RequestValidator;
...
$validator = new RequestValidator();
$validator->validate($googleRequest);
```

### Register request handlers

[](#register-request-handlers)

For different requests it's helpful to create different RequestHandlers.

```
use MaxBeckers\GoogleActions\RequestHandler\RequestHandlerRegistry;
...
$requestHandlerRegistry = new RequestHandlerRegistry();
$requestHandlerRegistry->addHandler($myRequestHandler);
```

### Use registry to handle request

[](#use-registry-to-handle-request)

```
use MaxBeckers\GoogleActions\RequestHandler\RequestHandlerRegistry;
...
$requestHandler = $requestHandlerRegistry->getSupportingHandler($googleRequest);
$response       = $requestHandler->handleRequest($googleRequest);
```

### Render response

[](#render-response)

```
header('Content-Type: application/json');
echo json_encode($response);
exit();
```

### Create a new request handler

[](#create-a-new-request-handler)

The new request handler must extend `AbstractRequestHandler`. First implement the abstract `supportsRequest`-method.

```
public function supportsRequest(Request $request): bool
{
    return true; // check request data
}
```

Then implement the `handleRequest`-method. For simple responses there is a `ResponseHelper`.

```
use MaxBeckers\GoogleActions\Helper\ResponseHelper;
...
/** @var ResponseHelper */
private $responseHelper;
...
public function handleRequest(Request $request): Response
{
    // todo set needed response data
    return $responseHelper->respond('Success :)');
}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3249d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11738128?v=4)[Max Beckers](/maintainers/maxbeckers)[@maxbeckers](https://github.com/maxbeckers)

---

Top Contributors

[![maxbeckers](https://avatars.githubusercontent.com/u/11738128?v=4)](https://github.com/maxbeckers "maxbeckers (11 commits)")

---

Tags

actionsgooglegoogle-actionsgoogle-actions-phpgoogle-homegoogle-home-phphomephpphp7phpgoogleactionshome

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maxbeckers-google-actions-php/health.svg)

```
[![Health](https://phpackages.com/badges/maxbeckers-google-actions-php/health.svg)](https://phpackages.com/packages/maxbeckers-google-actions-php)
```

###  Alternatives

[google-gemini-php/client

Gemini API is a supercharged PHP API client that allows you to interact with the Gemini API

4101.3M34](/packages/google-gemini-php-client)[jeroendesloovere/geolocation-php-api

This Geolocation PHP class connects to Google Maps API to find latitude/longitude or address.

76321.1k4](/packages/jeroendesloovere-geolocation-php-api)[x-fran/g-trends

Google Trends API for PHP

11756.5k](/packages/x-fran-g-trends)[gemini-api-php/laravel

Gemini API client for Laravel

8916.9k](/packages/gemini-api-php-laravel)[aurawindsurfing/google-translate

Free Laravel package for Paid Google Translate REST API with your own API key

1120.1k1](/packages/aurawindsurfing-google-translate)

PHPackages © 2026

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