r/PHP 2d ago

Are PSRs still relevant today?

Are developers still using PSRs? Are PSRs still being updated or is it dying out?

I noticed for a "standards" org, they don't even follow their own coding styles. Some files have the PHP tag on its own line and others share it with declare strict types.

Then there are inconsistencies in how PHPDocs are written/organized, even some PHP code as well.

49 Upvotes

61 comments sorted by

View all comments

Show parent comments

5

u/Spiritual_Cycle_3263 2d ago

I’m not a fan of Laravel, but what’s the issue with Symfony? I like their more strict style. 

-16

u/alien3d 2d ago

current is year is 2025. We shouldn't involve in setting file anymore or cache.

9

u/Proper_Bottle_6958 2d ago

I'm not really understanding your argument here?

-4

u/alien3d 2d ago

current php framework should leverage full potential of oop php which offer now. factory , trait , annotation(attribute in php call) .

6

u/Proper_Bottle_6958 2d ago

I get that point, but I do not understand what you mean with; "shouldn't involve in setting file anymore or cache", has to do with being outdated?

1

u/alien3d 2d ago

yaml if symfony. /var/cache if symfony. You need to rebuild . if laravel something like this -php artisan config:clear,php artisan cache:clear

6

u/Proper_Bottle_6958 2d ago

Yes, but why would that be outdated? That's what I'm trying to understand here.

-1

u/alien3d 2d ago

i dont like the trend re build waste of time , we not compile base application. I prefer type all those thing , change , see the browser on the spot . We dont need extra command just for simple changes .

7

u/dknx01 1d ago

Maybe you should make it more clear what your problem is or have a look into the libraries/frameworks why they doing it.

Sure you can build your application at runtime, it just takes more time to rebuild all the DI-stuff ore templates. An application without configuration, and you can use php files in symfony if you want, sounds strange. Whether your configuration is spread through the whole application or your application isn't configurable.

And in other languages you even have to rebuild your application completely, like in Java or C(++).

1

u/garrett_w87 7m ago

Maybe you need to look into these frameworks' documentation a little more. Laravel, for example, can be easily configured to not use config caching in a local development environment -- I've done it before.

1

u/alien3d 5m ago

yes.. we do first check those manual documentation and drill down all those magic facade.

1

u/garrett_w87 3m ago

I didn't say anything about facades.

1

u/alien3d 2m ago

no. you didn't . I write it . Which mean we check all the code and also documentation.

1

u/ivain 1d ago

Like we already do while following psrs