barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.18k stars 1.16k forks source link

Lumen: \Eloquent missing #1149

Closed jnkowa-gfk closed 3 years ago

jnkowa-gfk commented 3 years ago

Versions:

Question:

i followed all the steps from https://github.com/barryvdh/laravel-ide-helper/blob/master/README.md#usage-with-lumen.

Then i ran

php artisan ide-helper:eloquent && \
php artisan ide-helper:generate  -M -H -W  && \
php artisan ide-helper:meta && \
php artisan ide-helper:models  -M -r -p 

output was

Unexpected no document on Illuminate\Database\Eloquent\Model
Wrote expected docblock to .../vendor/illuminate/database/Eloquent/Model.php
A new helper file was written to _ide_helper.php
A new meta file was written to .phpstorm.meta.php
Written new phpDocBlock to .../app/Models/Author.php
Model information was written to _ide_helper_models.php

in the end the .../app/Models/Author.php got a docBlock @mixin IdeHelperAuthor as expected. when i look in _ide_helper_models.php for the class App\Models\IdeHelperAuthor i see a dockBlock @mixin \Eloquent as expected. Unfortunately there is no definition of \Eloquent in _ide_helper.php - where it would be when using laravel instead of lumen. Or am i wrong?

Any idea what i might have done wrong? What needs to be done to generate the "stubs" of \Eloquent?

jnkowa-gfk commented 3 years ago

if this helps:

