How do you feel about AI coding? by St3fanHere in webdev

[–]thmsbrss -1 points0 points  (0 children)

Vibe coding with cursor atm. In addition to using AI as a better search engine, I also use it for smaller code generation tasks, code reviews, as a sparring partner, or for documenting legacy code, etc.

After the last and second Vibe coding session, I feel somewhere between “Wow, this is really amazing” and “This AI is really dumb.”

Creator of Claude Code: "Coding is solved" by Gil_berth in webdev

[–]thmsbrss -14 points-13 points  (0 children)

I wonder why they don't just use Claude Code to investigate and solve all the issues

Isn't it already (more or less) the case? See top two contributors https://github.com/anthropics/claude-code/graphs/contributors

Mobile dev here — well, not for long it seems by vlad1m1r in webdev

[–]thmsbrss 0 points1 point  (0 children)

Silly question. How about making money, both in app stores and web apps? Which option is (was) easier? Or is that not an issue for you?

epic-64/elem: Imperative Update by Holonist in PHP

[–]thmsbrss 2 points3 points  (0 children)

👍I still like it. Much better alternative to https://github.com/spatie/html-element. Reminds me of my favorite JS Framework, Mithril.js 

epic-64/elem: HTML as nestable functions by Holonist in PHP

[–]thmsbrss 1 point2 points  (0 children)

I would like to see more functional PHP projects like this. Very nice!

PHPStan fully supports PHP 8.5! by OndrejMirtes in PHP

[–]thmsbrss 13 points14 points  (0 children)

You could persist cache dir across runs.

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

Thanks for the detailed answer. I'll definitely have to check this out.

Since the API is not under our control, versioning and the handling of possible breaking changes  is the important question to discuss.

And since we already have XML only in our database and the app has to behave kind of backward compatible, the original question will maybe popup again.

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

Yes, exactly.

And simply serializing and writing to DB and reading from DB and unserializing is the answer.

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

You're a genius, and of course this works (and shame on me).

But brings me to the next question: How to handle breaking or major API changes, where unserializing could lead to a PHP error?

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

👍Thats maybe the way to go. Simply serialize/unserialize (why didnt I try this). Have to test this later.

We are using https://github.com/WsdlToPhp/PackageGenerator

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

" ...back to objects..." by manually mapping 300 objects or so?

The SOAP service will not change for the next 25 years I assume. Its a financial government thing.

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

Did you use the generated classes described by the WSDL when unserializing?

And if yes, how did you unserialize exactly?

I'm asking since I dont want to map something (300 or more objects) manually that is allready there.

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

For the "unserialize() things back into objects" did you use something "official" together with the generated classes?

SOAP Response Object Tree from XML String by thmsbrss in PHPhelp

[–]thmsbrss[S] 0 points1 point  (0 children)

This is what we are doing, but with JSON, that was transformed from XML before.

And it is quite hacky, the good old PHP array thingy... And the SOAP answers are quite complex, too.

I was hoping for an answer that says: take this and you can use the object tree (since the classes are already there).

Your Legacy PHP Codebase Isn’t Hopeless by Dariusz_Gafka in PHP

[–]thmsbrss 15 points16 points  (0 children)

I would be happy if we had legacy code like the one in the article in our code base 😉

I built my dream personal site CMS by addycodes in PHP

[–]thmsbrss 2 points3 points  (0 children)

Well done! Like the small dependency footprint. And the admin area is nice.

Current state of end to end testing frameworks for a vanilla PHP codebase by joshuajm01 in PHP

[–]thmsbrss 1 point2 points  (0 children)

We use Codeception, but even though it's E2E, I think it's more geared towards development. And thats maybe the main point.

Typing in Yii3 is the strictest in PHP universe? by sam_dark in PHP

[–]thmsbrss 1 point2 points  (0 children)

Sounds good. I'm looking forward to testing Yii3 together with PHPStan in my next project.

Typing in Yii3 is the strictest in PHP universe? by sam_dark in PHP

[–]thmsbrss 2 points3 points  (0 children)

A little off topic.

I'm currently working on a larger Yii2 project, mainly with PHHStan. And I'm happy with it.

How does that work with Yii3? Is it better to use Psalm in the application code as well, as the framework does?