ziadoz / awesome-php

A curated list of amazingly awesome PHP libraries, resources and shiny things.
Do What The F*ck You Want To Public License
30.83k stars 5.06k forks source link

Add PHP-code generator (based on OAS) for Laravel framework #982

Closed arthurkushman closed 2 months ago

arthurkushman commented 5 years ago

Why this repo/lib should be added?

Qualities, code-coverage and other props:

Build Status Scrutinizer Code Quality Total Downloads Latest Stable Version Code Intelligence Status codecov License: MIT

As you can see project is highly maintained and is relatively fresh/new.

There are a few competitors in code-gen area for php, but they more about just a Laravel or Laravel+json-api, there is no OpenApi support (in one of them only Swagger supported) and not all features of json-api provided (e.g.: support for extended format, errors etc).

But the main idea is that it generates many things automatically:

and even regenerates it-self with history look-back, roll-back, merge etc

Thank u

donis commented 5 years ago

It's missing the first two:

and you're the author so it's just self promotion. Did you read CONTRIBUTING.md?

arthurkushman commented 5 years ago

I've read, otherwise I wouln't know about the last 2 rules ) This is strange - U don't want to post new projects with > 140 stars, then what is the options > 1K stars? Downloads on packagist? There are few API libs either. What should programmers do?

donis commented 5 years ago

If you read contribution guide - you probably saw that it should follow all 4 rules, not just a few of them. I get that you're excited about your new work. Let it mature, have people use it, contribute to it, talk about it in the community and then let someone else add it to this list instead of self-promoting it.

andreasschroth commented 5 years ago

@donis But how can a new project become more popular if all those lists / magazines / etc. deny adding / reporting about it when it doesn't have a huge user base already? I can see many projects on the list like e.g. https://github.com/php-mock/php-mock with not that many stars. And pretty sure at the time it has been added it had even less than 100 stars.

Then there are other projects not being maintained anymore, but still on the Awesome PHP list, e.g. https://github.com/FriendsOfPHP/Sami . Is that awesome? A project that even says in its readme that it's not maintained anymore? Better remove those dead projects and add new ones, even if they're not that popular yet.

Moreover, I don't agree in regards to who opens the PR. Does it really matter if the person opening the PR here is the project lead / maintainer / whatever or "just" a regular user? Imo, no. Either the project is considered interesting / worthwhile to be added here or not. It shouldn't matter who opens a PR.

arthurkushman commented 5 years ago

@donis But how can a new project become more popular if all those lists / magazines / etc. deny adding / reporting about it when it doesn't have a huge user base already? I can see many projects on the list like e.g. https://github.com/php-mock/php-mock with not that many stars. And pretty sure at the time it has been added it had even less than 100 stars.

Then there are other projects not being maintained anymore, but still on the Awesome PHP list, e.g. https://github.com/FriendsOfPHP/Sami . Is that awesome? A project that even says in its readme that it's not maintained anymore? Better remove those dead projects and add new ones, even if they're not that popular yet.

Moreover, I don't agree in regards to who opens the PR. Does it really matter if the person opening the PR here is the project lead / maintainer / whatever or "just" a regular user? Imo, no. Either the project is considered interesting / worthwhile to be added here or not. It shouldn't matter who opens a PR.

Here I see concrete logical conclusions - with an examples. Even awesome-go project accepts libs with much less stars (though Go community is quite tough), but this list is definitely outdated, thus it should either be changed or gone.

donis commented 5 years ago

@donis But how can a new project become more popular if all those lists / magazines / etc. deny adding / reporting about it when it doesn't have a huge user base already? I can see many projects on the list like e.g. https://github.com/php-mock/php-mock with not that many stars. And pretty sure at the time it has been added it had even less than 100 stars.

I'm sorry but imo stars don't reflect real usage. Let me do a research for you. According to packagist it has around 1mln downloads and around 2k daily installs. This proposed one has 20. When php-mock was added it had around 130 daily installs, when it was merged and added to the list - it had ~350 daily installs. My understanding - it was being used more by community and became awesome. Maybe it's not anymore, but that's a different topic.

Then there are other projects not being maintained anymore, but still on the Awesome PHP list, e.g. https://github.com/FriendsOfPHP/Sami . Is that awesome? A project that even says in its readme that it's not maintained anymore? Better remove those dead projects and add new ones, even if they're not that popular yet.

Agree with you there, those outdated packages should be removed. Not sure if there are PRs for that.

Moreover, I don't agree in regards to who opens the PR. Does it really matter if the person opening the PR here is the project lead / maintainer / whatever or "just" a regular user? Imo, no. Either the project is considered interesting / worthwhile to be added here or not. It shouldn't matter who opens a PR.

I agree and disagree at the same time. Yes, anyone should open a PR regardless if it's the author or a user. But the authors of packages should also understand, that if they wrote something, it doesn't mean it's awesome from the beginning. Self-plugging is biased, subjective, especially for very fresh and new packages. If a package is added by people who use this in production and are not related to the author - I think it's much trustworthy that it solves their problem and is more awesome. I might be very wrong here, but I try to look at this list objectively.

Even awesome-go project accepts libs with much less stars (though Go community is quite tough), but this list is definitely outdated, thus it should either be changed or gone.

Stars are arbitrary and don't necessarily reflect real-life usage.

