Pseudo-extension methods in PHP

This page summarizes the projects mentioned and recommended in the original post on /r/PHP

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • aphiria

    A simple, extensible REST API framework for PHP

  • I wanted to pick the community's brain on a feature I've been toying with that would add something very similar to extension methods with a trait (similar to Laravel's Macroable trait, but with the added ability to define them on interfaces). For those who aren't familiar with extension methods, they're syntactic sugar for helper methods, and are commonly used to extend functionality for classes/interfaces you do not "own". Since PHP doesn't support them natively, though, you'd need to "own" the class/interface and use a trait to support them. I wrote a PR for such functionality (and provided some methods for a few classes in my framework), but am somewhat on the fence as to how useful this library would be. On the one hand, I could provide common extension methods for things like collections (think LINQ in C#), but on the other it feels hacky because it requires concrete classes to use a trait to support them, which feels like a break in abstraction.

  • PhpFriendClasses

  • You can inject the trait during autoloading, I do something similar in one little project (which is not really intended to be used) here: https://github.com/RikudouSage/PhpFriendClasses.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Any recommended light weigh u-MVC for single app/limited users' app.

    2 projects | /r/PHP | 13 Mar 2022
  • Symfony vs Laravel: Choosing The Right PHP Framework

    1 project | /r/laravel | 2 Feb 2022
  • Laravel Origins: The Documentary

    1 project | /r/PHP | 28 Jan 2022
  • Building One of the Fastest PHP Routers

    1 project | /r/PHP | 22 Jan 2021
  • Aphiria My New Rest Api Framework For Php

    1 project | /r/PHP | 21 Dec 2020