Skip to content

Instantly share code, notes, and snippets.

@faffyman
Last active August 29, 2023 08:48
Show Gist options
  • Save faffyman/1e5cecaa094f8580e64b73f8d99e5329 to your computer and use it in GitHub Desktop.
Save faffyman/1e5cecaa094f8580e64b73f8d99e5329 to your computer and use it in GitHub Desktop.

Below is a list of useful libraries and tools for PHP centric web dev, started out as a shortend list based on Awesome PHP but has since grown with other libs I've found to be useful over the years.

You can should always go check Awesome PHP as well see what's been update or to find anything that isn't here.

A.I. Generative Artificial Intelligence

Document Management

Libraries and software for working with PDF files.

PDF

  • Dompdf - A HTML to PDF converter.
  • PHPPdf - A library for generating PDFs and images from XML.
  • Snappy - A PDF and image generation library.
  • WKHTMLToPDF - A tool to convert HTML to PDF.

Office

Libraries for working with office suite documents.

Powerpoint

  • PHPPowerPoint - A library for working with Microsoft PowerPoint Presentations.

MS Word

  • PHPWord - A library for working with Microsoft Word documents.

MS Excel

  • PHPSpreadsheet - A pure PHP library for reading and writing spreadsheet files (successor of PHPExcel)
  • CSV - A CSV data manipulation library by the php league.
  • Spatie Excel - flippin 5-***** excellent Excel library - composer install spatie/simple-excel

Image Manipulation

  • imagemagick command line based tool that should be instaleld on the server
  • imagick a nicer wrapper for imagemagick
  • intervention ***** really nice PHP library for image manipulation. http://image.intervention.io/
  • Image Optimizer - A library for optimizing images.
  • Glide - An on-demand image manipulation library.
  • Color Extractor - A library for extracting colours from images.
    • cWebP - unix command line tool to convert images to webp format - brew install cwebp

Build Tools and Task Runners

Package Managers (start with npm)

  • npm You'll likely need npm to npm install.. most of the above and below
  • yarn A Fast package manager that caches previousl installs.
  • bower yet anotehr package manager

DateTime

Testing

  • PHPSpec - A design by specification unit testing library.

  • Behat - A behaviour driven development (BDD) testing framework.

  • Codeception - A full stack testing framework.

  • PHPT - A test tool used by PHP itself.

  • PHPUnit - A unit testing framework.

  • DBUnit - A database testing library for PHPUnit.

  • Mockery - A mock object library for testing.

  • Prophecy - A highly opinionated mocking framework.

  • selenium - front end testing

  • cypress - ***** front end testing

  • Faker - A fake data generator library.

  • rig a command line tool for generating fake identities. brew install rig usage rig -[f|m] -c[num of Identities]
    e.g. rig -c 10 -f will generate 10 female identities

Performance

Load Testing

Performance - e.g. Page Load Times

HTTP

  • Buzz - Another HTTP client.
  • Guzzle - A comprehensive HTTP client.

Spider or Screenscrape

  • Embed - An information extractor from any web service or page.
  • Goutte - A simple web scraper.
  • PHP Spider - A configurable and extensible PHP web spider.

API Enablers

E-commerce

Libraries and applications for taking payments and building online e-commerce stores.

  • Money - A PHP implementation of Fowler's money pattern.
  • OmniPay - A framework agnostic multi-gateway payment processing library.
  • Payum - A payment abstraction library.
  • Shopware - Highly customizable e-commerce software
  • Swap - An exchange rates library.
  • Sylius - An open source e-commerce solution.

Email

Cookie Related

A List of Cookie controls, and better, cookieless alternatives that dont needa cookie popup

Cookie Tracker Controls

Cookie-Free / Cookieless

  • Matamo/Piwik - the cookie free ethical alternative to Google Ananlytics
  • Matamo Tag Manager - not guaranteed cookie-free, depends on the tags you inject.

Mapping

Map Tiles

  • Alternatives to Google Maps - since Google maps pricing has gotten quite $$$

  • MapTiler - Self host or Cloud Host

  • OpenStreetMap - Geo data set

  • OpenMapTiles - Map tile images only - still need to use a render engine such as OpenStreetMaps

Geolocation

Libraries for geocoding addresses and working with latitudes and longitudes.

  • GeoCoder - A geocoding library.

  • GeoJSON - A GeoJSON implementation.

  • GeoTools - A library of geo-related tools.

  • PHPGeo - A simple geo library.

  • DB-IP - an Creative Commons License IP Location Database. (used by piwik/matamo ananlytics)

Files

Libraries for file manipulation and MIME type detection.

  • CSV - A CSV data manipulation library by the php league

  • Spatie Excel - flippin 5-***** excellent Excel/CSV library composer install spatie/simple-excel

  • Flysystem - Another filesystem abstraction layer.

  • Gaufrette - A filesystem abstraction layer.

  • Hoa Mime - Another MIME detection library.

  • PHP FFmpeg - A wrapper for the FFmpeg video library.

  • UnifiedArchive - A unified reader and writer of compressed archives.

  • DropZone.js - A drag and drop file uploader

