swagger-php
Laravel
Our great sponsors
swagger-php | Laravel | |
---|---|---|
10 | 225 | |
4,952 | 31,453 | |
- | 1.3% | |
8.1 | 9.9 | |
7 days ago | 2 days ago | |
PHP | PHP | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
swagger-php
-
Workplaces for digital nomads: the API
Native PHP attributes allowed OpenAPI markup to be much more compact than in DocBlocks. The resulting openapi.yaml is created with swagger-php and used to test the API.
-
Pragmatic development
First, swagger-php generates openapi.yaml based on code attributes, and then the spectator checks API responses to match openapi specification. The popular L5-Swagger is redundant in this case, as it is based on the same swagger-php with the addition of Swagger UI.
-
Swagger/Open api integration in laravel
I do this except use https://github.com/zircote/swagger-php for writing the open api spec. I can enter the Spatie Data Object classes into the parameters, responses, and properties. Like op said though, it's a lot of comments and stuff to keep updated. Entirely using reflection (or reflection plus ability to manually specify certain extra things) like you're talking about sounds great.
-
OpenAPI Specification: The Complete Guide
wagger-php is a php swagger annotation and parsing library which generates interactive OpenAPI documentation for your RESTful API using doctrine annotations. - GitHub - zircote/swagger-php
-
Validate your PHP API tests against OpenAPI definitions – a Laravel example
The second one is L5 Swagger, a popular package bringing Swagger PHP and Swagger UI to Laravel. We actually don't need Swagger PHP here, as it uses Doctrine annotations to generate OpenAPI definitions and we're going to manually write our own instead. We do need Swagger UI, however, and the package conveniently adapts it to work with Laravel (the -W option is simply here to also update related dependencies, to avoid conflicts).
-
Dynamic class property with phpdoc included
It is possible that there is a library doing this already. I am not PHP coder so would like to avoid complex frameworks and stick with barebone solution doing only this Swagger/JSON stuff. For swagger, I decided to go with zircote/swagger-php. I would like my schema and model classes to have nice Swagger doc and at the same time I can use them to prepare objects to interact with the DB by loading/dumping from JSON.
-
Creating API documentation from php files?
Ah right, so you're building a (presumably REST) API and you want to generate docs for the endpoints from your code. Slightly different scenario to what I assumed. There are a couple of libraries to generate OpenAPI specs from source files, I think this is the main one https://github.com/zircote/swagger-php though FWIW I prefer to maintain my API specs separately from the code and use those to guide what I'm building, rather than 'tother way round.
I'm using this library to generate an open api 3 (swagger) yaml file. You add @OA markup to your doc blocks and then can have this generate a file or produce it on the fly. It's a bit sparse on documentation but is working really well with my MVC set up for a REST API I'm developing. https://github.com/zircote/swagger-php
Laravel
- Automatizando fluxos de trabalho com GitHub Actions
- Testando filas em projetos Laravel
-
PHP: check dates
It does not mean you should absolutely use it everywhere, but it can make sense for your case. Many frameworks, like Laravel use it to compose new projects.
-
An Internet of PHP
https://github.com/laravel/framework/blob/00894b89e42a9d707c...
Even Tinker is a few lines of code to extend PsySH and credit is barely given.
Taylor Otwell is a fiend for creating wrappers around solid open source libraries, using PHP magic and encouraging bad practices, all just to breed an ecosystem ultimately to land him a Lambo, fuelled by amazing open source foundations that have barely been contributed back to by him.
-
Laravel’s ForwardsCalls trait
This same system has been used in Laravel since version 4.0* albeit in the more PHP plain way, using call_user_func_array (Laravel Model Class).
- From Concept to Image: Exploring OpenAI Image Generation API with Laravel 10 and VueJS
-
Thoughts on proposed new "Thin Skeleton" in Laravel 11.x
laravel/framework: https://github.com/laravel/framework/pull/47309
-
Why is the Laravel Framework code not always optimized?
And as far as what your title states “not optimized” the answer to this is yes, the code is not optimized. In some cases there are minor optimizations that are bizarre, and in other places, PRs for optimization are closed. It’s a bit arbitrary, but c’est la vie.
For instance, I've always learned to separate into methods when things become complicated/unreadable. Sometimes I see code that has something like this (excuse me on my phone, but Ive seen this a couple of times): https://github.com/laravel/framework/commit/8692f67960cb33a598d46dbed3fd12df15eb4a3f
-
Laravel devs are slowly killing best practices
The framework itself runs tests in public. You can see that the workflow with waiting for the machines takes around 6 minutes, but the run on a single platform e.g. PHP 8.2 - prefer-stable takes 2.5-3.5 minutes only. The tests themselves? Thousands in a minute:
What are some alternatives?
nuxt3-supabase - Nuxt 3 module and composables for Supabase.
octane - Supercharge your Laravel application's performance.
L5-Swagger - OpenApi or Swagger integration to Laravel
fingerprintjs - Browser fingerprinting library. Accuracy of this version is 40-60%, accuracy of the commercial Fingerprint Identification is 99.5%. V4 of this library is BSL licensed.
laminas-code - Extensions to the PHP Reflection API, static code scanning, and code generation
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project
Nextcloud - ☁️ Nextcloud server, a safe home for all your data
ProxiTok - Open source alternative frontend for TikTok made using PHP
apiDoc - RESTful web API Documentation Generator.
treblle-laravel - The official Treblle SDK for Laravel. Seamlessly integrate Treblle to manage communication with your dashboard, send errors, and secure sensitive data.
Brick\Money - A money and currency library for PHP
Laravel-Pagebuilder - A drag and drop pagebuilder to manage pages in any Laravel project