PHPackages                             rdx/laravelcollective-annotations - 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. rdx/laravelcollective-annotations

ActiveLibrary[API Development](/categories/api)

rdx/laravelcollective-annotations
=================================

Route Annotations for The Laravel Framework.

9.3(1mo ago)210.2k↑143.8%3MITPHPPHP ^8.2CI passing

Since Feb 4Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rudiedirkx/laravelcollective-annotations)[ Packagist](https://packagist.org/packages/rdx/laravelcollective-annotations)[ RSS](/packages/rdx-laravelcollective-annotations/feed)WikiDiscussions 9.0-fork Synced 1mo ago

READMEChangelogDependencies (18)Versions (60)Used By (0)

**This is a `laravelcollective/annotations` drop-in replacement**

To use this package instead of `laravelcollective/annotations` as a perfect drop-in replacement, do this in your project:

1. `composer require rdx/laravelcollective-annotations`
2. if your project explicitly required `annotations`: `composer remove laravelcollective/annotations`

This will install `rdx/laravelcollective-annotations` and pretend it IS `laravelcollective/annotations`, and all other packages will believe `laravelcollective/annotations` is installed, because Composer is awesome.

UPGRADE to 9.0 (PHP Attributes instead of `doctrine/annotations`)
-----------------------------------------------------------------

[](#upgrade-to-90-php-attributes-instead-of-doctrineannotations)

1. Download and set up `rector/rector`, see config below.
2. Add rule `Collective\Annotations\Rector\AnnotationsToAttributesRector` to Rector set.
3. Run Rector **with debug enabled**, see command below.
4. Manually fix skipped conversions due to complicated annotation syntax, see complicated example below.
5. Run your cs fixer to import all FQCN, see `php-cs-fixer` rule below.
6. Remove `$useAttributes` from your `AnnotationsServiceProvider`, because that doesn't exist anymore.

### Example Rector config

[](#example-rector-config)

```
return RectorConfig::configure()
	->withPaths([
		__DIR__ . '/app/Http/Controllers',
	])
	->withRules([
		AnnotationsToAttributesRector::class,
	])
;
```

### Run Rector command

[](#run-rector-command)

```
vendor/bin/rector process -v --debug --no-diffs app/Http/
```

This will print all analyzed files, and potential errors, and might include `WARNING` lines for skipped methods, like:

```
  WARNING: getPhaseDownload contains unconverted {} properties

```

### Too complicated annotation

[](#too-complicated-annotation)

```
@Get("/some/{thing}/download.{ext}", as="thing.download", where={"ext"="json|pdf|xlsx"})

```

The path isn't a problem, nor the `as=`, but the `where=` contains another inner structure, and that won't be converted correctly, so they're broken now, so you have to fix those right after.

### php-cs-fixer rule

[](#php-cs-fixer-rule)

I assume you have `php-cs-fixer` set up. Add this rule **temporarily**:

```
[
	'fully_qualified_strict_types' => [
		'import_symbols' => true,
		'phpdoc_tags' => [],
	],
]
```

and run `fix` **only for the Controllers dir**:

```
vendor/bin/php-cs-fixer fix app/Http/Controllers/
```

This will convert all the Rector added FQCN to imports, but only those, only in the `Controllers` dir.

If `php-cs-fixer` skips files and complains about "errors reported during linting", the Rector rule isn't good enough, and something is broken:

```
Files that were not fixed due to errors reported during linting before fixing:
   1) /var/www/myproject/app/Http/Controllers/MyController.php

```

You'll have to fix those manually.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor3

3 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 ~78 days

Recently: every ~239 days

Total

53

Last Release

53d ago

Major Versions

v6.0.2 → v7.02020-04-07

v7.0 → v8.02020-09-22

6.0.x-dev → 7.0.x-dev2021-08-06

7.0.x-dev → v8.12021-11-04

8.3 → 9.12025-01-10

PHP version history (9 changes)v5.0.0PHP &gt;=5.4.0

v5.1.0PHP &gt;=5.5.9

v5.3.0PHP &gt;=5.6.4

v5.6PHP &gt;=7.1.3

v6.0PHP ^7.2

v8.0PHP ^7.3

v8.0.2PHP ^7.3|^8.0

v8.2PHP ^7.3 || ^8.0

9.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/78549c1dc5c83ec0201c9afc66762c6d5bbf770291b12bae5a7a65350f950dba?d=identicon)[rudiedirkx](/maintainers/rudiedirkx)

---

Top Contributors

[![loonytoons](https://avatars.githubusercontent.com/u/360935?v=4)](https://github.com/loonytoons "loonytoons (47 commits)")[![adamgoose](https://avatars.githubusercontent.com/u/611068?v=4)](https://github.com/adamgoose "adamgoose (38 commits)")[![tshafer](https://avatars.githubusercontent.com/u/299464?v=4)](https://github.com/tshafer "tshafer (25 commits)")[![ggg-mzkr](https://avatars.githubusercontent.com/u/22838387?v=4)](https://github.com/ggg-mzkr "ggg-mzkr (16 commits)")[![rudiedirkx](https://avatars.githubusercontent.com/u/168024?v=4)](https://github.com/rudiedirkx "rudiedirkx (15 commits)")[![tedslittlerobot](https://avatars.githubusercontent.com/u/1783459?v=4)](https://github.com/tedslittlerobot "tedslittlerobot (10 commits)")[![mlantz](https://avatars.githubusercontent.com/u/1065551?v=4)](https://github.com/mlantz "mlantz (10 commits)")[![somoza](https://avatars.githubusercontent.com/u/1144980?v=4)](https://github.com/somoza "somoza (6 commits)")[![alexfoo](https://avatars.githubusercontent.com/u/4512481?v=4)](https://github.com/alexfoo "alexfoo (5 commits)")[![vesper8](https://avatars.githubusercontent.com/u/816028?v=4)](https://github.com/vesper8 "vesper8 (3 commits)")[![drkwolf](https://avatars.githubusercontent.com/u/1324686?v=4)](https://github.com/drkwolf "drkwolf (3 commits)")[![mauroveron](https://avatars.githubusercontent.com/u/129478?v=4)](https://github.com/mauroveron "mauroveron (2 commits)")[![deriel](https://avatars.githubusercontent.com/u/442305?v=4)](https://github.com/deriel "deriel (2 commits)")[![Grummfy](https://avatars.githubusercontent.com/u/668804?v=4)](https://github.com/Grummfy "Grummfy (2 commits)")[![jpcaparas](https://avatars.githubusercontent.com/u/2406808?v=4)](https://github.com/jpcaparas "jpcaparas (1 commits)")[![fnzr](https://avatars.githubusercontent.com/u/5471818?v=4)](https://github.com/fnzr "fnzr (1 commits)")[![mrsimonbennett](https://avatars.githubusercontent.com/u/1471305?v=4)](https://github.com/mrsimonbennett "mrsimonbennett (1 commits)")[![rodrigolinsr](https://avatars.githubusercontent.com/u/6786644?v=4)](https://github.com/rodrigolinsr "rodrigolinsr (1 commits)")[![chrispecoraro](https://avatars.githubusercontent.com/u/307660?v=4)](https://github.com/chrispecoraro "chrispecoraro (1 commits)")[![ateliee](https://avatars.githubusercontent.com/u/4863358?v=4)](https://github.com/ateliee "ateliee (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rdx-laravelcollective-annotations/health.svg)

```
[![Health](https://phpackages.com/badges/rdx-laravelcollective-annotations/health.svg)](https://phpackages.com/packages/rdx-laravelcollective-annotations)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[saloonphp/laravel-plugin

The official Laravel plugin for Saloon

805.7M125](/packages/saloonphp-laravel-plugin)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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