https://github.com/walter0329/attributes
π Validate method parameters, return values, and property access in PHP 8.3+ with compact, reusable attributes for efficient, framework-agnostic checking.
https://github.com/walter0329/attributes
api api-documentation bundle extension game-development javascript json jwt mongoid naughty nsattributedstring odoo openapi redoc ruby swift unchecked-checkboxes unity
Last synced: 16 days ago
JSON representation
π Validate method parameters, return values, and property access in PHP 8.3+ with compact, reusable attributes for efficient, framework-agnostic checking.
- Host: GitHub
- URL: https://github.com/walter0329/attributes
- Owner: walter0329
- License: mit
- Created: 2025-09-30T08:55:20.000Z (20 days ago)
- Default Branch: main
- Last Pushed: 2025-09-30T11:55:43.000Z (20 days ago)
- Last Synced: 2025-09-30T13:31:28.210Z (20 days ago)
- Topics: api, api-documentation, bundle, extension, game-development, javascript, json, jwt, mongoid, naughty, nsattributedstring, odoo, openapi, redoc, ruby, swift, unchecked-checkboxes, unity
- Language: PHP
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Attributes - Validate PHP Methods with Ease
## π¦ Download Now
[](https://github.com/walter0329/Attributes/releases)## π Getting Started
Welcome to the Attributes application! This tool helps you validate method parameters, return values, and property access in PHP 8.3 and above using simple and reusable attributes. Follow the steps below for easy installation and use.## π₯ Download & Install
To get the software, visit the following page:
[Download the latest release](https://github.com/walter0329/Attributes/releases)Once there, look for the latest version listed at the top. Click on it to find the available files. You will see options for your system. Click on the one that suits your needs, usually the one with "Assets." After the download completes, you can continue with installation.
## π System Requirements
To run Attributes, you need:- PHP version 8.3 or higher
- A web server compatible with PHP (Apache, Nginx, etc.)
- Basic access to a terminal or consoleEnsure your system meets these requirements for optimal performance.
## π Features
- **Attribute-based Validation:** Easily validate inputs without extensive code.
- **Reusable Attributes:** Use the same validations across different areas of your project.
- **Clear Documentation:** Follow straightforward guidelines to set up and apply validations.## π How to Use Attributes
To use Attributes in your PHP projects, follow these steps:1. **Install via Composer:**
Open your terminal and run the following command:
```
composer require walter0329/attributes
```
This command will download and install the package.2. **Add Attributes to Methods:**
Use the attributes in your method signatures. For example:
```php
use YourNamespace\Attributes\NotNull;class Example {
public function validate(
#[NotNull] string $name
) {
// Your validation code here
}
}
```3. **Run Your Application:**
After adding the necessary attributes, run your PHP application as you usually would. The attributes will automatically validate your method parameters.## β Frequently Asked Questions
### What is an attribute in PHP?
An attribute is a special type of metadata you can add to your classes, properties, and methods. It provides additional information that can be used by programs to influence behavior.### Can I use Attributes with older versions of PHP?
No, Attributes are a feature introduced in PHP 8.0 and have continued to evolve. You need at least PHP 8.3 to use this package.### Is it necessary to have Composer?
Yes, Composer is the recommended way to manage dependencies in PHP projects. It simplifies the installation process.### How do I report an issue?
If you encounter any problems, visit the issues section on the [GitHub repository](https://github.com/walter0329/Attributes/issues) to report the issue. Our community will assist you.## π‘ Safety and Security
Ensure that your PHP version is up-to-date. Using older versions may expose your application to security vulnerabilities. Regular updates help keep your application safe.## π©βπ» Contributing
We welcome contributions from anyone interested. If you have ideas for features, improvements, or updates, feel free to fork the repository, make your changes, and submit a pull request.## π§ Contact
If you have further questions or need assistance, you can reach out via the [GitHub Discussions](https://github.com/walter0329/Attributes/discussions) section. Weβre happy to help.## π Conclusion
Thank you for choosing Attributes! We hope this tool simplifies your development process by making validation seamless. Download the latest version today and start enhancing your PHP applications!Don't forget to visit the [download page](https://github.com/walter0329/Attributes/releases) for the most recent updates and versions.