syntaxseed, to Symfony
@syntaxseed@phpc.social avatar

Hey folks.

What's your thoughts on vs ? I'm looking for a PHP CMS that isn't WordPress based on a potential client's request. Prefer based so that's why these 2.

Mostly a brochure site with some normal CMS-y features (gallery, contact form, etc).

Bonus for ease of ongoing maintenance.

ramsey, to Symfony
@ramsey@phpc.social avatar

Why does 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)?

sarah, to php
@sarah@phpc.social avatar

Are you a 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.

Be a language developer.

Edent, to Symfony
@Edent@mastodon.social avatar

OK, I'm getting started with .
Can anyone recommend a beginner friendly tutorial?
The official docs jump from 0-100 pretty quickly.
Alternately, anyone able to do some individual tutoring on the basics of design?

I've already got my routing set up, twig templates, and basic DB access. I just need to know the most efficient way of setting up something more complex and deploying it.

Thanks!

brunty, to php
@brunty@brunty.social avatar

folks, what framework-agnostic tooling (as in not / / etc) are you using for running headless browser-based tests these days via something like ?

I'm looking at setting something up in on , I've tried Symfony Panther and it's been a shitshow of errors and not being able to get or running in Docker :/

syntaxseed, to Symfony
@syntaxseed@phpc.social avatar

So I have a User entity in a 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.

Bizarre.

blog, (edited ) to fediverse
@blog@shkspr.mobi avatar

A (tiny, incomplete, single user, write-only) ActivityPub server in PHP
https://shkspr.mobi/blog/2024/02/a-tiny-incomplete-single-user-write-only-activitypub-server-in-php/

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.

Why

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.

How

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.

What Works

  • Users can find the account.
  • Users can follow the account and receive updates.
  • Posts contain geotag metadata.
  • Posts contain a description of the place.
  • Posts contain an OSM link to the place.
  • Posts contain a custom message.
  • Posts autolink (sort of).
  • Posts can have an image attached to them.
  • Messages to the inbox are recorded (but not yet integrated).

ToDo

  • My account only has a few dozen followers, some of whom share the same sever. Even with cURL multi handle, it takes time to post to several servers.
  • It posts plain text. It doesn't autolink websites
  • Hashtags are linked when viewed remotely, but they don't go anywhere locally.
  • There's no language selection - it is hard-coded to English.
  • The outbox isn't paginated.
  • The UI looks crap - but it is only me using it.
  • There's only a basic front-page showing a map of all my check-ins.
  • Replies are logged, but there's no easy way to see them.
  • Doesn't show any metadata about the place being checked-in to. It could use the item's website (if any) or hashtags for the type of amenity it is.
  • No way to handle being unfollowed.
  • No way to remove servers which have died.
  • Probably lots more.

Other Resources

I found these resources helpful while creating this project:

What's Next?

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.

World domination?

Where

You can laugh at my code on GitHub.

You can look at my check-ins on a map.

You can follow my location on the Fediverse at @edent_location@location.edent.tel

https://shkspr.mobi/blog/2024/02/a-tiny-incomplete-single-user-write-only-activitypub-server-in-php/

hughstimson, to php

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?

Flyingmana, to php
@Flyingmana@phpc.social avatar

I need book recommendations for software related books to buy via company budget.

Something in the wider area of #php #symfony #webdevelopment #softwarearchitecture and more

And also further recommendations on how and where to spend remaining education budget 👀

Edent, to fediverse
@Edent@mastodon.social avatar

🆕 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…

👀 Read more: https://shkspr.mobi/blog/2024/02/a-tiny-incomplete-single-user-write-only-activitypub-server-in-php/

#ActivityPub #fediverse #mastodon #php #Symfony

art4, to php German
@art4@youthweb.social avatar

I'm planning to add return types to interface methods in a library. Because of 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 annotation? Or should I use the ReturnTypeWillChange attribute?

bastian, to Symfony German
@bastian@neos.social avatar

On my way to a user group meetup with my branded Vespa.. I hope, they'll let me in ;)

Skoop, to Symfony
@Skoop@phpc.social avatar

