Why does #Symfony define what appears to be a “real” value for APP_SECRET in the .env file that’s committed to your repository, and then, right above it, there’s a comment that says (in all caps):
“DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.”
Where’s the documentation that explains what APP_SECRET is used for? Why doesn't it put this value in .env.local (ignored by .gitignore)?
Are you a #php developer or a WordPress/Laravel/Symfony/Drupal developer?
Understanding the underlying language will make you more effective and considerably more flexible/employable.
Understanding the language helps you read the framework code and make sense of complex things. It lets you adopt new tech. And it empowers you to switch from one project to another without fear.
#PHP folks, what framework-agnostic tooling (as in not #Symfony / #Laravel / #Laminas etc) are you using for running headless browser-based tests these days via something like #PHPUnit?
I'm looking at setting something up in #Docker on #macOS, I've tried Symfony Panther and it's been a shitshow of errors and not being able to get #Chrome or #Firefox running in Docker :/
I've written an ActivityPub server which . That's all it does. It won't record favourites or reposts. There's no support for following other accounts or receiving replies. It cannot delete or update posts nor can it verify signatures. It doesn't have a database or any storage beyond flat files.
But it will happily send messages and allow itself to be followed.
This shows that it is totally possible to broadcast fully-featured ActivityPub messages to the Fediverse with minimal coding skills and modest resources.
I wanted to create a service a bit like FourSquare. For this, I needed an ActivityPub server which allows posting geotagged locations to the Fediverse.
I didn't want to install a fully-featured server with lots of complex parts. So I (foolishly) decided to write my own. I had a lot of trouble with HTTP Signatures. Because they are cursed and I cannot read documentation. But mostly the cursed thing.
Creating a minimum viable Mastodon instance can be done with half a dozen static files. That gets you an account that people can see. They can't follow it or receive any posts though.
I wanted to use PHP to build an interactive server. PHP is supported everywhere and is simple to deploy. Luckily, Robb Knight has written an excellent tutorial, so I ripped off his code and rewrote it for Symfony.
The structure is relatively straightforward.
/.well-known/webfinger is a static file which gives information about where to find details of the account.
/[username] is a static file which has the user's metadata, public key, and links to avatar images.
/following and /followers are also static files which say how many users are being followed / are following.
/posts/[GUID] a directory with JSON files saved to disk - each ones contains the published ActivityPub note.
/photos/ is a directory with any uploaded media in it.
/outbox is a list of all the posts which have been published.
/inbox is an external API endpoint. An ActivityPub server sends it a follow request, the endpoint then POSTs a cryptographically signed Accept message to the follower's inbox. The follower's inbox address is saved to disk.
/logs is a listing of all the messages received by the inbox.
/new is a password protected page which lets you write a message. This is then sent to...
/send is an internal API endpoint. It constructs an ActivityPub note, with attached location metadata, and POSTs it to each follower's inbox with a cryptographic signature.
That's it.
The front-end grabs my phone's geolocation and shows the 25 nearest places within 100 metres. One click and the page posts to the /send endpoint which then publishes a message saying I'm checked in. It is also possible to attach to the post a short message and a single photo with alt text.
There's no database. Posts are saved as JSON documents. Images are uploaded to a directory. It is single-user, so there is no account management.
I've raised an issue on Mastodon to see if they can support showing locations in posts. Hopefully, one day, they'll allow adding locations and then I can shut this down.
The code needs tidying up - it is very much a scratch-my-own-itch development. Probably riddled with bugs and security holes.
So I have a User entity in a #Symfony project with an int type $id property. And something deep in the framework is trying to assign a string value to the $id which is throwing critical type errors.
WTH. Am I supposed to make User::$id a string|int type? No thanks. It's in the framework so out of my hands. Some token unserializing step.
Due to some questionable life choices, I need to use PHP/MySQL for the back end of a simple web app. In particular for user authentication.
I'm coming from Django (which I like) and .NET MVC (which is OK I guess). Which PHP framework will I vibe with the best? I see words like "Laravel" and "Symfony". Are these any good?
🆕 blog! “A (tiny, incomplete, single user, write-only) ActivityPub server in PHP”
I've written an ActivityPub server which only allows you to post messages to your followers. That's all it does. It won't record favourites or reposts. There's no support for following other accounts or receiving replies. It cannot delete o…
I'm planning to add return types to interface methods in a #PHP library. Because of #BC I plan to do this in a next major release.
What's the best practice to document this return type change now, so the users of the library can add the return types now instead of waiting for the major release? Is there a recommended #phpdoc annotation? Or should I use the ReturnTypeWillChange attribute?
Anyone use Lando for local development environments? Am thinking of switching to it for our team. We work on a mix of WordPress, Laravel & Symfony projects. https://lando.dev/
"Quick" Question: If you would build a new #web#application, what would currently be "the best" development language and/or #framework (#webframework) for that?
"Best" as in reliable, #secure, easy to get personal and future proof?
While deleting all of my replies on X, I stumbled across this Google Trend from Dec 2013, comparing #Laravel#CodeIgniter#CakePHP and #Symfony. Attached are the original from 2013 and the same trend from today. Originally posted by maxsurguy on X
Kbin is a federated reddit alternative written in PHP ( #symfony framework). It is an early stage of development yet undergoing explosive growth lately.
Is there anything like symfony/asset-mapper (and symfony/asset) that folks can recommend using with a non-Symfony #PHP app?
I can probably figure out how to use these by themselves, but I'd prefer a general, stand-alone library/tool, rather than attempting to shoehorn a #Symfony package into a non-Symfony app.
That is, unless someone can point me to a tutorial that shows how someone else has already done this? 😁