Download the PHP package shoofly/doctrine-multi-schema-bundle without Composer

On this page you can find all versions of the php package shoofly/doctrine-multi-schema-bundle. 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 doctrine-multi-schema-bundle

Enables Multiple Schemas for MySQL on Doctrine

I created this bundle to fulfill a need for one of my projects. It is not thoroughly tested for all use cases, and will be regularly updated.

If you find this useful but spot a bug, I welcome PRs.

The Premise

Doctrine treats MySQL databases the same as PostgreSQL databases. The truth is that MySQL databases are closer in nature to a PostgreSQL schema, and the term DATABASE can be used interchangeably with SCHEMA in MySQL, even in syntax:

CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name ...

This makes it very difficult to handle MySQL layouts that use more than one schema - often a reality in inherited code.

If your personal use case is transferring an existing project with multiple schemas into a Symfony project, and you'd like to use Doctrine, then this bundle seeks to make that possible.

Installation

In your Symfony project, install with

composer require shoofly/doctrine-multi-schema-bundle

Add to your Symfony AppKernel.php:

$bundles = [
    new Shoofly\DoctrineMultiSchemaBundle\ShooflyDoctrineMultiSchemaBundle(),
];

Configuraiton

IMPORTANT: Remove your driver and platform, and replace it with these two parameters.

doctrine:
    dbal:
        driver_class: 'Shoofly\DoctrineMultiSchemaBundle\DBAL\MySQL\Driver'
        platform_service: "shoofly_doctrine_multi_schema.platform57"
        # for MySQL < 5.7, choose this:
        # platform_service: "shoofly_doctrine_multi_schema.platform"

Next, list the schemas you want to include in your ORM:

shoofly_doctrine_multi_schema:
    schemas:
        - foo
        - baz
        - bar

That should be the only configuration you need. If you run into any issues, please let me know.

Hope this helps someone else. If not, it's already helped me :)


All versions of doctrine-multi-schema-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
doctrine/common Version ~2.5
doctrine/dbal Version ~2.5
symfony/config Version >= 3.2
symfony/dependency-injection Version >= 3.2
symfony/doctrine-bridge Version >= 3.2
symfony/framework-bundle Version >= 3.2
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 shoofly/doctrine-multi-schema-bundle contains the following files

Loading the files please wait ....