Logging

Libraries for generating and working with log files

  • Monolog - THE PSR-7 logger, look no further
    • [Graylog) - gelf

Realtime Databases

  • InfluxDB timeseries data visualisation
  • RethinkDB realtime streaming database push data to your webpage.

Multilingual - Translation

Service and Process Monitoring

  • Supervisord - monitor and retsrat scripts and services
  • Monit - Monitor, alert and restart process, network interfaces and more

Security

Libraries for generating secure random numbers, encrypting data and scanning for vulnerabilities.

Passwords.

Payment Gateways

  • Stripe - The official Stripe PHP library.
  • Realex Global Payments - 3D Scecure V2 - note to self - customer service gone seriously downhill since early days - just use stripe - it just works no hassle.

Command Line Quality Tools

Download, make executable with chmod +x and copy to the /usr/local/bin dir

Full QA static Analysers

  • PHPStan
  • Phan - Developed and used by Etsy (Rasmus Lerdorf)
  • Pslam - developed by Vimeo, used by Symfony
  • SonarQube - IDE extension that provides live feedbak - detects many vulnerabilties (formerly called RIPS)

Task Focussed QA Assist Tools

  • PHPMD - Mess Detector

  • [PHP Stan] - static analysis tool

  • PHPCS - Code Sniffer by squizzlabs

  • [PHPCS Fixer]

  • PHPCPD - Copy Paste Detector

  • PHPDOC - Create Documentation from your DocBlock comments

  • PHPLOC - Lines of Code

  • local-php-security-checker - can be easier to rename to e.g. phpsec

  • Rector - Instant Upgrades and Automated Refactoring Rector allows you to upgrade and entire e.g. a Symfony 3 project to Symfony 5

Random Stuff.

  • Slugify - A library to convert strings to slugs.
  • UUID - A library for generating UUIDs.
  • LibPhoneNumber for PHP - A PHP implementation of Google's phone number handling library.
  • Filterus - A simple PHP filtering library.
  • Embera - An Oembed consumer library.
  • Essence - A library for extracting web media.
  • Procrastinator - A library for running time consuming tasks.
  • REST Countries API - A Rest API for country information, names, TLDs, calling codes etc

Third Party APIs

Libraries for accessing third party APIs.

API Design

OpenAPI or RAML (RESTful API Modelling Language) Design tools

  • stoplight.io - a service that helsp you design your OpenAPI before you write code
  • Swagger Editor - for OpenAPI
  • Apiary - now Oracle branded... so costs may apply.
  • API Platform - Symfony API generators
  • Apiglity - api platform based on ZendFramework tools. deprecated
  • Laminas API Tools - formerly Apiglity
  • HTPie - command line tool for tetsing APIs. install with brew brew instal httpie
    uasge e.g. http cli.fyi/example.net
    or download a file http pie.dev/image/png > image.png
  • Zetta - turn devices such as Arduino or RaspberryPi into IoT devices

WordPress Specific

Links and Artciles

PLUGINS

  • [wpackagist-plugin/better-wp-security] Ithemes Security
  • [wpackagist-plugin/http-security] HTTP Security - provides CSP rule setting DO NOT USE THIS PLUGIN ANYMORE - DeListed BY WordPress
  • wpackagist-plugin/gd-security-headers GD Security Headers for CSP Rules
  • [wpackagist-plugin/civic-cookie-control-8] Civic Cookie - composer install
  • [wpackagist-plugin/contact-form-7] Contact Form 7
  • [wpackagist-plugin/contact-form-7-honeypot] Honeypot for CF7
  • [wpackagist-plugin/enable-media-replace] - enable a media item to be replaced
  • [wpackagist-plugin/wordpress-seo] Yoast WordPress SEO
  • [wpackagist-plugin/autodescription] - a low bloat, no ads very well regarded alternative to Yoast but requires some "extensions"
  • wpackagist-plugin/redirection Redirection - for handling 301s
  • wpackagist-plugin/wp-map-block WP Map Block for Gutenberg by Academy LMS

PLUGINS CREATED or RECOMMENDED BY WORDPRESS/AUTOMATTIC

  • memcached drop-in - a drop-in plugin for memcached
  • hyperDB drop-in - a drop-in plugin for managing multi-sever database with dedicate write DB, dedicated read DBs and replication
  • BatCache - memcache based cache plugin - VERY FAST 40x page load increase
  • Elastic search - WordPress.com uses elastic search for it's full-text search
  • Logstash + Logcourier
  • Kibana - datavisualisation for elastci search
  • Jetpack Boost - Website Speed, Performance and Critical CSS

Dev Plugins These are for developer use only and should be in the Composer require-dev block only.

  • [wpackagist-plugin/debug-bar] Debug Bar
  • [wpackagist-plugin/debug-bar-timber] Timber debug extension
  • [symfony/var-dumper] Symfony Var Dumper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment