Ported project to symfony, but now I need to work out the new way of deploying it ... symfony has a few differences that might be stumbling blocks. Anyone know of a good ansistrano+symfony guide, particularly with Apache as the server? And mod_php instead of phpfpm?

Muahaha, email MX records all ported to fastmail ... today's the day I hit the big red delete button for google workspace.

Hobby project framework port: nearly complete. All tests pass, and bugs found in the first round of manual testing have been addressed. Next up: digging into Ansible and similar to get it deployed.

Anyone know of a good Capistrano replacement? I'm considering Ansistrano, but open to suggestions.

Fixed it by splitting it into smaller tests. 257 of 257 passing! woo!

Show thread

And despite all my thinking that the test was failing due to the nasty internal wiring of the ported test class ... nope! The test was failing because the feature was broken, which is exactly when the test should fail. Excellent!

Show thread

(Technically the two failing tests are the same test, just different data provider values...)

Show thread

Apparently I added some tests as I went along, now at 253 passing out of 255

Show thread

I've been spending the summer porting a hobby project from a dead framework (Silex) to Symfony 5.4, and last night I got to the point where only 1 test (out of 255) is failing.

It's still a shambles, of course, and the reason for the test failure is internal to the integration test configuration, but aside from that: it's almost done! woo!

Now I just have to run through a bunch of manual testing to find edge cases & update/add tests accordingly.

Tests on hobby projects: Great idea.

Total tests: 244
Tests passing/ignored: 109
Tests failing: 135

That means I'm 45% done porting this hobby project. It's nice having tests. (Some are unit tests, some are functional / webtestcase tests)

Running psalm on a codebase ... 89% done (thousands of files) and it's been stuck on a single file for about ten minutes. Must be a monster file. And this is with 8 threads.

Note: When implementing "offsetGet", it is vitally important that your method should have a "return" statement.

Ask me how I know.

Well, so far porting to Symfony is going faster than rolling my own microframework, but it's not one iota less frustrating. And I'm anticipating many headaches down the road, due to the app being ported working in ways that are orthogonal to how SF likes to do things.

But it needs to be done. Otherwise the code can't be upgraded at all.

Gun violence and politics 

@grmpyprogrammer That must be why it's what their own politicians seem to want.


1. Remember to write tests

2. Tests will lie to you if you're not careful

3. Code can look correct yet still be silently wrong

4. Silently-wrong code can be live for months or years with no one noticing

5. Computers were a mistake. I need a sailboat and a long break from everything.

Show thread

Peak "how did this ever work" today in PHP land. I was debugging a method that was improperly returning an empty array. Dig into the code ... and found that it was hard-coded to do so.

But oh! Polymorphism meant a subclass had a non-empty-returning implementation.

Yet that was still improperly returning an empty array.

Ultimately, the very innermost method was returning an array with the wrong schema, which caused subsequent lookups to be blank.

A one-line fix got it working.

@saramg Yes, the skewering of that was particularly well-crafted, I felt.

@mwop @jerome @ramsey maybe - but to me, this looks like a test, not the actual code doing the work. It could be that http is the only one that is tested.

Show older
PHP Community on Mastodon

Open source. Open community. We are dedicated to building and enriching the PHP community.