For me, personally, new package != awesome package. Maybe libhunt is a place to add all new packages, also - packagist is a good place to find new packages. A project will become popular if it solves peoples problems. This particular package is very Laravel oriented, maybe Laravel community is a good start (is there awesome-laravel?). Talking about it in user groups, writting an article, helping someone else, not your company, to solve a similar problem. It feels that new authors submitting here expect fame and glory from the beginning 😃 They also forget that not everything can make this list, otherwise it would only be a copy of packagist. If it helps people, it will be 100% added in this or some other awesome list in due time.

My expectation from this list, as a user (I'm not a maintainer), to see real-world proven packages that might help me solve a problem I have. Yes, I'm aware it's not maintained properly, but this discussion partially answers my question why it's not maintained properly - it's hard to explain to fresh authors why their package is not yet awesome.

arthurkushman commented 5 years ago

Finally, we came to a conclusion that Downloads on packagist? is the main property for awesome-php, because fraction of installations shows accurate need of lib.

donis commented 5 years ago

@arthurkushman that's one way to look at it yes

andreasschroth commented 5 years ago

@donis But how can a new project become more popular if all those lists / magazines / etc. deny adding / reporting about it when it doesn't have a huge user base already? I can see many projects on the list like e.g. https://github.com/php-mock/php-mock with not that many stars. And pretty sure at the time it has been added it had even less than 100 stars.

I'm sorry but imo stars don't reflect real usage. Let me do a research for you. According to packagist it has around 1mln downloads and around 2k daily installs. This proposed one has 20. When php-mock was added it had around 130 daily installs, when it was merged and added to the list - it had ~350 daily installs. My understanding - it was being used more by community and became awesome. Maybe it's not anymore, but that's a different topic.

Then there are other projects not being maintained anymore, but still on the Awesome PHP list, e.g. https://github.com/FriendsOfPHP/Sami . Is that awesome? A project that even says in its readme that it's not maintained anymore? Better remove those dead projects and add new ones, even if they're not that popular yet.

Agree with you there, those outdated packages should be removed. Not sure if there are PRs for that.

Moreover, I don't agree in regards to who opens the PR. Does it really matter if the person opening the PR here is the project lead / maintainer / whatever or "just" a regular user? Imo, no. Either the project is considered interesting / worthwhile to be added here or not. It shouldn't matter who opens a PR.

I agree and disagree at the same time. Yes, anyone should open a PR regardless if it's the author or a user. But the authors of packages should also understand, that if they wrote something, it doesn't mean it's awesome from the beginning. Self-plugging is biased, subjective, especially for very fresh and new packages. If a package is added by people who use this in production and are not related to the author - I think it's much trustworthy that it solves their problem and is more awesome. I might be very wrong here, but I try to look at this list objectively.

Even awesome-go project accepts libs with much less stars (though Go community is quite tough), but this list is definitely outdated, thus it should either be changed or gone.

Stars are arbitrary and don't necessarily reflect real-life usage.

For me, personally, new package != awesome package. Maybe libhunt is a place to add all new packages, also - packagist is a good place to find new packages. A project will become popular if it solves peoples problems. This particular package is very Laravel oriented, maybe Laravel community is a good start (is there awesome-laravel?). Talking about it in user groups, writting an article, helping someone else, not your company, to solve a similar problem. It feels that new authors submitting here expect fame and glory from the beginning 😃 They also forget that not everything can make this list, otherwise it would only be a copy of packagist. If it helps people, it will be 100% added in this or some other awesome list in due time.

My expectation from this list, as a user (I'm not a maintainer), to see real-world proven packages that might help me solve a problem I have. Yes, I'm aware it's not maintained properly, but this discussion partially answers my question why it's not maintained properly - it's hard to explain to fresh authors why their package is not yet awesome.

I'll make it short: I agree with your answers. 😄

Still I think it would be better to be more welcoming to new PRs / contributions and just decide on a case per case basis. Another good idea might really be to have some "minimum hard criteria" in place like minimum time amount the project must be around (e.g. at least 6 months to see if it's a one-time thing or properly maintained and thus reliable) or as you mentioned Composer installs. But then those criteria should be defined, specified and clearly written down for everyone.

arthurkushman commented 5 years ago

Found a good example.

Must haves for Packages, Starter Projects, Codebases etc. 300+ stars on GitHub. Use PSR-4 autoloader. Packages must be listed on Packagist. Packages must have also had 10,000 downloads. Tests! Utilize Travis-CI or similar CI tools to automatically check coding standards and run tests.

arthurkushman commented 5 years ago

Hi, it would be great if You add this repo to the list, we reached 10,000 downloads yesterday.

arthurkushman commented 4 years ago

Please explain what is the reason to merge e.g. this: https://github.com/laminas-api-tools/api-tools-skeleton 10 days ago with: Installs: 1 666 Stars: 16 and not this library with 217 stars and almost 20K downloads?!

What's going on @donis, @ziadoz?

ziadoz commented 4 years ago

Laminas API Tools is the successor to APIgility, a popular Zend Framework package: https://packagist.org/packages/zfcampus/zf-apigility https://framework.zend.com/blog/2020-01-24-laminas-launch

If you spot a package on the list that's no longer maintained like FriendsOfPHP/Sami, why not open a PR to remove it? I don't have time to monitor every package on the list.

Please stop nudging this PR. I'll take a look when I get a chance. Thanks.

dereuromark commented 2 months ago

Based on https://github.com/SoliDry/api-generator/releases it seems now not maintained anymore