goalioremembermedoctrineorm's People
Forkers
vadexito fgruntjes ufomelkor bsahlhof bartcich ojhaujjwal alphalives maxnuf andrconstruction samsonasikgoalioremembermedoctrineorm's Issues
Loading the Metadata for GoalioRememberMeDoctrineORM\Entity\RememberMe
there seems to be a problem because the onbootstrap of the GoalioRememberMeModuleORM (where an authenticate event is triggered) is called after the one of the GoalioRememberMe module (where the entity xml configuration for the entity GoalioRememberMeDoctrineORM\Entity\RememberMe is loaded : i have got this error :
Fatal error: Uncaught exception 'Doctrine\Common\Persistence\Mapping\MappingException' with message 'The class 'GoalioRememberMeDoctrineORM\Entity\RememberMe' was not found in the chain configured namespaces XXX' in X\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php:38 Stack trace: #0 X\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain.php(114): Doctrine\Common\Persistence\Mapping\MappingException::classNotFoundInNamespaces('GoalioRememberM...', Array) #1 X\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php(113): Doctrine\Common\Persistence\Mappin in X\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php on line 38
i solved the problem in uncommenting the line 'remember_me_entity_class' => 'GoalioRememberMe\Entity\RememberMe' in the goaliorememberme.global.php config...but I am not sure it is the best solution....
Tag version
Could you tag a new version? Last stable (0.1) is not working. Thank a lot :-)
GoalioRememberMeDoctrineORM\Repository\RememberMe not found
An error occurs when a user wants to log out after a rememberMe connection.
Undefined method 'deleteByUidAndSid'. The method name must start with either findBy or findOneBy!
Explication :
In RememberMe Mapper class, the expression "$this->em->getRepository($this->options->getRememberMeEntityClass());" return a "Doctrine\ORM\EntityRepository"
but the expected class is "GoalioRememberMeDoctrineORM\Repository\RememberMe".
I can't find a fix ... That's why a propose to migrate the "GoalioRememberMeDoctrineORM\Repository\RememberMe" functions content directly in RememberMe Mapper.
This module is not working.
It's full of errors. Please contact me at [email protected] to test with me.
Thanks
ZfcUser 1.0.0 update
Could you update dependency of this to work with ZfcUser 1.0.0? It says that it need ZfcUser 0.1.1.
Thanks
Doctrine update compatibility
Do you plan to update your DoctrineORM modules to ensure compatibility with doctrine orm module v.1.* ?
RememberMe Mapper must be refactored to avoid sql injections problem
Hi,
Concatenating strings to build a query is dangerous! The user could use it's cookie value to inject malicious code.
In Mapper\RememberMe:
public function removeAll($userId)
{
$dql = sprintf("DELETE %s u WHERE u.user_id = %s", $this->options->getRememberMeEntityClass(), $userId);
$query = $this->em->createQuery($dql);
$query->getResult();
}
public function removeSerie($userId, $serieId)
{
$dql = sprintf("DELETE %s u WHERE u.user_id = %s AND u.sid = '%s'", $this->options->getRememberMeEntityClass(), $userId, $serieId);
$query = $this->em->createQuery($dql);
$query->getResult();
}
Should be replaced by :
public function removeAll($userId)
{
$er = $this->em->getRepository($this->options->getRememberMeEntityClass());
return $er->deleteByUid($userId);
}
public function removeSerie($userId, $serieId)
{
$er = $this->em->getRepository($this->options->getRememberMeEntityClass());
return $er->deleteByUidAndSid($userId,$serieId);
}
Then in our entity repository we add :
public function deleteByUid($uid)
{
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->delete('RememberMe','r')
->where('r.uid = :uid')
->setParameter('uid', $uid);
return $qb->getQuery()->getSingleScalarResult();
}
public function deleteByUidAndSid($uid,$sid)
{
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->delete('RememberMe','r')
->where('r.uid = :uid')
->andWhere('r.sid = :sid')
->setParameter('uid', $uid)
->setParameter('sid', $sid);
return $qb->getQuery()->getSingleScalarResult();
}
The main advantage of moving the query building work to the repository is that it makes the mapper db-agnostic as it relies on the entity repository for every call. Not just for the select calls, as it is today in your version. It's more coherent.
Install with composer
Hi, how is it possible to install it with composer?
I tried using:
"goalio/goalio-rememberme-doctrine-orm": "dev-master",
without success...
Create a repo for the doctrine mongodb odm as well
I will make the appropriate changes
typos namespace, doctrine config
- namespace in GoalioRememberMeDoctrineORM\Options\ModuleOptions has a typo
- in module.config.php, i think the configuration should be (no 'DoctrinORM in the orm_default config)
'doctrine' => array(
'driver' => array(
'goaliorememberme_entity' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\XmlDriver',
'paths' => DIR . '/xml/goaliorememberme'
),
'orm_default' => array(
'drivers' => array(
'GoalioRememberMe\Entity' => 'goaliorememberme_entity'
)
)
)
doctrine primary key needed
It seems as if doctrine needs a primary key for each entity therefore i would suggest in the file GoalioRememberMe.Entity.RememberMe.dcm.xml
to change the sid field iinto an id :
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.