Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacking in support for dbal result cache #165

Closed
wants to merge 1 commit into from

Conversation

intel352
Copy link

Refs #114

This is hacked-in support. Some of the code may be usable, but really this shows that some refactoring is needed so that cache support isn't limited to ORM only.

Please do not merge in this code, just submitting it so that others can see where modifications are needed and run with it. I pretty much have no clue re: the XSD changes, but I didn't get any errors out of Symfony2 or PHPStorm with my changes. Regardless, even the XSD changes need refactoring, as the cache type definitions should be moved into a reusable location in the schema imho (so that it's accessible by both dbal and orm namespaces).

Also, this has only been tested with Service type cache instance. I don't have the time to attempt this proper.

@@ -54,7 +59,7 @@
</xsd:choice>

<xsd:attribute name="default-connection" type="xsd:string" />
<xsd:attributeGroup ref="connection-config" />
<xsd:attribute name="connection-config" type="connection-config" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. You cannot have an attribute being a complexType.

@stof
Copy link
Member

stof commented Mar 13, 2013

btw, there is issues with your changes in the XSD. See the testsuite failures.

@intel352
Copy link
Author

I expect there are numerous flaws in this PR, as it's a cheap hack to the PHP lib, with a failed attempt to update the xsd (without real understanding on my part regarding valid XSD schema). I'd never suggest anyone ever use this code either, except to perhaps see possible entry points for refactoring to support DBAL cache :-)

Hopefully someone else will get inspired, as I'm slammed with a late deadline for the next several weeks :-\

@beberlei beberlei closed this May 4, 2013
@beberlei
Copy link
Member

beberlei commented May 4, 2013

You can add this kind of code with a compiler pass if you need it for your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants