mralaminahamed/fluent-cart-pro-stubs

Fluent Cart Pro function and class declaration stubs for static analysis.

Maintainers

Package info

github.com/mralaminahamed/phpstan-fluent-cart-pro-stubs

pkg:composer/mralaminahamed/fluent-cart-pro-stubs

Transparency log

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.5.3.1 2026-07-31 12:54 UTC

This package is auto-updated.

Last update: 2026-07-31 12:55:48 UTC


README

Latest Version Downloads License PHP Version

PHP stub declarations for Fluent Cart Pro, for IDE completion and static analysis. Generated with php-stubs/generator from the plugin source.

Generated from Fluent Cart Pro 1.5.3 โ€” 200 classes ยท 2 interfaces ยท 4 traits ยท 7 constants.

๐Ÿ“‹ Requirements

๐Ÿ“ฆ Installation

composer require --dev mralaminahamed/fluent-cart-pro-stubs

๐Ÿ”ง Configuration

parameters:
    scanFiles:
        # The free plugin first โ€” Pro's classes extend it.
        - vendor/mralaminahamed/fluent-cart-stubs/fluent-cart-stubs.stub
        - vendor/mralaminahamed/fluent-cart-stubs/fluent-cart-constants-stubs.stub
        - vendor/mralaminahamed/fluent-cart-pro-stubs/fluent-cart-pro-stubs.stub
        - vendor/mralaminahamed/fluent-cart-pro-stubs/fluent-cart-pro-constants-stubs.stub

โš ๏ธ Notes specific to a paid plugin

No source is redistributed here, and regeneration needs a licence. Fluent Cart Pro is commercial and has no WordPress.org endpoint, so this repository carries only generated declarations โ€” empty method bodies and signatures. There are no release scripts that poll for new versions, because there is nothing public to poll; to regenerate, unpack a licensed copy at source/fluent-cart-pro and run composer generate.

That also means the stubs lag behind Pro releases until someone with a licence regenerates them. Pin the version you tested against rather than tracking a range loosely.

โš ๏ธ General limitations

  • Stubs are a snapshot of Fluent Cart Pro 1.5.3. Regenerate when a signature changes.
  • Method bodies are empty by design. Never load these files at runtime.
  • Only top-level constants are captured. All seven of Pro's are. A constant defined inside a function or method is invisible to any stub generator โ€” declare those in your own bootstrapFiles or under PHPStan's dynamicConstantNames.
  • The WPFluent framework is not duplicated here. It ships inside the free plugin, namespaced as FluentCart\Framework, and comes from fluent-cart-stubs. Declaring it twice would have PHPStan reporting redeclarations.

๐Ÿ”„ Regenerating

composer install
# unpack a licensed copy of Fluent Cart Pro at source/fluent-cart-pro
composer generate

๐Ÿ“ Package structure

phpstan-fluent-cart-pro-stubs/
โ”œโ”€โ”€ bin/generate.sh                     # regeneration, from a locally supplied source
โ”œโ”€โ”€ configs/                            # finder.php (what to read), bootstrap.php (WP constants)
โ”œโ”€โ”€ source/                             # licensed plugin source, gitignored
โ”œโ”€โ”€ tests/                              # smoke tests over the generated stubs
โ”œโ”€โ”€ fluent-cart-pro-stubs.stub              # classes, interfaces, traits
โ”œโ”€โ”€ fluent-cart-pro-constants-stubs.stub    # constants only
โ””โ”€โ”€ phpstan.neon                        # analyses the stubs themselves

๐Ÿ“ License

The tooling here is MIT. The generated declarations derive from Fluent Cart Pro, which is commercial software: they exist so static analysis can resolve its API, and they are not a substitute for a licence or a means of redistributing it. See LICENSE.