PHPackages                             webstack/api-platform-global-search-bundle - 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. webstack/api-platform-global-search-bundle

ActiveSymfony-bundle[API Development](/categories/api)

webstack/api-platform-global-search-bundle
==========================================

Bundle to add uuid filter, or search and global search support for Doctrine ORM to API Platform

v3.1.2(3y ago)242MITPHPPHP ^8.1CI failing

Since Dec 2Pushed 3y ago3 watchersCompare

[ Source](https://github.com/webstacknl/ApiPlatformGlobalSearchBundle)[ Packagist](https://packagist.org/packages/webstack/api-platform-global-search-bundle)[ Docs](https://webstack.nl)[ RSS](/packages/webstack-api-platform-global-search-bundle/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (10)Dependencies (12)Versions (21)Used By (0)

API Platform extensions bundle
==============================

[](#api-platform-extensions-bundle)

TODO: what is API Platform and how do we extend it?

Installing
----------

[](#installing)

composer require webstack/api-platform-extensions-bundle:\[version\]

Configuring
-----------

[](#configuring)

After installing the plugin you will need to add some config files to you're project:

- config/packages/webstack\_api\_platform\_extensions.yaml

```
webstack_api_platform_extensions:
  identifier_class: App\Entity\%UserEntity%
```

- config/routes/api\_platform.yaml

```
app_extra:
  resource: '@WebstackApiPlatformExtensionsBundle/Resources/config/routing/routing.xml'
  prefix: /api
```

Filters
-------

[](#filters)

These filters are added by this bundle:

### GlobalSearchFilter (`api_platform.doctrine.orm.global_search_filter`)

[](#globalsearchfilter-api_platformdoctrineormglobal_search_filter)

Searches (recursively?) through the specified columns (or all of them, scary stuff) of an entity on whose endpoint it's activated.

Configure the filter as a service (`config/services/api_platform/search/[$domain/]$entity.yaml`):

```
services:
  api.resource.region.global.search_filter:
    parent: 'api_platform.doctrine.orm.global_search_filter'
    arguments: [ {
      'name': 'partial',
      'depot.description': 'partial',
    } ]
    tags: [ { name: 'api_platform.filter', id: 'api.region.global_search_filter' } ]
    autowire: false
    autoconfigure: false
```

And apply it to the appropriate resource:

```
App\Entity\Transport\Region:
  attributes:
    route_prefix: /transport
    filters:
      - 'api.region.global_search_filter'
```

Now when a user calls the API with `?_global_search=foo`, the query will become something like this:

```
SELECT
    r.*
FROM
    region r
LEFT JOIN
    depot d
ON
    d.id = r.depot_id
WHERE
    r.name LIKE '%foo%'
    OR d.description LIKE '%foo%'
```

### AliasSearchFilter (`api_platform.doctrine.orm.alias_search_filter`)

[](#aliassearchfilter-api_platformdoctrineormalias_search_filter)

Works as the regular search filter, but lets you rename or alias (nested) properties in the URL. Pass the properties and aliases as separate DI arguments:

```
services:
  api.some_entity.deeply_nested_prop_filter:
    parent: 'api_platform.doctrine.orm.alias_search_filter'
    arguments:
      $properties:
        deeply.nested.property: 'exact'
      $aliases:
        myProp: 'deeply.nested.property'
    tags: [ { name: 'api_platform.filter' } ]
```

And apply it to the appropriate resource:

```
App\Entity\SomeEntity:
  attributes:
    route_prefix: /some
    filters:
      - 'api.some_entity.deeply_nested_prop_filter'
```

Now to hit this filter, the URL using the default SearchFilter would be:

```
/some?deeply.nested.property=foo

```

This alias search filter adds a new query string parameter that it'll map to the configured alias:

```
/some?myProp=foo

```

### OrSearchFilter (`api_platform.doctrine.orm.or_search_filter`)

[](#orsearchfilter-api_platformdoctrineormor_search_filter)

TODO

### UuidFilter (`api_platform.doctrine.orm.uuid_filter`)

[](#uuidfilter-api_platformdoctrineormuuid_filter)

For looking up nested entities by their UUID, because API Platform doesn't support that (see [api-platform/core#3774](https://github.com/api-platform/core/pull/3774), was reverted because it broke date search).

Service configuration:

```
services:
  api.resource.transport_position.vehicle_filter:
    parent: 'api_platform.doctrine.orm.uuid_filter'
    arguments: [ {
      vehicle.id: 'exact'
    } ]
    tags: [ { name: 'api_platform.filter', id: 'api.transport_position.vehicle_filter' } ]
    autowire: false
    autoconfigure: false
    public: false
```

API Platform entity configuration:

```
App\Entity\Transport\Position:
  collectionOperations:
    get:
      filters:
        - 'api.transport_position.vehicle_filter'
```

Now the API caller can filter using `GET .../transport_positions?vehicle.id=$uuid`.

Routes
------

[](#routes)

The bundle introduces the following route(s):

### `/me`

[](#me)

Get info about the caller. Includes a SwaggerDecorator to generate OpenAPI documentation about this endpoint.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~62 days

Recently: every ~3 days

Total

20

Last Release

1167d ago

Major Versions

v1.2.0 → v2.0.02022-03-22

v1.3.0 → v2.1.02022-10-03

v2.1.1 → v3.0.02023-02-20

v2.2.1 → v3.1.02023-02-21

PHP version history (4 changes)v1.0.0PHP &gt;=7.2.0

v1.1.4PHP &gt;=7.3.0

v1.2.0PHP ^7.4|^8.0

v3.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639342?v=4)[webstack](/maintainers/webstack)[@webstack](https://github.com/webstack)

---

Top Contributors

[![rvmourik](https://avatars.githubusercontent.com/u/6427451?v=4)](https://github.com/rvmourik "rvmourik (15 commits)")[![mwansinck](https://avatars.githubusercontent.com/u/11411864?v=4)](https://github.com/mwansinck "mwansinck (9 commits)")[![CodeCasterNL](https://avatars.githubusercontent.com/u/1726333?v=4)](https://github.com/CodeCasterNL "CodeCasterNL (7 commits)")[![darylholling](https://avatars.githubusercontent.com/u/26867068?v=4)](https://github.com/darylholling "darylholling (5 commits)")[![Jurgo](https://avatars.githubusercontent.com/u/1120293?v=4)](https://github.com/Jurgo "Jurgo (3 commits)")[![jvergers](https://avatars.githubusercontent.com/u/32851353?v=4)](https://github.com/jvergers "jvergers (2 commits)")[![nickdebest](https://avatars.githubusercontent.com/u/1550283?v=4)](https://github.com/nickdebest "nickdebest (2 commits)")[![tienvx](https://avatars.githubusercontent.com/u/3327643?v=4)](https://github.com/tienvx "tienvx (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webstack-api-platform-global-search-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/webstack-api-platform-global-search-bundle/health.svg)](https://phpackages.com/packages/webstack-api-platform-global-search-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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