Click to expand `composer info` output ``` barryvdh/laravel-ide-helper v2.9.0 Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion. barryvdh/reflection-docblock v2.0.6 brick/math 0.9.2 Arbitrary-precision arithmetic library composer/ca-bundle 1.2.9 Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle. composer/composer 2.0.9 Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere. composer/package-versions-deprecated 1.11.99.1 Composer plugin that provides efficient querying for installed package versions (no runtime IO) composer/semver 3.2.4 Semver library that offers utilities, version constraint parsing and validation. composer/spdx-licenses 1.5.5 SPDX licenses list and validation library. composer/xdebug-handler 1.4.5 Restarts a process without Xdebug. doctrine/cache 1.10.2 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others. doctrine/dbal 3.0.0 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management. doctrine/event-manager 1.1.1 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects. doctrine/inflector 2.0.3 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words. doctrine/instantiator 1.4.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer 1.2.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers. dragonmantank/cron-expression v3.1.0 CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due egulias/email-validator 2.1.25 A library for validating emails against several RFCs fakerphp/faker v1.13.0 Faker is a PHP library that generates fake data for you. graham-campbell/result-type v1.0.1 An Implementation Of The Result Type hamcrest/hamcrest-php v2.0.1 This is the PHP port of Hamcrest Matchers illuminate/auth v8.26.1 The Illuminate Auth package. illuminate/broadcasting v8.26.1 The Illuminate Broadcasting package. illuminate/bus v8.26.1 The Illuminate Bus package. illuminate/cache v8.26.1 The Illuminate Cache package. illuminate/collections v8.26.1 The Illuminate Collections package. illuminate/config v8.26.1 The Illuminate Config package. illuminate/console v8.26.1 The Illuminate Console package. illuminate/container v8.26.1 The Illuminate Container package. illuminate/contracts v8.26.1 The Illuminate Contracts package. illuminate/database v8.26.1 The Illuminate Database package. illuminate/encryption v8.26.1 The Illuminate Encryption package. illuminate/events v8.26.1 The Illuminate Events package. illuminate/filesystem v8.26.1 The Illuminate Filesystem package. illuminate/hashing v8.26.1 The Illuminate Hashing package. illuminate/http v8.26.1 The Illuminate Http package. illuminate/log v8.26.1 The Illuminate Log package. illuminate/macroable v8.26.1 The Illuminate Macroable package. illuminate/pagination v8.26.1 The Illuminate Pagination package. illuminate/pipeline v8.26.1 The Illuminate Pipeline package. illuminate/queue v8.26.1 The Illuminate Queue package. illuminate/session v8.26.1 The Illuminate Session package. illuminate/support v8.26.1 The Illuminate Support package. illuminate/testing v8.26.1 The Illuminate Testing package. illuminate/translation v8.26.1 The Illuminate Translation package. illuminate/validation v8.26.1 The Illuminate Validation package. illuminate/view v8.26.1 The Illuminate View package. justinrainbow/json-schema 5.2.10 A library to validate a json schema. laravel/lumen-framework v8.2.2 The Laravel Lumen Framework. league/flysystem 1.1.3 Filesystem abstraction: Many filesystems, one API. league/mime-type-detection 1.7.0 Mime-type detection for Flysystem mockery/mockery 1.4.2 Mockery is a simple yet flexible PHP mock object framework monolog/monolog 2.2.0 Sends your logs to files, sockets, inboxes, databases and various web services myclabs/deep-copy 1.10.2 Create deep copies (clones) of your objects nesbot/carbon 2.44.0 An API extension for DateTime that supports 281 different languages. nikic/fast-route v1.3.0 Fast request router for PHP nikic/php-parser v4.10.4 A PHP parser written in PHP opis/closure 3.6.1 A library that can be used to serialize closures (anonymous functions) and arbitrary objects. phar-io/manifest 2.0.1 Component for reading phar.io manifest information from a PHP Archive (PHAR) phar-io/version 3.0.4 Library for handling version information and constraints phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 5.2.2 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock. phpdocumentor/type-resolver 1.4.0 A PSR-5 based resolver of Class names, Types and Structural Element Names phpoption/phpoption 1.7.5 Option Type for PHP phpspec/prophecy 1.12.2 Highly opinionated mocking framework for PHP 5.3+ phpunit/php-code-coverage 9.2.5 Library that provides collection, processing, and rendering functionality for PHP code coverage information. phpunit/php-file-iterator 3.0.5 FilterIterator implementation that filters files based on a list of suffixes. phpunit/php-invoker 3.1.1 Invoke callables with a timeout phpunit/php-text-template 2.0.4 Simple template engine. phpunit/php-timer 5.0.3 Utility class for timing phpunit/phpunit 9.5.2 The PHP Unit Testing framework. psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11) psr/event-dispatcher 1.0.0 Standard interfaces for event handling. psr/log 1.1.3 Common interface for logging libraries psr/simple-cache 1.0.1 Common interfaces for simple caching ramsey/collection 1.1.3 A PHP 7.2+ library for representing and manipulating collections. ramsey/uuid 4.1.1 A PHP library for generating and working with universally unique identifiers (UUIDs). react/promise v2.8.0 A lightweight implementation of CommonJS Promises/A for PHP sebastian/cli-parser 1.0.1 Library for parsing CLI options sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to sebastian/comparator 4.0.6 Provides the functionality to compare PHP values for equality sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units sebastian/diff 4.0.4 Diff implementation sebastian/environment 5.1.3 Provides functionality to handle HHVM/PHP environments sebastian/exporter 4.0.3 Provides the functionality to export PHP variables for visualization sebastian/global-state 5.0.2 Snapshotting of global state sebastian/lines-of-code 1.0.3 Library for counting the lines of code in PHP source code sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate all referenced objects sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited and non-public ones sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on resources sebastian/type 2.3.1 Collection of value objects that represent the types of the PHP type system sebastian/version 3.0.2 Library that helps with managing the version number of Git-hosted PHP projects seld/jsonlint 1.8.3 JSON Linter seld/phar-utils 1.1.1 PHAR file format utilities, for when PHP phars you up symfony/console v5.2.3 Eases the creation of beautiful and testable command line interfaces symfony/deprecation-contracts v2.2.0 A generic function and convention to trigger deprecation notices symfony/error-handler v5.2.3 Provides tools to manage errors and ease debugging PHP code symfony/event-dispatcher v5.2.3 Provides tools that allow your application components to communicate with each other by dispatching events and listening to them symfony/event-dispatcher-contracts v2.2.0 Generic abstractions related to dispatching event symfony/filesystem v5.2.3 Provides basic utilities for the filesystem symfony/finder v5.2.3 Finds files and directories via an intuitive fluent interface symfony/http-client-contracts v2.3.1 Generic abstractions related to HTTP clients symfony/http-foundation v5.2.3 Defines an object-oriented layer for the HTTP specification symfony/http-kernel v5.2.3 Provides a structured process for converting a Request into a Response symfony/mime v5.2.3 Allows manipulating MIME messages symfony/polyfill-ctype v1.22.0 Symfony polyfill for ctype functions symfony/polyfill-intl-grapheme v1.22.0 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-idn v1.22.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer v1.22.0 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring v1.22.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.22.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/polyfill-php73 v1.22.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions symfony/polyfill-php80 v1.22.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions symfony/process v5.2.3 Executes commands in sub-processes symfony/service-contracts v2.2.0 Generic abstractions related to writing services symfony/string v5.2.3 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way symfony/translation v5.2.3 Provides tools to internationalize your application symfony/translation-contracts v2.3.0 Generic abstractions related to translation symfony/var-dumper v5.2.3 Provides mechanisms for walking through any arbitrary PHP variable theseer/tokenizer 1.2.0 A small library for converting tokenized PHP source code into XML and potentially other formats vlucas/phpdotenv v5.3.0 Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically. voku/portable-ascii 1.5.6 Portable ASCII library - performance optimized (ascii) string functions for php. webmozart/assert 1.9.1 Assertions to validate method input/output with nice error messages. ```
mfn commented 3 years ago

Maybe https://github.com/barryvdh/laravel-ide-helper/pull/438 helps?

jnkowa-gfk commented 3 years ago

thanks. actually https://github.com/barryvdh/laravel-ide-helper/pull/438#issuecomment-656593044 did it. i wonder why this is not part of the README somewhere. or is it and i jusk skipped over it?

mfn commented 3 years ago

No, it's likely missing.

Integration with Lumen can't be automatically tested, so whilst technically integration it's there, it becomes easily broken/neglected. I for one don't use it.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.