Download the PHP package thomasmarinissen/class-dependency-resolver without Composer

On this page you can find all versions of the php package thomasmarinissen/class-dependency-resolver. 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 class-dependency-resolver

Class Dependency Resolver

Description

The PHP Class Dependency Resolver is a library designed to facilitate providing context to Large Language Models by resolving dependencies of PHP classes/files. It maps fully qualified class names, interfaces, and traits to their corresponding file paths and manages the direct dependencies between files. The main entry point to the library is the Resolver class.

Table of Contents

Installation

To install the Class Dependency Resolver library, use Composer:

Ensure that your PHP version is compatible (PHP 8.3 or higher) and that you have Composer installed on your system.

Basic Usage

To use the Class Dependency Resolver, you need to initialize the Resolver class with the directories you want to scan for PHP files. Here is a basic example:

This example demonstrates how to initialize the resolver, build the dependency maps, and retrieve file paths and dependencies.

Configuration

The Resolver class allows you to specify the PHP version you want to target when parsing files. By default, it uses the host's PHP version. You can specify a different version by passing a PhpVersion instance to the constructor:

This allows you to ensure compatibility with different PHP versions when resolving dependencies.

Examples

Example 1: Resolving Class Dependencies

Example 2: Handling Multiple Directories

Example 3: Resolving Class Dependencies by file path

These examples illustrate how to resolve dependencies for classes or files and handle multiple directories.

Contributing

Contributions are welcome! If you wish to contribute to the Class Dependency Resolver project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes and ensure that all tests pass.
  4. Submit a pull request with a clear description of your changes.

Please adhere to the coding standards and include tests for any new functionality.

Testing

To run the tests for the Class Dependency Resolver library, you need to have PHPUnit installed. You can run the tests using the following command:

This command will execute the PHPUnit tests defined in the tests directory. Ensure that all tests pass before submitting any contributions.

License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of class-dependency-resolver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
nikic/php-parser Version ^5.2
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 thomasmarinissen/class-dependency-resolver contains the following files

Loading the files please wait ....