Download the PHP package voku/itp-context without Composer

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

Latest Stable Version Total Downloads License

🎯 itp-context

A small PHP library for attaching architecture rules to code via PHP attributes and resolving those rules directly from typed enums.

It gives you:

Index

Install via "composer require"

Why?

When architecture guidance only lives in ADRs and wikis, it drifts away from the code that is supposed to follow it.

itp-context keeps the rule identifier, definition, and supporting context references together in one typed enum instead of splitting them across sibling catalog files. That gives you a compact way to:

The goal is to add context without burning tokens:

Usage

1. Create a rule enum in your project

Use refs for the context you want nearby: ADRs, docs, design notes, diagrams, tickets or related code.

2. Annotate your code

Keep annotations selective: tag the classes or methods where architecture context changes decisions, not every file.

3. Validate the enum definitions

Validation walks every enum case and calls getDefinition(), so broken match arms or incomplete inline definitions fail in one place.

4. Summarize one file

Example output:

5. Export agent-friendly context for a source tree

This writes:

The export is intentionally lean:

This repository dogfoods that approach with a few high-signal ItpContext\Context\PackageRules annotations on core services, and a committed self-export snapshot lives under docs/package-export/.

That docs/package-export/ tree is meant to be a ready-made reference for coding agents: it shows the compact export shape, the searchable metadata (owners, refs, verified_by, annotated_methods) and the level of abstraction that keeps context useful without wasting tokens.

Local Development

If you want to test the package before publishing it, use a Composer path repository in a separate project:

Then install it via Composer:

After that the package CLIs are available in the consumer project via:

Project Structure

This package only contains generic framework code under the ItpContext\\ namespace.

Your project-specific files stay in your own codebase, for example:

A minimal example project is included under examples/basic-domain, and the repository's self-export snapshot lives under docs/package-export.

The example project also includes sample context docs under examples/basic-domain/docs/, including ADR-style notes referenced from the enum definitions.

Portable agent skills

This repository keeps one shared, repo-owned coding-agent skill under docs/skills/itp-context.md.

Agent-specific entrypoints stay thin and point back to that file:

That keeps the actual guidance in one place while still exposing it to different agent runtimes.

CLI Tools

The package ships with five small CLI helpers.

itp-context-summarize

itp-context-validate

itp-context-generate

This creates or extends:

The generator only updates the enum: it adds the new case plus a matching getDefinition() arm and seeds statement, owner, rationale, verifiedBy, and refs placeholders so new rules start with a fuller definition.

itp-context-export

The export contains:

itp-context-query

For small libraries, prefer a tiny export with a few high-value symbols over exhaustive annotation. The goal is context density, not full documentation coverage.

Tests

There is also a package smoke check in tests/smoke/package_smoke.php.

License

MIT


All versions of itp-context with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3.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 voku/itp-context contains the following files

Loading the files please wait ...