Development

ReservedWords

You must first sign up to be able to contribute.

Version 9 (modified by Xantos, 6 years ago)
--

Original idea from dwhittle in mailing list, here is a list of reserved words with typical error. Feel free to add your own.

Class/Table Name

  • Criteria :
    Fatal error: Call to undefined method Criteria::setOffset() in symfony\addon\propel\sfPropelPager.class.php on line 48
    
  • Order, Group, From… and any SQL reserved word :
    [wrapped: Could not execute query [Native Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version 
    for the right syntax to use near 'order' at line 1] [User Info: SELECT COUNT(order.ID) FROM order]]
    
  • Location - a table of this name will not allow propel:build-all to be run
    Cannot fetch TableMap for undefined table: location.  Make sure you have the static MapBuilder registration code after your peer stub class definition.
    
  • Security, Context, Request, Response… and all the protected attributes of sfActions : No direct error, but in auto-generated admin modules, the fact that the actions define $this->"singularName" will overwrite the original value, and breaks down everything.

  • the word "database" (at least in Symfony 1.0.16) gives this error doing a data dump:
    [wrapped: Could not execute query [Native Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version 
    for the right syntax to use near 'order' at line 1] [User Info: SELECT * FROM database]]
    
  • a classname (in the schema.yml) which ends with '%Actions' for example UserActions? (symfony 1.4.10). An error was thrown when i added an extra field (with validation) in the form of the object related to this '*Actions'.
    wrapped: Warning: Missing argument 2 for sfComponent::__construct(), called in 
    /Users/Shared/Library/symfony-1.4.10/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php 
    on line 301 and defined in /Users/Shared/Library/symfony-1.4.10/lib/action/sfComponent.class.php on line 36 
    Warning: Missing argument 3 for sfComponent::__construct(), called in 
    /Users/Shared/Library/symfony-1.4.10/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php 
    on line 301 and defined in /Users/Shared/Library/symfony-1.4.10/lib/action/sfComponent.class.php on line 36]
    

Module Name

  • sf
  • default : Not tested, but could confuse the config manager for module-dependent config files (cache.yml, security.yml)
  • global : If you try to access this module partials/component symfony will ignore them and use /app/YOUR_APP/templates/ ones

Action Name

  • default : Not tested, but could confuse the config manager for action-dependent config files (security.yml)

Application Name

Project Name

Environment Name

  • all : Not tested, but could confuse config manager for all the env-dependants config files.