Download the PHP package trehinos/thor-common without Composer

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

Thor Common

Reusable core utilities for the Thor framework (and standalone PHP projects).

This library provides small, focused components for day-to-day application code:

The components are decoupled; you can use only the parts you need.

API inventory (by namespace)

Requirements

Installation

Install via Composer:

Autoloading is PSR-4 under the Thor\Common namespace.

Quick start and examples

Below are small, practical examples for the most used utilities. All namespaces assume use statements or fully-qualified names as needed.

Types\Strings

Types\Arrays

Transpose/pivot a list of associative arrays into a dictionary of lists.

Types\DateTimes and ClockInterface

Formatting, relative display, periods, and a simple clock provider.

Types\Safe\Result

A minimal Result type to avoid throwing exceptions for expected errors.

Types\Safe\Option

A lightweight Option type to represent the presence (Some) or absence (None) of a value. Avoids passing raw nulls around and makes intent explicit.

Validation

FilterInterface and ValidatorInterface define small contracts. A ready-to-use RegexFilter is provided.

Configuration

ArrayObject-based configuration with YAML loading/writing and path interpolation.

Debug

A lightweight logger with log levels and an easy way to record throwables.

FileSystem

Convenience functions to work with files and folders.

Encryption

Secure random tokens and flexible string formats.

Types\Collection (fluent array wrapper)

A rich wrapper around PHP arrays offering dozens of familiar operations (map/filter/reduce, set ops, sorting, chunking, etc.).

Note: See the source of Types/Collection for the full list of methods and options.

Running tests

This repository uses PHPUnit 10.x. Install dev dependencies and run tests:

Versioning and stability

This package follows semantic versioning as much as possible. Minor versions may add features without breaking changes. Check the CHANGELOG or git history for details.

Contributing

Issues and PRs are welcome. Please include tests for bug fixes and new features when possible.

License

MIT License. See LICENSE file. © 2021–2025 Sébastien Geldreich


All versions of thor-common with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-mbstring Version *
ext-openssl Version *
symfony/yaml Version ^7
symfony/var-dumper Version ^7
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 trehinos/thor-common contains the following files

Loading the files please wait ...