Download the PHP package oceanmoon/collections without Composer

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

OceanMoon PHP Collections

Type-safe collection classes for PHP 8.4+.

Documentation


Description

A type-safe collection library featuring runtime type validation, immutable operations, and unrestricted key types.

Core Classes:


Development and Quality Assurance

Claude Chat and Claude Code were used in the development of this package. The core classes were designed, coded, and commented primarily by the author, with Claude providing substantial assistance with code review, suggesting improvements, debugging, and generating tests and documentation. All code was thoroughly reviewed by the author, and validated using industry-standard tools including PHP_Codesniffer, PHPStan (to level 9), and PHPUnit to ensure full compliance with PSR-12 coding standards and comprehensive unit testing with 100% code coverage. This collaborative approach has produced a well-designed, production-ready package with thorough test coverage and documentation.

Code Coverage


Why OceanMoon Collections?

PHP's native arrays are powerful but have limitations:

OceanMoon Collections solves these problems with:

Any type as keys - Use objects, arrays, booleans, floats, null as Dictionary keys.

Runtime type validation - Optional type constraints with compile-time-like checking.

Rich API - Fluent interfaces, method chaining, functional programming support.

Immutable operations - Transformations return new collections without modifying originals.

Type inference - Automatically detect types from your data.

Mathematical correctness - Proper type safety for operations like sum() and product().


Alternatives

Before using this package, you may want to check out these PHP extensions:

These are official PHP extensions that provide efficient data structure implementations and will probably be well-supported going forward. However, if you need runtime type safety and generics-like behavior, or simply prefer a more functional style of programming, OceanMoon Collections provides features that these extensions lack, including type constraints, type inference, and type-safe operations.


Features

Type Safety

Unrestricted Keys

Functional Programming

Set Operations


Installation


Requirements


Quick Start

Sequence - Type-safe lists

Dictionary - Key-value pairs with any type

Set - Unique values


Classes

Core Collections

Supporting Classes


Testing

The library includes comprehensive test coverage:

Test Coverage:


License

MIT License - see LICENSE for details


Support

For questions or suggestions, please open an issue.


Changelog

See CHANGELOG.md for version history and changes.


All versions of collections with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
oceanmoon/core Version ^2.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 oceanmoon/collections contains the following files

Loading the files please wait ...