This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier 9e97e687b7 merged branch Burgov/add_error_on_wrong_type (PR #2859)
Commits
-------

d97d7e9 Added a check to see if the type is a string if it's not a FormTypeInterface

Discussion
----------

Add exception on wrong type

When you forget to extend AbstractType in your form type, and then try to create a named builder from it, the error message is quite confusing:

Expected argument of type "string", "Samson\InvoiceBundle\Form\Type\PaymentTermsType" given (from the getType() method)

This PR checks for the right type at the relevant place

---------------------------------------------------------------------------

by stloyd at 2011/12/13 03:00:29 -0800

IMO you should add an test for this.

---------------------------------------------------------------------------

by Burgov at 2011/12/13 03:11:50 -0800

@stloyd done

---------------------------------------------------------------------------

by fabpot at 2011/12/13 03:27:08 -0800

@Burgov: Looks good to me. Can you squash your commits before I merge this PR? Thanks.

---------------------------------------------------------------------------

by Burgov at 2011/12/13 03:29:00 -0800

@fabpot done!
2011-12-13 12:29:53 +01:00
src/Symfony Added a check to see if the type is a string if it's not a FormTypeInterface 2011-12-13 12:27:51 +01:00
tests Added a check to see if the type is a string if it's not a FormTypeInterface 2011-12-13 12:27:51 +01:00
.gitignore Added vendor directory to .gitignore 2010-06-24 10:44:28 +02:00
.travis.yml tweaked travis configuration 2011-11-22 20:12:00 +01:00
autoload.php.dist fixed autoloader when tests are run on a machine without intl installed 2011-07-20 14:27:10 +02:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.7 2011-12-08 15:17:21 +01:00
check_cs fixed root search path to include only './src' and './tests' 2011-06-08 18:11:05 +02:00
composer.json fixed doctrine/common requirements 2011-12-08 15:17:21 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.7 2011-12-08 15:17:21 +01:00
LICENSE added the LICENSE file for the YAML component 2011-02-18 11:52:11 +01:00
phpunit.xml.dist [Security] cleaned up opt-in to benchmark test 2011-03-06 20:06:13 +01:00
README.md point the status icon to 2.0 2011-11-22 20:15:25 +01:00
UPDATE.ja.md updated translation of UPDATE file (Japanese RC5 added) 2011-07-30 02:08:25 +09:00
UPDATE.md UPDATE.md: trivial markdown syntax fix 2011-11-15 10:19:29 -08:00
vendors.php updated vendors for 2.0.7 2011-12-08 14:59:35 +01:00

README

Build Status

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.2 and up.

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.