Download the PHP package soyhuce/next-ide-helper without Composer

On this page you can find all versions of the php package soyhuce/next-ide-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package next-ide-helper

Laravel ide helper rebuilt under steroids

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status GitHub PHPStan Action Status Total Downloads

This package aims to be an easy extendable ide-helper generator.

It was inspired by the great work of barryvdh/laravel-ide-helper.

It provides completion for Eloquent magic (model attributes, scopes, relations, ...), registered macros of Macroable classes, container instances, ...

Installation

You should install this package using composer :

You may want to publish configuration file :

You're done !

Usage

Models

The command php artisan next-ide-helper:models will generate multiple elements to help your ide understand what you are doing. This package needs you to have access to a migrated database.

It will add docblock to your classes and will create an _ide_models.php file. This file must not be included but only analyzed by your ide.

Attributes

The command resolves model attributes from the database. They are added to your model class docblock. If the attribute has a cast, the package will cast properly the attribute.

Attribute casting will also work with custom casts :

This will produce @property \App\Email $email

Note that the type must be defined as return type or in docblock's @return of the get method.

The command also adds attributes from accessors as read-only properties :

Custom collection

In case your model defines a custom collection, the command will add all method on the model's docblock to re-define return type :

Query Builder

If your model defines a custom Eloquent builder, the command will add some tags on the model docblock.

It will also add some tags on the builder to help your ide :

If your model does not define a custom builder, next-ide-helper:models will create fake classes in _ide_models.php with the docblocks to provides auto-completion.

Scopes

All scopes of your models will be added as method of their builder (in the custom query builder or in _ide_models.php) .

This will produce @method \App\Builder\UserBuilder whereVerified(bool $verified = true) on your custom builder.

Note that your ide can complain with Non-static method 'whereVerified' should not be called statically, but the class has the '__magic' method. if you just call User::whereVerified(). That's why we advise you to use User::query()->....

Relations

The models command will also resolve relations of your model and provide a lot of completion helpers.

Custom builders and custom collections are also correctly resolved by the ide :

Larastan friendly tags

In case you use PHPStan or Larastan, you can have more information about the collections defining models.larastan_friendly config to true.

With this config, you will get the extra tags in you models

and in your custom builders

Extensions

Sometimes, the command cannot resolve or anticipate every way everything are resolved.

That's why this package provides a way to customize some resolution logic adding your custom resolver in next-ide-helper.models.extensions config.

Macros

This package provides a next-ide-helper:macros. The command resolves all registered macros and generates a _ide_macros.php file which provides auto-completion for Macroable macros.

For example :

Thanks to _ide_macros.php file, we have auto-completion for the mapToUpper method :

Just like _ide_models.php, the _ide_macros.php file must not be included but only analyzed by your ide.

Phpstorm meta

The command php artisan next-ide-helper:meta will generate a .phpstorm.meta.php file. It will provide completion for container bindings and some laravel helpers

Factories

The command php artisan next-ide-helper:factories will add docblocks to your factories in order to correctly type some methods. It will also explicit magic methods for model relations.

For example, if you have

this command will generate the docblock in UserFactory:

Aliases

Sometimes we don't want to use fully qualified class names but prefer to use Laravel aliases.

The command php artisan next-ide-helper:aliases will create a file which can be understood by your ide.

It will then provide auto-completion, syntax hightlight, ... for the aliases defined in your config/app.php file as well as the ones defined by the package you use.

Generate all

You can generate all next-ide-helper files using next-ide-helper:all.

It will generate for you :

Custom application bootstrap

Sometimes you may want to bootstrap the environment before the command is executed. For example in a multi-tenant multi-database application, you need to bootstrap your tenant connection in order to let this package resolve table columns.

In that case, you just have to create your own bootstrapper and configure the package to use it :

Now, you just have to add it in you next-ide-helper.php config file :

Your bootstrapper benefits from laravel dependency injection in its constructor.

Custom content in docblock

Some command will reset your docblock. If you want some content not to be erased, you must add a @generated tag in the docblock to tell nest-ide-helper where to insert its content.

For exemple,

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of next-ide-helper with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^10.38||^11.0
illuminate/database Version ^10.38||^11.0
illuminate/support Version ^10.38||^11.0
illuminate/view Version ^10.38||^11.0
spatie/laravel-package-tools Version ^1.9.2
composer/class-map-generator Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package soyhuce/next-ide-helper contains the following files

Loading the files please wait ....