This morning gave me yet another idea for a new project to build.

I hate this.

But it could be a fun project to go and experiment with Turbo and Symfony UX

alessandrolai, to Symfony Italian
@alessandrolai@phpc.social avatar

This Friday I'll be speaking at @phpday 2024, this time about my long story with queues and, in particular, about Messenger.

See you there?

wouterj, to Symfony
@wouterj@phpc.social avatar
SuitedUpDev, to php
@SuitedUpDev@mastodon.online avatar

Found this in a job offering at a startup.

Looking for a #PHP developer that has experience with #Laravel, #Zend #Symfony AND #yii

Honey, you aren't looking for just one person. You are looking for an entire development team.

#Recruiters #developers #dev

kaiserkiwi, to webdev German
@kaiserkiwi@corteximplant.com avatar

Ich bin auf Arbeit ja nicht nur Full Stack #Webdev, sondern auch Teamlead. Eine meiner Aufgaben (die ich mir selbst gegeben habe) ist, meinem Team teils die Fundamentals von Dingen zu erklären.

Einfach weil heutzutage (Durch Bootcamps, Tutorials und sonst was) viele in den Beruf gehen und direkt mit #Sass, #Symfony / #Laravel, #Vue / #React etc. anfangen. Ohne #CSS, #PHP, #HTML und #JavaScript im Kern richtig kennenzulernen.

Und jedes Mal, wenn ich eine solche Session hinter mir habe, fühle ich mich einfach gut. Meist egal wie es mir vorher ging, danach ist einfach eine positive Grundstimmung in mir.

Wenn ich irgendwann mal keine Lust mehr habe, selbst beruflich als Webdev zu arbeiten, werde ich definitiv versuchen irgendwo als Lehrkraft reinzukommen. Ich kann mir echt vorstellen, dass das etwas ist, mit dem ich glücklich und alt werden könnte.

#Coding

outofcontrol, to Laravel
@outofcontrol@phpc.social avatar

While deleting all of my replies on X, I stumbled across this Google Trend from Dec 2013, comparing and . Attached are the original from 2013 and the same trend from today. Originally posted by maxsurguy on X

August 2023 Trend showing the dominance of Laravel.

alessandrolai, to Symfony Italian
@alessandrolai@phpc.social avatar

Ok, the first full trial run of my talk about messenger went to 44 minutes and I have a 50 minutes slot...

It's going so well it's suspicious 😅

simonrjones, to php
@simonrjones@mastodon.social avatar

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/

d33pjs, to web

"Quick" Question: If you would build a new , what would currently be "the best" development language and/or () for that?

"Best" as in reliable, , easy to get personal and future proof?

Would it be with or or or something completely different?

chris, to php
@chris@rtsn.dev avatar

Do I know anyone in the world who can give insight into why Symfony moved away from bundles?

itsjoshbruce, (edited ) to php
@itsjoshbruce@phpc.social avatar

Is Symfony Console the way to go for creating custom CLI tools using PHP?

I think someone pulled something together from Laravel components.

I'd like to find something excessively lightweight - like CLI is all it does with few or no dependencies.

Curious about what folks are using.

I'll probably start with Symfony as I've built what I'm planning once before.

#PHP #Laravel #Symfony #CLI

symfonystation, to mastodon
@symfonystation@phpc.social avatar

Testing WordPress to Mastodon This is a test to see if this website’s posts will cross post to my Mastodon account. https://newsletter.mobileatom.net/ #Mastodon #PHP #Symfony #Drupalhttps://newsletter.mobileatom.net/testing-wordpress-to-mastodon/

ramsey, to php
@ramsey@phpc.social avatar

Is there anything like symfony/asset-mapper (and symfony/asset) that folks can recommend using with a non-Symfony 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 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? 😁

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • tacticalgear
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • vwfavf
  • everett
  • kavyap
  • megavids
  • osvaldo12
  • modclub
  • GTA5RPClips
  • ethstaker
  • InstantRegret
  • cisconetworking
  • cubers
  • ngwrru68w68
  • tester
  • normalnudes
  • Leos
  • anitta
  • JUstTest
  • All magazines