Skip to content

Update how to add custom Type #2725

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

Closed
wants to merge 2 commits into from
Closed

Update how to add custom Type #2725

wants to merge 2 commits into from

Conversation

metfan
Copy link

@metfan metfan commented Jun 13, 2013

Since 2.3, we can't use anymore $this->factory->addType() t add custom Type to factory. We have to use PreloadedExtension class.

New in sf2.3, update the way we have to use to add custom Type.
$childType = new TestChildType();
return array(new PreloadedExtension(array(
$childType->getName() => $childType
), array()));
Copy link
Member

Choose a reason for hiding this comment

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

this should be indented one level less

@wouterj
Copy link
Member

wouterj commented Jun 13, 2013

I made some comments, but except from those I'm +1. What you need to do to fix those comments is going to http://github.com/metfan/symfony-docs/tree/patch-1 then go to the file, edit it and commit it.

@marekkalnik
Copy link
Contributor

👍

@xabbuh
Copy link
Member

xabbuh commented Jun 22, 2013

👍 This should fix #2485.

@velovint
Copy link

ship it

weaverryan added a commit that referenced this pull request Jun 30, 2013
@weaverryan weaverryan mentioned this pull request Jun 30, 2013
@weaverryan
Copy link
Member

Hey Ulrich and everyone else!

This looks awesome - very nice work! It looks like this is a valid solution all the way back to at least Symfony 2.2 (which is the oldest version we are supporting and care about). So, I've patched this into the 2.2 branch at sha: 83641f8 and sha: 755065f

Thanks!

@weaverryan weaverryan closed this Jun 30, 2013
@marekkalnik
Copy link
Contributor

thanks @weaverryan !

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.

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy