Download the PHP package kauffinger/php-codemap without Composer

On this page you can find all versions of the php package kauffinger/php-codemap. 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 php-codemap

Latest Version on Packagist Linting Tests Total Downloads

PHP Codemap

Table of Contents

Introduction

PHP Codemap is a versatile Composer package designed to simplify PHP codebase exploration. It scans your PHP files and generates a textual "codemap"—a structured overview detailing classes, methods, and public properties.

Why Use PHP Codemap?

Key Features

Installation

Requirements

Installing via Composer

Install PHP Codemap by adding it to your project with Composer:

This command fetches the package and its dependencies, making the codemap command available in your vendor/bin directory.

Configuration

PHP Codemap supports customization through a codemap.php file in your project root. This optional file lets you define scan paths and the PHP version for parsing.

Example codemap.php

If no codemap.php exists, PHP Codemap generates a default configuration based on your composer.json PHP requirement and scans the src directory.

Usage

Interact with PHP Codemap via the command-line tool located at ./vendor/bin/codemap.

Basic Usage

Generate a codemap using default settings:

This scans the configured paths (or src by default) and writes the output to codemap.txt in your project root.

Specifying Paths to Scan

Override configured paths by passing them as arguments:

Multiple paths can be provided, and they’ll be scanned recursively.

Output Options

Customize where the codemap is written:

Using Different PHP Versions

Specify a PHP version for parsing if your codebase differs from the default:

Supported versions include 8.0 through 8.4, aligning with the PhpVersion enum.

Advanced Usage

Customizing Scan Paths

For complex projects, tailor scan paths in codemap.php:

This focuses scanning on specific areas, improving performance and relevance.

Handling Large Codebases

For expansive projects, limit scanning to essential directories to reduce processing time. While exclusion patterns aren’t supported yet, precise path specification in the configuration achieves similar results.

Testing

PHP Codemap uses Pest PHP for its test suite. Run tests with:

This executes the full suite, targeting 100% coverage to maintain reliability. Tests verify command execution, parsing accuracy, and formatting.

Contributing

We welcome contributions to enhance PHP Codemap! Follow these steps:

  1. Fork the Repository: Clone it to your GitHub account.
  2. Make Changes: Implement features or fixes in your fork.
  3. Adhere to Standards: Use Laravel Pint for formatting and pass PHPStan analysis.
  4. Test Your Changes: Run composer test to ensure all tests pass; add new tests as needed.
  5. Submit a Pull Request: Open a PR with a detailed description of your changes.

FAQ

Q: How do I exclude directories from scanning?

A: Exclusion patterns aren’t supported yet. Instead, list only the directories you want to scan in codemap.php.

Q: Can I output the codemap in formats like JSON or HTML?

A: Currently, only text output is available. Future releases may add more formats—watch the changelog or contribute!

Q: What if my codebase uses an older PHP version?

A: Use the --php-version option (e.g., --php-version=8.0) or set it in codemap.php to match your code.

For more questions, open an issue on the GitHub repository.

License

PHP Codemap is licensed under the MIT License. See LICENSE.md for details.


All versions of php-codemap with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3.0
nikic/php-parser Version ^5.4
symfony/console Version ^7.0
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 kauffinger/php-codemap contains the following files

Loading the files please wait ....