Download the PHP package ingenerator/kohana-doctrine2 without Composer

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

kohana-doctrine2 - integrates Doctrine 2 ORM with Kohana

[!!] This package has been significantly rewritten for the 0.2 series

kohana-doctrine2 provides a wrapper with opinionated configuration for the Doctrine2 ORM in the way we like to use it. The package does not attempt to make every part of Doctrine2 available or configurable, though can usually be extended or configured to tweak behaviour.

In particular:

Installation

Run composer require ingenerator/kohana-doctrine2. Note this is no longer a kohana module so you don't need to register it in the bootstrap, so long as you register Composer's autoloader.

Configuring database connection

We read database information from the Kohana::$config 'database' group, in the same structure as the legacy core Kohana database module. Currently we only support a MySQL backend with a pdo_mysql driver in Doctrine.

Using the default Kohana config readers, your app should provide a config/database.php like this:

Sometimes - e.g. for unit tests or running Doctrine build tooling - you might not have a database server actually available. If you configure 'hostname' => NULL we will use a NullPDO driver to allow Doctrine to bootstrap itself without failing on a database connection error.

That connection is sufficent to run things like orm:generate-proxies or orm:validate-schema --skip-sync. You should be aware that the NullPDO driver reports a mysql version of 5.7.29 - at time of writing doctrine/dbal does not vary any SQL or column definitions between mysql 5.7.x and 8.x, so it shouldn't matter if this version differs from your runtime mysql version. If your code does anything that attempts to actually make PDO calls we'll throw an exception.

Configuring entities and options

You must provide an explicit list of the entities that should be defined. This, and any other config, goes in config/doctrine.php:

Configuring your Dependency Container

We provide bindings for the ingenerator/kohana-dependencies DI container. If you're also using our kohana-extras package then your dependency config would generally look like this:

This will expose the entity manager as doctrine.entity_manager and a raw PDO connection as doctrine.pdo_connection, as well as various internal helpers - see the DoctrineFactory::definitions() method to explore the services that are defined.

You can also automatically bind event subscribers when the entity_manager is created:

See DoctrineFactory::subscriberDefinitions for more details.

Usage

Define entity classes with php annotations in the usual Doctrine way. They don't have to extend any particular base class. You can put these anywhere so long as they can be autoloaded.

All entity classes must be listed in the entity_classes array in config/doctrine.php otherwise they will not be detected for schema validation and database diff generation.

Using the command line tools

Doctrine ships with a number of command line tools. To use them you'll need to provision a cli-config.php file.

It's expected that you've separated out your application bootstrap from your index.php and any minion / task runner entry points so that application/bootstrap.php does all the setup including path definitions etc.

License

Copyright (c) 2013 inGenerator Ltd All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


All versions of kohana-doctrine2 with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0.0 || ~8.1.0 || ~8.2.0
ext-pdo Version *
composer/installers Version ~1.0
doctrine/annotations Version ^1.13
doctrine/cache Version ^1
doctrine/common Version ^3.0
doctrine/dbal Version ^3.3
doctrine/orm Version ^2.5
doctrine/persistence Version ^2.3
ingenerator/kohana-core Version ^4.9
ingenerator/kohana-dependencies Version ^1.1
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 ingenerator/kohana-doctrine2 contains the following files

Loading the files please wait ....