Download the PHP package rdx/laravelcollective-annotations without Composer
On this page you can find all versions of the php package rdx/laravelcollective-annotations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rdx/laravelcollective-annotations
More information about rdx/laravelcollective-annotations
Files in rdx/laravelcollective-annotations
Package laravelcollective-annotations
Short Description Route Annotations for The Laravel Framework.
License MIT
Informations about the package laravelcollective-annotations
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:
composer require rdx/laravelcollective-annotations- 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)
- Download and set up
rector/rector, see config below. - Add rule
Collective\Annotations\Rector\AnnotationsToAttributesRectorto Rector set. - Run Rector with debug enabled, see command below.
- Manually fix skipped conversions due to complicated annotation syntax, see complicated example below.
- Run your cs fixer to import all FQCN, see
php-cs-fixerrule below. - Remove
$useAttributesfrom yourAnnotationsServiceProvider, because that doesn't exist anymore.
Example Rector config
Run Rector command
This will print all analyzed files, and potential errors, and might include WARNING lines for
skipped methods, like:
Too complicated annotation
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
I assume you have php-cs-fixer set up. Add this rule temporarily:
and run fix only for the Controllers dir:
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:
You'll have to fix those manually.
All versions of laravelcollective-annotations with dependencies
illuminate/console Version ^13.0 || ^12.0 || ^11.0
illuminate/filesystem Version ^13.0 || ^12.0 || ^11.0
illuminate/support Version ^13.0 || ^12.0 || ^11.0