Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Stubs Laravel Package

tarantool/stubs

IDE stub definitions for the Tarantool PHP extension, providing accurate autocompletion, type hints, and static analysis for Tarantool classes and functions in Laravel or plain PHP projects.

View on GitHub
Deep Wiki
Context7

Stubs for PHP IDEs (PHP connector).

Frequently asked questions about Stubs
What is tarantool/stubs and do I need it for a Laravel project?
It is a declaration-only Composer package containing class, function, and constant signatures for the Tarantool PHP extension (the PECL tarantool C extension), with empty method bodies meant only for IDEs and static analyzers. You need it only if your code calls Tarantool extension classes and you want autocompletion, type hints, or PHPStan/Psalm coverage on machines where the extension is not built. Laravel apps using the pure-PHP tarantool/client library do not need it, because that client ships real reflectable classes.
How do I install tarantool/stubs in a Laravel application?
Run composer require --dev tarantool/stubs. Because it is a require-dev dependency it is automatically excluded from composer install --no-dev production builds. After installing, register the stub path in your analyzer config rather than in Composer autoload or files.
How do I configure PHPStan to use the Tarantool stubs?
Add the package's stub files to stubFiles or scanFiles in phpstan.neon so they are treated as analysis-only inputs. Do not add them to Composer's autoload or files keys, since runtime autoloading of the stubs alongside the real extension causes Cannot redeclare class fatals. Capture a PHPStan baseline before and after adding them to measure the actual delta.
Will tarantool/stubs cause Cannot redeclare class errors?
Only if the stub files are autoloaded at runtime on a machine where the real tarantool extension is loaded. Register the stubs strictly as analysis inputs (PHPStan stubFiles, Psalm stubs, or an IDE include path) and never through Composer autoload. Prefer real extension reflection whenever extension_loaded('tarantool') returns true.
Do I still need tarantool/stubs if I use tarantool/client or another Tarantool PHP library?
No. The pure-PHP tarantool/client ships real classes with docblocks that PhpStorm, Intelephense, PHPStan, and Psalm resolve natively, making these stubs redundant. Resolve which connector your team standardizes on before adding this package, because the stubs only pay off for the legacy PECL C extension.
Which PHP and Laravel versions does tarantool/stubs support?
The package has no framework coupling, so it works with any Laravel version. The real constraint is PHP syntax: stub files must parse cleanly under every PHP version in your matrix, and stubs sometimes use newer syntax than your floor version. Verify parsing on your lowest supported PHP before promoting the config to a shared service template.
How do I get PhpStorm autocompletion for the Tarantool extension without installing it?
Install tarantool/stubs as a dev dependency and let Composer resolution pick it up, or mark the vendor path as included but excluded from indexing-as-source. PhpStorm will then resolve Tarantool classes and functions for autocompletion and inspections. Do not copy the stub files into your own source tree.
Should tarantool/stubs go in require or require-dev?
Always require-dev. The package contains only empty-bodied declarations with no service provider, config, container bindings, or runtime code, so nothing ships to production. Keeping it in require-dev ensures composer install --no-dev omits it from deployed builds.
How do I keep tarantool/stubs in sync with my installed Tarantool extension version?
Nothing automatically verifies that the stubs match the deployed extension, so treat version alignment as a manual step. Pin a stub release that corresponds to the extension version running in staging and production, and review the stub surface, which is small enough to read line by line. A stub advertising a method the extension lacks turns a harmless IDE warning into a runtime fatal.
Does passing PHPStan with these stubs prove my Tarantool integration works?
No. Green static analysis only proves the shape of the API, not that the extension is installed, reachable, or semantically equivalent. Static analysis passing must never be treated as an integration smoke test, so keep a real runtime test that talks to a Tarantool instance in your pipeline.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums