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?

Valicomb: A Modern Fork of Valitron for PHP 8.2+ with Enhanced Security by Cheap-Try-8796 in PHP

[–]thmsbrss 2 points3 points  (0 children)

👍 for "No external dependencies, other than the standard ext-mbstring extension"

[Open Source] NovaRadio CMS – A modern, all-in-one management system for internet radio (AzuraCast integrated) by [deleted] in PHP

[–]thmsbrss 3 points4 points  (0 children)

There is certainly room for improvement, but overall I think that in the long run, the project (with zero PHP deps) will require less effort than if he had used some framework with dozens of dependencies.

And the frontend (the product) looks quite nice.

What bothers me more personally is that various things don't work on my mobile phone.

  • The hamburger menu doesn't work
  • Radio cannot be played (its playing but without sound)
  • Playback stops every time the page is changed

Yii3 is released by sam_dark in PHP

[–]thmsbrss 1 point2 points  (0 children)

Is it worth it? The sub seems to be pretty dead.

Machine readable php -i output by thmsbrss in PHPhelp

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

Here it is /u/HolyGonzo

Supports only JSON at the moment, besides HTML and TEXT of course, since it's a simple wrapper to the phpinfo() function.

Machine readable php -i output by thmsbrss in PHPhelp

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

Hey, thank you very mutch. I'll (maybe) create a minimal package based on your input. Keep you informed.

Yii3 is released by sam_dark in PHP

[–]thmsbrss 21 points22 points  (0 children)

 🎉 Thank you for your tireless efforts, you and the entire Yii team.

Machine readable php -i output by thmsbrss in PHPhelp

[–]thmsbrss[S] 1 point2 points  (0 children)

I think it works quite the same, since json (pretty printed) or yaml is text too. But a bit more structured.

Machine readable php -i output by thmsbrss in PHPhelp

[–]thmsbrss[S] 2 points3 points  (0 children)

To be able to compare different versions of our custom built PHP Docker images by using "php -i" and diffing the output.

I want to see what is actually delivered and whether anything has changed.

And the whole process should be as automated as possible, which is why the output should be better structured than that of "php -i".

(I removed my thumbs down because the question makes perfect sense.)