spatie

A clean API for working with PHP attributes

67
1
100% credibility
Found Feb 23, 2026 at 38 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
PHP
AI Summary

A library that provides an easy way to find and read special metadata tags attached to different parts of PHP code.

How It Works

1
🔍 Discover the tag reader

You stumble upon a handy tool that makes checking special tags on your code pieces a breeze instead of a hassle.

2
📦 Bring it into your project

You easily add the tool to your own project so it's ready to use.

3
Spot a tag instantly

With one simple line, you check if a code part has a specific tag and get it right away if it does.

4
🔎 Hunt for tags all over

You search across every corner of your code structure to find all matching tags in moments.

5
📋 Grab tag details

You pull out the info from those tags to make your project smarter and more organized.

🎉 Effortless code magic

Your project now reads and uses tags smoothly, keeping everything clean and simple.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 38 to 67 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is php-attribute-reader?

This PHP package delivers a clean API architecture for reading PHP 8+ attributes, replacing verbose reflection loops with simple static calls. Developers get methods to fetch a single attribute, check existence, or scan methods, properties, constants, and parameters across a class—returning instantiated objects or null without exceptions. It's a php attribute reader that streamlines clean API design for metadata like routes or validators.

Why is it gaining traction?

It stands out with a clean apis hook: one-liners for targeted reads (e.g., on a method or parameter) and bulk scans everywhere in a class, matching child attributes automatically. From Spatie, known for clean github repositories and tools, it skips boilerplate while handling edge cases gracefully. Early adopters value the static fluency over raw reflection's mess.

Who should use this?

Backend PHP devs building frameworks or apps with attributes for routing, validation, or serialization. Ideal for Laravel users annotating controllers, or API builders needing quick metadata pulls without custom wrappers. Skip if you're not on PHP 8+ or prefer manual reflection.

Verdict

Promising for clean api steam in attribute-heavy code, but at 10 stars and 1.0% credibility score, it's immature—docs are basic, tests exist via GitHub Actions, but wait for more adoption unless you're early. Try for prototypes; production needs battle-testing.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.