Comments (7)
I'm on cloudControl, too. That was the main reason, why I added schema inheritance support in the first place, to be able to alter that exact database
attribute (by now there are way more changes to the user model).
Imho, it's solved and it's handled in a nice way.
You can alter the database
package
attribute as I mentioned. Then you got your generated files in place and committed into git.
from propelbundle.
Ok, I'll try again.
from propelbundle.
It works mostly, but I still have a little snag:
Fatal error: Cannot redeclare class FOS\UserBundle\Propel\User in .../src/FOS/UserBundle/Propel/User.php on line 22
The FOSUserbundle has these classes also.
from propelbundle.
My guess would be, you got your autoloader configured the wrong way. Make sure the src/..
directory is listed before the vendor/..
one related to the FOS
namespace.
You also should apply the changes from the bundle to the generated classes, like implemented interfaces (e.g. Group
).
from propelbundle.
Thanks, I modified the autoload.php like you said
My autoloader now has this:
'Propel' => __DIR__.'/../vendor/bundles',
'FOS' => array(__DIR__.'/../src/', __DIR__.'/../vendor/bundles'),```
The error is still there.
The strange thing is that I only see the error when I run my unit test WITH code coverage:
phpunit -c app --log-junit "../reports/testresult.xml" --coverage-clover "../reports/coverage.xml
Just navigating the website gives no error....
from propelbundle.
No, that's not what I meant. I mean something like:
<?php
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'FOS\UserBundle\Propel' => __DIR__.'/../src/',
'FOS' => __DIR__.'/../vendor/bundles',
));
from propelbundle.
EDIT: Just hit enter when you we're typing I guess. Strange that it works with how I setup the autoload. However I changed it to what you said, that makes more sense. Thanks again
I found my mistake!
I had made a FOSUserBundle, didn't read it right. I changed it to:
namespace FOS\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use FOS\UserBundle\FOSUserBundle;
class UserBundle extends FOSUserBundle
{
}
Now It's all working fine
Just one thing: putting the schema.yml in my bundle didn't override the one from the FOS bundle. I put it in app/Resources like it states in the FOS manual and then it overrides correctly and I get my classes in my 'UserBundle'.
from propelbundle.
Related Issues (20)
- Slave connection is not working.
- ConnectionWrapper::useDebug = true prevents prepared statements from being closed properly HOT 1
- [1.6] Wrong allowedTypes HOT 5
- Symfony 3.4 + Save method not working HOT 1
- Symfony 3.4 + Unique Fields validation not working HOT 1
- Symfony 4.x compatibility HOT 1
- Symfony 3.4 + How to print sql query
- Symfony 3.4 Flex `The "propel.logger" service is private` deprecation notice HOT 2
- Symfony 3.4 Flex - `PropelDataCollector` without `reset()` method HOT 1
- Tag for branch 4.0 HOT 7
- 3.0 Update propel/propel to allow use of latest alpha HOT 1
- FileLocator issue on PropelBundle 4.0 HOT 3
- sluggable behavior: FatalThrowableError - Unsupported operand types HOT 1
- Syfmony 4.1 + How to generate mode
- Unable to use foreign keys across schemas HOT 1
- Uncaught PDOException: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected HOT 1
- Cannot require branch 4.0? HOT 5
- branch 3.0 PropelDataCollector cloneVar bug using Symfony 2.8-3.1 HOT 1
- Compatibility with symfony 5.x and PHP 8 HOT 7
- Final 1.6 release?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from propelbundle.