Download the PHP package gcworld/common without Composer

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

GCWorld Common

Packagist Packagist

Packagist PHP Packagist GitHub

gcworld/common provides shared configuration and service-loading foundations for GCWorld applications. It combines YAML-backed configuration with a per-application singleton, lazy database and Redis connections, path helpers, and package/project version discovery.

Version

2.8.1

Requirements

Installation

Install the package with Composer:

Application common class

Create one project-specific subclass and implement getEnvironment() using the application's CommonEnvironmentEnumInterface enum:

Resolve the shared instance and its services where needed:

getInstance() keeps a separate instance for each concrete subclass.

Configuration

Pass a YAML path through the subclass's $configPath property. When no path is set, CommonConfig searches upward from the package for config/config.yml. See config/config.example.yml for a complete starting point.

The primary sections are:

Additional YAML files can be merged through includes. Paths are relative to the main configuration file, and later files override matching values loaded earlier:

Configuration caching is enabled by default. After parsing the YAML file, Common writes a neighboring .php cache file and loads that file on later requests. Remove the generated cache file when changing YAML configuration so the updated values can be compiled.

Configuration files are trusted application input. Do not allow users to control configuration paths or file contents.

Database connections

getDatabase() creates a gcworld/database connection only when requested and reuses it for the remainder of the process. The default connection name is default:

A database entry can reference another configured entry with alias. Circular aliases are rejected. Use closeDatabase() to disconnect and remove a cached connection.

Redis connections

getCache() supports standalone Redis and Redis Cluster configurations, including authentication, timeouts, and persistent connections. It returns null when a named cache is not configured.

An instance:identifier value creates a distinct cached connection identity while using the configuration for instance:

closeCache() removes that connection from Common's in-process cache.

Paths and versions

getDirectory() reads from paths.file. getPath() reads from paths.web and derives its base URL from HTTP_HOST outside CLI requests. Only use that dynamic base URL when the web server or trusted proxy validates the host header.

getCommonVersion() reads this package's VERSION file. getProjectVersion() reads the consuming project's VERSION file from the expected Composer installation layout and falls back to COMMON-ONLY:<common-version> when no project version is available. Pass fresh: true to bypass the in-process project-version cache.

Local development

The repository includes a Docker Compose environment based on the same PHP image used by CI:

Copy docker-compose.override.yml.example to the ignored docker-compose.override.yml only when local Composer credentials or SSH keys are required inside the container.

The Composer quality suite includes syntax checks, PHPStan level 6 analysis, and PHPUnit regression tests. Run them independently with composer lint, composer phpstan, or composer test.

Releases

Releases use bare semantic-version tags such as 2.7.20. Before tagging a release:

  1. Move the relevant notes from Unreleased to a matching version heading in CHANGELOG.md.
  2. Update VERSION and the value immediately below ### Version in this file.
  3. Push the release commit and matching tag.

GitHub Actions validates release metadata and the PHP 8.4/8.5 quality matrix before creating a GitHub Release from the matching changelog section. Release tags must not be moved or reused.

License

This package is proprietary software.


All versions of common with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-pdo Version *
ext-redis Version *
gcworld/database Version ^2.8
gcworld/errorhandlers Version ^1.2
gcworld/interfaces Version ^4.5
symfony/yaml Version ^6.4
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 gcworld/common contains the following files

Loading the files please wait ...