Inferring strict types via production data profiling - is it possible?

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
  • PHP extensions in general *could* do what you are asking for, because as said before they have access to this information. I see this as a combination of parsing PHP docblocks and automatically generating assert() calls right at the beginning of the function. Changing the AST is possible with a hook in an extensoin, here is a prototype of mine doing it: https://github.com/beberlei/php-ast-tracer-poc

  • php-parser-nodes-docs

    Visual documentation of PHP Parser nodes, to help you learn AST, how to create nodes and analyse them

  • You can easily modify rule to handle it, just check for $classMethod->params(), then $param->type, see: https://github.com/rectorphp/php-parser-nodes-docs#phpparsernodeparam

  • 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
  • Rector

    Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

  • It infers only native PHP types and autocompletes them everywhere where possible, e.g. based on constructor types: https://github.com/rectorphp/rector/blob/master/docs/rector_rules_overview.md#typedpropertyfromstrictconstructorrector

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

  • Easy Way to Update Old Codebase to 8.1

    2 projects | /r/PHP | 18 Jan 2022
  • Weekly "ask anything" thread

    3 projects | /r/PHP | 22 Nov 2021
  • Help pick a migration approach from PHP5.4

    1 project | /r/PHPhelp | 7 Nov 2021
  • Migrating from PHP 5 to 7 deprecated features

    1 project | /r/PHPhelp | 27 Sep 2021
  • Trying to collect Deprecation Notices for a symfony 3.4 project

    1 project | /r/symfony | 24 Aug 2021