atrauzzi / laravel-doctrine Goto Github PK
View Code? Open in Web Editor NEWAn ORM for a Framework for Web Artisans
An ORM for a Framework for Web Artisans
The composer.json file makes reference to a src/migrations path to add to the class map, but the Composer install fails because the src/migrations folder does not exist. I think this may have just been missed since git won't commit empty folders.
At the moment I need to fill in my database connection info in the package its configuration. This is weird to me, because laravel has it's own database configuration file which you can use. Also since it's a laravel only package, you can use the helper functions. For example the "metadata" config you could use:
'metadata' => app_path() . '/models';
I work with xCache. In the default package config it has:
$devMode = $config->get('app.debug');
If it is set to "false", I am not able to work/debug xCache when the entire appliation is in "Debug" mode because of the following conditional:
if(!$devMode) {
$cache_config = $config->get('laravel-doctrine::doctrine.cache');
$cache_provider = $cache_config['provider'];
$cache_provider_config = $cache_config[$cache_provider];
....
My recommendation is to allow us to set explicity the "devMode" mode just for this package.
Having this issue when trying to install...
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for atrauzzi/laravel-doctrine dev-master -> satisfiable by atrauzzi/laravel-doctrine[dev-master].
- atrauzzi/laravel-doctrine dev-master requires doctrine/migrations dev-master#46a031ddaea47d0685200027cfe8c83b02aee6f6 -> no matching package found.
Hey,
I am using Laravel 5.1. I've require atrauzzi/laravel-doctrine
package via composer, added service provider and facade, but when I run command to publish package configuration, I've got an exception:
[Doctrine\DBAL\DBALException]
The options 'driver' or 'driverClass' are mandatory if no PDO instance is given to DriverManager::getConnection().
I think it's something with database config. Here is my database.php
<?php
return [
'fetch' => PDO::FETCH_CLASS,
'default' => env('DB_CONNECTION', 'pdo_mysql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => storage_path('database.sqlite'),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
],
],
'migrations' => 'migrations',
'redis' => [
'cluster' => false,
'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
],
],
];
I've tried to change to pdo_sqlite
, but exception is still thrown.
What can be wrong?
In poking around it seems the artisan commands are not setup to work. Is this correct or am I doing something wrong? I'm looking to try to integrate a drop/create pattern for my Behat tests and to read connection data from that environment file. I was going to start poking around the commands to get those working so I can call an Artisan::call('doctrine:schema:create') and drop from my FeatureContext (I'm new to Behat so sorry if terminology is wrong).
Hello Alexander, Laravel 5 is coming soon and some of us are playing around with this version from now. But looks like this module is not compatible yet. Will we see this module supported for Laravel 5?
Thank you.
I'm integrating this package with a pretty big project and I'd like the peace of mind that I'm working with a version that's not going to have breaking changes in the future. Can you tag the package with a version so I can reference it in composer?
I've install this package and create 2 entity class with annotation
when i am run this command ~php artisan doctrine:schema:create the result is
ATTENTION: This operation should not be executed in a production environment.
Obtaining metadata...
Creating database schema...
Database schema created successfully!
But, when I look at the database, there is no schema is created.
How to create schema on this package ?
thanks for the answer..
Next piece of functionality to bring in would likely be the migrations.
http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/introduction.html
Hey,
I've read #72 because I have the same problem. I set 'metadata' => [ 'driver' => 'annotation' ]
in doctrine.php
, clear cache, but it does not pick up my entities; I got No Metadata Classes to process
when I run vendor/bin/doctrine orm:schema:create
Heres my doctrine.php
<?php return [
'metadata' => [
'driver' => 'annotation',
],
'connections' => [
// Some preset configurations to map laravel sqlite configs to doctrine
'sqlite' => [
'driver' => 'pdo_sqlite',
'mappings' => [
'database' => 'path'
]
]
],
'cache' => [
'redis' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 1
],
'memcache' => [
'host' => '127.0.0.1',
'port' => 11211
],
'providers' => [
'memcache' => 'Atrauzzi\LaravelDoctrine\CacheProvider\MemcacheProvider',
'memcached' => 'Atrauzzi\LaravelDoctrine\CacheProvider\MemcachedProvider',
'couchbase' => 'Atrauzzi\LaravelDoctrine\CacheProvider\CouchebaseProvider',
'redis' => 'Atrauzzi\LaravelDoctrine\CacheProvider\RedisProvider',
'apc' => 'Atrauzzi\LaravelDoctrine\CacheProvider\ApcProvider',
'xcache' => 'Atrauzzi\LaravelDoctrine\CacheProvider\XcacheProvider',
'array' => 'Atrauzzi\LaravelDoctrine\CacheProvider\ArrayCacheProvider'
]
],
'migrations' => [
'directory' => '/database/doctrine-migrations',
'namespace' => 'DoctrineMigrations',
'table_name' => 'doctrine_migration_versions'
],
'custom_types' => [
'json' => 'Atrauzzi\LaravelDoctrine\Type\Json'
],
'auth' => [
//'authenticator' => 'Atrauzzi\LaravelDoctrine\DoctrineAuthenticator',
//'model' => 'App\Models\User',
]
];
When using metadata with chainning, configured in /config/doctine.php, the Entities (with annotation) is not reconized.
'metadata' => [
'driver' => 'config',
[
'driver' => 'config'
],
[
'driver' => 'annotation'
// 'namespace' => 'App'
// 'alias' => 'DoctrineModel'
],
[
'driver' => 'yaml',
],
[
'driver' => 'xml'
],
[
'driver' => 'static'
]
]
I can use annotations entities, but i need to set to:
'metadata' => [
[
'driver' => 'annotation'
]
]
PS: I am using with Laravel 5.1
The following code is not correct, please fix it.
if ($prefix = config('doctrine.connection.prefix')) // we only have "doctrine.connections"
$eventManager->addEventListener(Events::loadClassMetadata, new TablePrefix($prefix));
// Class 'Atrauzzi\LaravelDoctrine\TablePrefix' not found
I have to replace the original code with mine to get it work.
$connections = config('doctrine.connections');
if ($prefix = $connections[$connections['default']]['prefix'])
$eventManager->addEventListener(Events::loadClassMetadata, new Listener\Metadata\TablePrefix($prefix));
I get this error while trying to require it.
PS C:\xampp\htdocs\afiliator> composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: laravel/framework[5.0.x-dev, v5.1.2].
- Can only install one of: laravel/framework[5.1.x-dev, 5.0.x-dev].
- Can only install one of: laravel/framework[v5.1.0, 5.0.x-dev].
- Can only install one of: laravel/framework[v5.1.1, 5.0.x-dev].
- Can only install one of: laravel/framework[v5.1.2, 5.0.x-dev].
- atrauzzi/laravel-doctrine dev-master requires laravel/framework 5.0.*@dev -> satisfiable bylaravel/framework[5.0.x-dev].
- Installation request for atrauzzi/laravel-doctrine dev-master -> satisfiable by atrauzzi/laraveldoctrine[dev-master].
- Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[5.1.xdev,v5.1.0,v5.1.1, v5.1.2].
PS C:\xampp\htdocs\afiliator>
Had to manually add files to the laravel folder as they weren't there out of the box. I believe there was an issue when trying to start images with no files in there. Can't entirely remember.
Problem 1
- Installation request for atrauzzi/laravel-doctrine dev-master -> satisfiable by atrauzzi/laravel-doctrine[dev-master].
- atrauzzi/laravel-doctrine dev-master requires doctrine/migrations 1.0.*@dev -> no matching package found.
$user: /var/www/laravel$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v4.1.3
- Conclusion: don't install laravel/framework v4.1.3
- Installation request for atrauzzi/laravel-doctrine dev-master -> satisfiable by atrauzzi/laravel-doctrine[dev-master].
- Conclusion: don't install laravel/framework v4.1.2
- Conclusion: don't install laravel/framework v4.1.1
- atrauzzi/laravel-doctrine dev-master requires illuminate/support 4.0.x -> satisfiable by laravel/framework[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9], illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9].
- Can only install one of: laravel/framework[v4.1.0, v4.0.0].
- Can only install one of: laravel/framework[v4.1.0, v4.0.1].
- Can only install one of: laravel/framework[v4.1.0, v4.0.10].
- Can only install one of: laravel/framework[v4.1.0, v4.0.2].
- Can only install one of: laravel/framework[v4.1.0, v4.0.3].
- Can only install one of: laravel/framework[v4.1.0, v4.0.4].
- Can only install one of: laravel/framework[v4.1.0, v4.0.5].
- Can only install one of: laravel/framework[v4.1.0, v4.0.6].
- Can only install one of: laravel/framework[v4.1.0, v4.0.7].
- Can only install one of: laravel/framework[v4.1.0, v4.0.8].
- Can only install one of: laravel/framework[v4.1.0, v4.0.9].
- don't install illuminate/support v4.0.0|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.1|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.10|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.2|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.3|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.4|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.5|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.6|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.7|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.8|don't install laravel/framework v4.1.0
- don't install illuminate/support v4.0.9|don't install laravel/framework v4.1.0
- Installation request for laravel/framework 4.1.* -> satisfiable by laravel/framework[v4.1.0, v4.1.1, v4.1.2, v4.1.3].
$user: /var/www/laravel$ php -v
PHP 5.4.9-4ubuntu2.3 (cli) (built: Sep 4 2013 19:32:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
And The composer.json file
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"atrauzzi/laravel-doctrine": "dev-master",
"doctrine/migrations": "dev-master",
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
],
"psr-0": {
"SomeApp\\": "app/src/"
}
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
Hello atrauzzi,
Today I update the project via composer. After a the command ran without problems and refreshing doctrine config file, the application is displaying this error message:
ErrorException in CacheProvider.php line 32: Static function Atrauzzi\LaravelDoctrine\CacheProvider\CacheProvider::initialize() should not be abstract
I want to that line and the IDE is telling me that effectively the initialize() should not be abstract
:
Your package requires laravel/framework 5.*
Is there a way to use this with L4, other than using the 1.0.0 release (before the framework 5 dependency was added)?
When I try to install your package, I get this error from composer:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for atrauzzi/laravel-doctrine dev-master -> satisfiable by atrauzzi/laravel-doctrine[dev-master].
- atrauzzi/laravel-doctrine dev-master requires doctrine/migrations dev-master#46a031ddaea47d0685200027cfe8c83b02aee6f6 -> no matching package found.
It appears that it cannot find the version of doctrine/migrations
you have tagged in your composer.json
. I'd create a PR, but I'm not sure why you tagged that specific version of doctrine/migrations
...
Hello users of atrauzzi/laravel-doctrine!
We are working on a new package for laravel/doctrine integration and are writing a script that will be used to convert configuration files from atrauzzi/laravel-doctrine to this new package. Word on the street is that configuration files have changed enough between versions that we can't write just one template to cover all users.
So this issue is a survey to find out what version of laravel-doctrine you are using. What version do you use?
If we don't get enough input on a common version we will support the latest version.
Thanks!
Why I cannot find this command:
php app/console doctrine:mapping:import --force AcmeBlogBundle xml
here I mean mapping:import command.
I already replace this command:
php app/console doctrine:mapping:convert xml ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm --from-database --force
with
sudo vendor/bin/doctrine orm:convert-mapping xml '/var/www/html/laravel/package' --from-database --force
and worked well.
Looks like there's an issue with the migrations package:
atrauzzi/laravel-doctrine dev-master requires doctrine/migrations dev-master#46a031ddaea47d0685200027cfe8c83b02aee6f6 -> no matching package found.
Can you update your composer file?
Are you planning to add default authentication driver ?
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This driver manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
|
| Supported: "database", "eloquent"
|
*/
'driver' => 'doctrine',
To use the commonly used:
use Doctrine\ORM\Mapping as ORM;
The AnnotationReader can't be SimpleAnnotation Reader.
5th parameter of the createAnnotationMetadataConfiguration should be false:
$config = Setup::createAnnotationMetadataConfiguration(
Config::get('laravel-doctrine::doctrine.metadata'),
App::environment() == 'development',
Config::get('laravel-doctrine::doctrine.proxy_classes.directory'),
null,
false
);
How can this be done in mine side instead of yours?
Is anyone using this with Lumen?
I copied doctrine.php into the config directory in the root of my project.
in bootstrap/app.php
I added it as a service provider with:
$app->configure('doctrine');
$app->register('Atrauzzi\LaravelDoctrine\ServiceProvider');
But I get the error
I cannot seem to get it to work.
I keep getting the error
Fatal error: Uncaught exception 'ReflectionException' with message 'Class path.storage does not exist' in vendor/laravel/framework/src/Illuminate/Container/Container.php on line 776
Hi,
Is there a way to make the Authentification laravel driver working with your module ?
Could you please guide me to the the right direction on where I need to put the doctrine.php generated after run ./artisan config:publish atrauzzi/laravel-doctrine
? Thank you
I'm using laravel-doctrine in my project where I'm trying to implement reset password functionalities but actually the framework is creating a connection with the database using ConnectionFactory->createConnector that throws an error
InvalidArgumentException in ConnectionFactory.php line 189:
Unsupported driver [pdo_mysql]
This package for laravel 4.x I ran orm commands like this thread states:
But, how can I do the same for laravel 5?
The doctrine/migrations dep fails on composer install
Not sure why this happens, but this is after a fresh install. Maybe missing a depdency?
php artisan doctrine:schema:update
ATTENTION: This operation should not be executed in a production environment.
Obtaining metadata from your models...
PHP Fatal error: Class 'Doctrine\ORM\Tools\SchemaTool\SchemaTool' not found in /home/webuser/laravel/vendor/atrauzzi/laravel-doctrine/src/Atrauzzi/LaravelDoctrine/LaravelDoctrineServiceProvider.php on line 59
Out of interest are there any differences between the two packages?
This one seems to be a little more active, hence why I am asking
[ReflectionException] Class doctrine.metadata does not exist
When for example: php artisan doctrine:schema:create
I published config with command, and setup my database in doctrine.php.
Any idea?
So with a base install from master and the cli-config.php in the readme I've tried creating an entity in app/Domain/Entities and just in the root app directory. I get No Metadata Classes to process.
when I run vendor/bin/doctrine orm:schema:create
. How do I tell Doctrine where to find these classes with this package? Is it something I'm missing in the config? Where is it expecting to find annotated classes?
Currently this package cannot be installed via composer:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for atrauzzi/laravel-doctrine dev-master -> satisfiable by atrauzzi/laravel-doctrine[dev-master].
- atrauzzi/laravel-doctrine dev-master requires doctrine/migrations dev-master#46a031ddaea47d0685200027cfe8c83b02aee6f6 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
Hi,
I updated the laravel doctrine and found out there is a little mistake in the script:
$this->commands(
'Atrauzzi\LaravelDoctrine\Console\CreateSchemaCommand'
'Atrauzzi\LaravelDoctrine\Console\UpdateSchemaCommand',
'Atrauzzi\LaravelDoctrine\Console\DropSchemaCommand',
);
You forgot an comma on the first line. (It is on line: 153)
Hi,
How would one go about setting up http://doctrine-orm.readthedocs.org/en/latest/reference/filters.html using this package.
When trying to execute multiple unit-tests, I am getting the following error: Type json already exists.
This happens when the second unit-test is being executed. I assume that the APP is already initialized.
The error happens here. Any idea?
class ServiceProvider extends Base {
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot() {
Type::addType('json', '\Atrauzzi\LaravelDoctrine\Type\Json');
$this->publishes([__DIR__ .'/..'. '/config/doctrine.php'=> config_path('doctrine.php')], 'config');
$this->commands([
'Atrauzzi\LaravelDoctrine\Console\CreateSchemaCommand',
'Atrauzzi\LaravelDoctrine\Console\UpdateSchemaCommand',
'Atrauzzi\LaravelDoctrine\Console\DropSchemaCommand'
]);
}
Testing started at 11:16 AM ...
PHPUnit 4.6.4 by Sebastian Bergmann and contributors.
Type json already exists.
D:\Projects.fms\mapps1\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:218
D:\Projects.fms\mapps1\vendor\doctrine\dbal\lib\Doctrine\DBAL\Types\Type.php:193
D:\Projects.fms\mapps1\vendor\atrauzzi\laravel-doctrine\src\ServiceProvider.php:27
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Container\Container.php:523
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:701
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:683
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:684
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\BootProviders.php:15
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:181
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:195
D:\Projects.fms\mapps1\tests\TestCase.php:16
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Testing\ApplicationTrait.php:38
D:\Projects.fms\mapps1\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestCase.php:27
After merging pull request artisan doctrine:schema:update start to failing because lack of full namespace:
$this->app->singleton('Doctrine\ORM\Tools\SchemaTool', function ($app) {
return new SchemaTool($app['Doctrine\ORM\EntityManager']);
});
Fix:
use Doctrine\ORM\Tools\SchemaTool;
A recent commit to the doctrine/doctrine2 2.4 branch changed SchemaTool's constructor parameter type-hint from EntityManager to EntityManagerInterface. This breaks laravel-doctrine's method of using the IoC to instantiate the SchemaTool.
Their are other options to Doctrine migrations other then the comments notations system.
I do not like this system as it does not integrate well with any IDE and autocomplete and is outside of normal paradigms.
Doctrine can also use YAML or XML based schemas / migrations as i understand...
Hello again,
In issue #103 I've changed DB_CONNECTION
to mysql
and driver
for this connection to pdo_mysql
. Howere, now there is some issue when I register new user using default AuthController and Doctrine driver provided by this lib.
When I send POST request to localhost/auth/register
to register user I got:
InvalidArgumentException in ConnectionFactory.php line 189:
Unsupported driver [pdo_mysql]
I tried to debug, this. In ConnectionFactory class there's method
public function createConnector(array $config)
{
if (!isset($config['driver'])) {
throw new InvalidArgumentException('A driver must be specified.');
}
if ($this->container->bound($key = "db.connector.{$config['driver']}")) {
return $this->container->make($key);
}
switch ($config['driver']) {
case 'mysql':
return new MySqlConnector;
case 'pgsql':
return new PostgresConnector;
case 'sqlite':
return new SQLiteConnector;
case 'sqlsrv':
return new SqlServerConnector;
}
throw new InvalidArgumentException("Unsupported driver [{$config['driver']}]");
}
And I found that my $config['driver']
is set to pdo_mysql
as expected, but as we can see there's no pdo_mysql
in switch.
How to setup this driver correctly?
I need generate my proxies manually, since Doctrine 2 documentation suggest to do:
doctrine orm:generate-proxies
I mean, after a fresh install of this package, how can I make use of doctrine cli-command?
I installed the package exactly as the readme says, but I can't get it to work. When I run vendor/bin/doctrine
in my command line I get errors. Can someone help me?
My stack trace:
[2015-05-05 15:16:53] local.ERROR: exception 'ErrorException' with message 'Argument 2 passed to Symfony\Component\Debug\Exception\ClassNotFoundException::__construct() must be an instance of ErrorException, null given, called in /Users/Angelo/Code/klix/vendor/atrauzzi/laravel-doctrine/src/CacheFactory.php on line 31 and defined' in /Users/Angelo/Code/klix/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php:21
Stack trace:
#0 /Users/Angelo/Code/klix/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php(21): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(4096, 'Argument 2 pass...', '/Users/Angelo/C...', 21, Array)
#1 /Users/Angelo/Code/klix/vendor/atrauzzi/laravel-doctrine/src/CacheFactory.php(31): Symfony\Component\Debug\Exception\ClassNotFoundException->__construct('Class not found...', NULL)
#2 /Users/Angelo/Code/klix/vendor/atrauzzi/laravel-doctrine/src/ServiceProvider.php(221): Atrauzzi\LaravelDoctrine\CacheFactory::getCacheProvider('array', 'laravel')
#3 /Users/Angelo/Code/klix/vendor/atrauzzi/laravel-doctrine/src/ServiceProvider.php(48): Atrauzzi\LaravelDoctrine\ServiceProvider->createCache()
#4 /Users/Angelo/Code/klix/vendor/laravel/framework/src/Illuminate/Container/Container.php(773): Atrauzzi\LaravelDoctrine\ServiceProvider->Atrauzzi\LaravelDoctrine\{closure}(Object(Illuminate\Foundation\Application), Array)
#5 /Users/Angelo/Code/klix/vendor/laravel/framework/src/Illuminate/Container/Container.php(656): Illuminate\Container\Container->build(Object(Closure), Array)
#6 /Users/Angelo/Code/klix/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(644): Illuminate\Container\Container->make('Doctrine\\ORM\\En...', Array)
#7 /Users/Angelo/Code/klix/cli-config.php(16): Illuminate\Foundation\Application->make('Doctrine\\ORM\\En...')
#8 /Users/Angelo/Code/klix/vendor/doctrine/orm/bin/doctrine.php(55): require('/Users/Angelo/C...')
#9 /Users/Angelo/Code/klix/vendor/doctrine/orm/bin/doctrine(4): include('/Users/Angelo/C...')
#10 {main}
I am having this error message when try to run more than one unit test in my laravel project at the same time
"Doctrine\DBAL\DBALException: Type json already exists."
I found the error is in line 24 in file src/ServiceProvider
Type::addType('json', '\Atrauzzi\LaravelDoctrine\Type\Json');
I dont know if this is the better way but for the moment I am solving it asking first if the type json already exists
if (!Type::hasType("json"))
Type::addType('json', '\Atrauzzi\LaravelDoctrine\Type\Json');
I'm not sure whether is a problem with the package, most likely not.
Caching with APC does not have any effect on queries. I've described the issue with more details here: http://stackoverflow.com/questions/19677799/laravel4-doctrine-not-using-apc-cache
can`t install your package.
problem with this line in your composer.json
"doctrine/migrations": "dev-master#46a031ddaea47d0685200027cfe8c83b02aee6f6",
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.