Anyone tried to use Doctrine?

Discussion about the open-source Phalanger [?] project.

Anyone tried to use Doctrine?

Postby Remo » August 23rd, 2012, 3:18 pm

I'm currently trying to run a few different applications we've built on Phalanger. I'm still impressed with some features but it looks like all the projects I'm trying to run on Phalanger have some quirks making it rather difficult.

Right now, I'm looking at Doctrine, a nice ORM library.
I was able to fix a few very minor things but I'm stuck with this error:

Error: (): Argument 'cacheImpl' must be of type 'Doctrine\Common\Cache\Cache' in C:\Users\Remo Laubacher\whole-in-one\ServerPrototypes\Phalanger\Doctrine\ORM\Configuration.php on line 321, column 48.


The line number seems to be wrong, it points to a comment. It's actually line 276 which causes the problem:

Code: Select all
    /**
     * Sets the cache driver implementation that is used for metadata caching.
     *
     * @param \Doctrine\Common\Cache\Cache $cacheImpl
     */
    public function setMetadataCacheImpl(Cache $cacheImpl)
    {
        $this->_attributes['metadataCacheImpl'] = $cacheImpl;
    }


I'm able to avoid this error if I remove the type and use something like this:
Code: Select all
    /**
     * Sets the cache driver implementation that is used for metadata caching.
     *
     * @param \Doctrine\Common\Cache\Cache $cacheImpl
     */
    public function setMetadataCacheImpl($cacheImpl)
    {
        $this->_attributes['metadataCacheImpl'] = $cacheImpl;
    }


However, I already removed 20 of them and I kind of have the impression that there's a lot more, Doctrine has a lot of files. Maybe someone out there has already done some work with Doctrine?

UPDATE: I just realized that even if I could get around those issues, I'd have to wait or implement PDO myself. At least according to this page http://wiki.php-compiler.net/Compatibility

UPDATE2: I just saw that there's someone working on it https://github.com/DEVSENSE/Phalanger/t ... nsions/PDO
Remo
 
Posts: 17
Joined: August 17th, 2012, 3:25 pm

Re: Anyone tried to use Doctrine?

Postby Remo » August 23rd, 2012, 4:09 pm

it's much less than I thought, the attached diff fixes the compile time errors. I still have to solve a few issues but it compiles for now..
You do not have the required permissions to view the files attached to this post.
Remo
 
Posts: 17
Joined: August 17th, 2012, 3:25 pm

Re: Anyone tried to use Doctrine?

Postby Remo » August 23rd, 2012, 4:22 pm

I'm again stuck with reflections )-:
It's not really a surprise but Doctrine uses a lot of them. I managed to find an alternative to ReflectionClass::getNamespaceName but ReflectionClass::getDocComment is annoying..

Anyone got an idea before I give up?
Remo
 
Posts: 17
Joined: August 17th, 2012, 3:25 pm

Re: Anyone tried to use Doctrine?

Postby Jakub Misek » August 24th, 2012, 10:40 am

ReflectionClass::getNamespaceName() can be easily implemented if it helps.

ReflectionClass::getDocComment() is not so easy ... Anyone can implement it into opensource branch. Or we can do custom implementations for hourly rates - in such case please contact me directly via email below.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Anyone tried to use Doctrine?

Postby Remo » August 24th, 2012, 11:05 am

I'm afraid but I don't have any budget for this, I'm just interested to see what kind of projects I can run on Phalanger to see the potential for future projects. Right now there are no customers involved. Before I start using Phalanger for real, I have to be sure that it can deliver what I need..
Remo
 
Posts: 17
Joined: August 17th, 2012, 3:25 pm

Re: Anyone tried to use Doctrine?

Postby Jakub Misek » August 24th, 2012, 12:19 pm

No problem, these features will be implemented sooner or later. Good thing about Phalanger is, if something is missing or performs slower - it can be improved and included in official release in very short time.

Are you using installation package or do compile Phalanger from sources (https://github.com/DEVSENSE/Phalanger) ? With the second option you can test latest feature immediately.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Anyone tried to use Doctrine?

Postby Remo » August 24th, 2012, 12:27 pm

I did compile PDO from Github but I haven't compiled everything yet. Seems like the VS Express edition I have is a bit annoying with multiple projects.. But I'll make sure that I have a working Github-Phalanger version. Command line compilation is nice as well ;-)
Remo
 
Posts: 17
Joined: August 17th, 2012, 3:25 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 7 guests

cron

User Control Panel

Login

Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 297 on March 29th, 2024, 7:06 am

Users browsing this forum: No registered users and 7 guests