Changeset 6365
- Timestamp:
- 12/07/07 17:03:14 (10 months ago)
- Files:
-
- trunk/UPGRADE (modified) (3 diffs)
- trunk/data/config/factories.yml (modified) (2 diffs)
- trunk/data/skeleton/app/app/config/factories.yml (modified) (2 diffs)
- trunk/lib/cache/sfAPCCache.class.php (modified) (8 diffs)
- trunk/lib/cache/sfCache.class.php (modified) (3 diffs)
- trunk/lib/cache/sfEAcceleratorCache.class.php (modified) (10 diffs)
- trunk/lib/cache/sfFileCache.class.php (modified) (9 diffs)
- trunk/lib/cache/sfMemcacheCache.class.php (modified) (12 diffs)
- trunk/lib/cache/sfSQLiteCache.class.php (modified) (2 diffs)
- trunk/lib/cache/sfXCacheCache.class.php (modified) (10 diffs)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/backend/config/config.php (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/backend/config/factories.yml (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/backend/config/settings.yml (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/crud/config/config.php (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/crud/config/factories.yml (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/crud/config/settings.yml (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/config/propel.ini (modified) (1 diff)
- trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/data/environment.migrated (added)
- trunk/lib/task/project/upgrade1.1/sfAutoloadingUpgrade.class.php (modified) (2 diffs)
- trunk/test/functional/fixtures/project/apps/cache/config/config.php (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/cache/config/factories.yml (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/cache/config/settings.yml (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/frontend/config/config.php (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/frontend/config/factories.yml (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/frontend/config/settings.yml (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/i18n/config/config.php (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/i18n/config/factories.yml (modified) (1 diff)
- trunk/test/functional/fixtures/project/apps/i18n/config/settings.yml (modified) (1 diff)
- trunk/test/functional/fixtures/project/config/propel.ini (modified) (2 diffs)
- trunk/test/functional/fixtures/project/data/environment.migrated (added)
- trunk/test/unit/cache/sfCacheDriverTests.class.php (modified) (1 diff)
- trunk/test/unit/cache/sfFileCacheTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/UPGRADE
r5493 r6365 101 101 class: sfFileCache 102 102 param: 103 automaticCleaningFactor: 0 104 cacheDir: %SF_I18N_CACHE_DIR% 105 lifetime: 86400 103 automatic_cleaning_factor: 0 104 cache_dir: %SF_I18N_CACHE_DIR% 105 lifetime: 86400 106 prefix: %SF_APP_DIR% 106 107 107 108 routing: … … 146 147 The `project:upgrade1.1` task makes all those changes for you. 147 148 148 sfFunctionCache 149 Cache Framework 149 150 --------------- 150 151 151 The sfFunctionCache object does not extend sfFileCacheanymore.152 The `sfFunctionCache` class does not extend `sfFileCache` anymore. 152 153 You must now pass a cache object to the constructor. 153 154 The first argument to ->call() must now be a PHP callable. 155 156 Some `sfCache` configuration parameter have changed their named to underscore names: 157 158 * automaticCleaningFactor -> automatic_cleaning_factor 159 * cacheDir -> cache_dir 160 161 The `project:upgrade1.1` task makes all those changes for you. 154 162 155 163 Autoloading … … 261 269 If you use the symfony 1.0 interface for validation, your custom validators must 262 270 now extend the `sfValidatorBase` class. 271 trunk/data/config/factories.yml
r5844 r6365 20 20 class: sfFileCache 21 21 param: 22 automaticCleaningFactor: 0 23 cacheDir: %SF_TEMPLATE_CACHE_DIR% 24 lifetime: 86400 22 automatic_cleaning_factor: 0 23 cache_dir: %SF_TEMPLATE_CACHE_DIR% 24 lifetime: 86400 25 prefix: %SF_APP_DIR% 25 26 26 27 i18n: … … 30 31 class: sfFileCache 31 32 param: 32 automaticCleaningFactor: 0 33 cacheDir: %SF_I18N_CACHE_DIR% 34 lifetime: 86400 33 automatic_cleaning_factor: 0 34 cache_dir: %SF_I18N_CACHE_DIR% 35 lifetime: 86400 36 prefix: %SF_APP_DIR% 35 37 36 38 routing: trunk/data/skeleton/app/app/config/factories.yml
r4890 r6365 41 41 # class: sfFileCache 42 42 # param: 43 # automaticCleaningFactor: 0 44 # cacheDir: %SF_TEMPLATE_CACHE_DIR% 45 # lifetime: 86400 43 # automatic_cleaning_factor: 0 44 # cache_dir: %SF_TEMPLATE_CACHE_DIR% 45 # lifetime: 86400 46 # prefix: %SF_APP_DIR% 46 47 # 47 48 # i18n: … … 51 52 # class: sfFileCache 52 53 # param: 53 # automaticCleaningFactor: 0 54 # cacheDir: %SF_I18N_CACHE_DIR% 55 # lifetime: 86400 54 # automatic_cleaning_factor: 0 55 # cache_dir: %SF_I18N_CACHE_DIR% 56 # lifetime: 86400 57 # prefix: %SF_APP_DIR% 56 58 # 57 59 # routing: trunk/lib/cache/sfAPCCache.class.php
r6363 r6365 19 19 class sfAPCCache extends sfCache 20 20 { 21 protected $prefix = '';22 23 21 /** 24 22 * Initializes this sfCache instance. … … 38 36 throw new sfInitializationException('You must have APC installed and enabled to use sfAPCCache class.'); 39 37 } 40 41 $this->prefix = md5(sfConfig::get('sf_app_dir')).self::SEPARATOR;42 38 } 43 39 … … 47 43 public function get($key, $default = null) 48 44 { 49 $value = apc_fetch($this-> prefix.$key);45 $value = apc_fetch($this->getOption('prefix').$key); 50 46 51 47 return false === $value ? $default : $value; … … 57 53 public function has($key) 58 54 { 59 return !(false === apc_fetch($this-> prefix.$key));55 return !(false === apc_fetch($this->getOption('prefix').$key)); 60 56 } 61 57 … … 65 61 public function set($key, $data, $lifetime = null) 66 62 { 67 return apc_store($this-> prefix.$key, $data, $this->getLifetime($lifetime));63 return apc_store($this->getOption('prefix').$key, $data, $this->getLifetime($lifetime)); 68 64 } 69 65 … … 73 69 public function remove($key) 74 70 { 75 return apc_delete($this-> prefix.$key);71 return apc_delete($this->getOption('prefix').$key); 76 72 } 77 73 … … 124 120 } 125 121 126 $regexp = self::patternToRegexp($this-> prefix.$pattern);122 $regexp = self::patternToRegexp($this->getOption('prefix').$pattern); 127 123 128 124 foreach ($infos['cache_list'] as $info) … … 143 139 foreach ($infos['cache_list'] as $info) 144 140 { 145 if ($this-> prefix.$key == $info['info'])141 if ($this->getOption('prefix').$key == $info['info']) 146 142 { 147 143 return $info; trunk/lib/cache/sfCache.class.php
r6363 r6365 24 24 25 25 protected 26 $options = array(); 26 $options = array(), 27 $prefix = ''; 27 28 28 29 /** … … 43 44 * Available options: 44 45 * 45 * * automatic CleaningFactor (optional): The automatic cleaning process destroy too old (for the given life time) (default value: 1000)46 * * automatic_cleaning_factor: The automatic cleaning process destroy too old (for the given life time) (default value: 1000) 46 47 * cache files when a new cache file is written. 47 48 * 0 => no automatic cache cleaning … … 55 56 public function initialize($options = array()) 56 57 { 57 $this->options = array_merge(array('automaticCleaningFactor' => 1000, 'lifetime' => 86400), $options); 58 $this->options = array_merge(array( 59 'automatic_cleaning_factor' => 1000, 60 'lifetime' => 86400, 61 'prefix' => md5(dirname(__FILE__)), 62 ), $options); 63 64 $this->options['prefix'] .= self::SEPARATOR; 58 65 } 59 66 trunk/lib/cache/sfEAcceleratorCache.class.php
r6363 r6365 19 19 class sfEAcceleratorCache extends sfCache 20 20 { 21 protected $prefix = '';22 23 21 /** 24 22 * Initializes this sfCache instance. … … 38 36 throw new sfInitializationException('You must have EAccelerator installed and enabled to use sfEAcceleratorCache class (or perhaps you forgot to add --with-eaccelerator-shared-memory when installing).'); 39 37 } 40 41 $this->prefix = md5(sfConfig::get('sf_app_dir')).self::SEPARATOR;42 38 } 43 39 … … 47 43 public function get($key, $default = null) 48 44 { 49 $value = eaccelerator_get($this-> prefix.$key);45 $value = eaccelerator_get($this->getOption('prefix').$key); 50 46 51 47 return is_null($value) ? $default : $value; … … 57 53 public function has($key) 58 54 { 59 return !is_null(eaccelerator_get($this-> prefix.$key));55 return !is_null(eaccelerator_get($this->getOption('prefix').$key)); 60 56 } 61 57 … … 65 61 public function set($key, $data, $lifetime = null) 66 62 { 67 return eaccelerator_put($this-> prefix.$key, $data, $this->getLifetime($lifetime));63 return eaccelerator_put($this->getOption('prefix').$key, $data, $this->getLifetime($lifetime)); 68 64 } 69 65 … … 73 69 public function remove($key) 74 70 { 75 return eaccelerator_rm($this-> prefix.$key);71 return eaccelerator_rm($this->getOption('prefix').$key); 76 72 } 77 73 … … 85 81 if (is_array($infos)) 86 82 { 87 $regexp = self::patternToRegexp($this-> prefix.$pattern);83 $regexp = self::patternToRegexp($this->getOption('prefix').$pattern); 88 84 89 85 foreach ($infos as $info) … … 91 87 if (preg_match($regexp, $info['name'])) 92 88 { 93 eaccelerator_rm($this-> prefix.$key);89 eaccelerator_rm($this->getOption('prefix').$key); 94 90 } 95 91 } … … 112 108 foreach ($infos as $info) 113 109 { 114 if (false !== strpos($info['name'], $this-> prefix))110 if (false !== strpos($info['name'], $this->getOption('prefix'))) 115 111 { 116 112 // eaccelerator bug (http://eaccelerator.net/ticket/287) … … 161 157 foreach ($infos as $info) 162 158 { 163 if ($this-> prefix.$key == $info['name'])159 if ($this->getOption('prefix').$key == $info['name']) 164 160 { 165 161 return $info; trunk/lib/cache/sfFileCache.class.php
r6363 r6365 30 30 * Available options: 31 31 * 32 * * cache Dir: The directory where to put cache files32 * * cache_dir: The directory where to put cache files 33 33 * 34 34 * * see sfCache for options available for all drivers … … 40 40 parent::initialize($options); 41 41 42 if (!$this->getOption('cache Dir'))43 { 44 throw new sfInitializationException('You must pass a "cache Dir" option to initialize a sfFileCache object.');45 } 46 47 $this->set CacheDir($this->getOption('cacheDir'));42 if (!$this->getOption('cache_dir')) 43 { 44 throw new sfInitializationException('You must pass a "cache_dir" option to initialize a sfFileCache object.'); 45 } 46 47 $this->setcache_dir($this->getOption('cache_dir')); 48 48 } 49 49 … … 74 74 public function set($key, $data, $lifetime = null) 75 75 { 76 if ($this->getOption('automatic CleaningFactor') > 0 && rand(1, $this->getOption('automaticCleaningFactor')) == 1)76 if ($this->getOption('automatic_cleaning_factor') > 0 && rand(1, $this->getOption('automatic_cleaning_factor')) == 1) 77 77 { 78 78 $this->clean(sfCache::OLD); … … 101 101 $regexp = self::patternToRegexp($pattern); 102 102 $paths = array(); 103 foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getOption('cache Dir'))) as $path)103 foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getOption('cache_dir'))) as $path) 104 104 { 105 if (preg_match($regexp, str_replace($this->getOption('cache Dir').DIRECTORY_SEPARATOR, '', $path)))105 if (preg_match($regexp, str_replace($this->getOption('cache_dir').DIRECTORY_SEPARATOR, '', $path))) 106 106 { 107 107 $paths[] = $path; … … 111 111 else 112 112 { 113 $paths = glob($this->getOption('cache Dir').DIRECTORY_SEPARATOR.str_replace(sfCache::SEPARATOR, DIRECTORY_SEPARATOR, $pattern).self::EXTENSION);113 $paths = glob($this->getOption('cache_dir').DIRECTORY_SEPARATOR.str_replace(sfCache::SEPARATOR, DIRECTORY_SEPARATOR, $pattern).self::EXTENSION); 114 114 } 115 115 … … 132 132 public function clean($mode = sfCache::ALL) 133 133 { 134 if (!is_dir($this->getOption('cache Dir')))134 if (!is_dir($this->getOption('cache_dir'))) 135 135 { 136 136 return true; … … 138 138 139 139 $result = true; 140 foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getOption('cache Dir'))) as $file)140 foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getOption('cache_dir'))) as $file) 141 141 { 142 142 if (sfCache::ALL == $mode || time() > $this->read($file, self::READ_TIMEOUT)) … … 190 190 protected function getFilePath($key) 191 191 { 192 return $this->getOption('cache Dir').DIRECTORY_SEPARATOR.str_replace(sfCache::SEPARATOR, DIRECTORY_SEPARATOR, $key).self::EXTENSION;192 return $this->getOption('cache_dir').DIRECTORY_SEPARATOR.str_replace(sfCache::SEPARATOR, DIRECTORY_SEPARATOR, $key).self::EXTENSION; 193 193 } 194 194 … … 294 294 * @param string The directory where to put the cache files 295 295 */ 296 protected function set CacheDir($cacheDir)296 protected function setcache_dir($cache_dir) 297 297 { 298 298 // remove last DIRECTORY_SEPARATOR 299 if (DIRECTORY_SEPARATOR == substr($cache Dir, -1))300 { 301 $cache Dir = substr($cacheDir, 0, -1);299 if (DIRECTORY_SEPARATOR == substr($cache_dir, -1)) 300 { 301 $cache_dir = substr($cache_dir, 0, -1); 302 302 } 303 303 304 304 // create cache dir if needed 305 if (!is_dir($cache Dir))305 if (!is_dir($cache_dir)) 306 306 { 307 307 $current_umask = umask(0000); 308 @mkdir($cache Dir, 0777, true);308 @mkdir($cache_dir, 0777, true); 309 309 umask($current_umask); 310 310 } trunk/lib/cache/sfMemcacheCache.class.php
r6363 r6365 20 20 { 21 21 protected 22 $prefix = '',23 22 $memcache = null; 24 23 … … 48 47 throw new sfInitializationException('You must have memcache installed and enabled to use sfMemcacheCache class.'); 49 48 } 50 51 $this->prefix = md5(sfConfig::get('sf_app_dir')).self::SEPARATOR;52 49 53 50 if ($this->getOption('memcache')) … … 91 88 public function get($key, $default = null) 92 89 { 93 $value = $this->memcache->get($this-> prefix.$key);90 $value = $this->memcache->get($this->getOption('prefix').$key); 94 91 95 92 return false === $value ? $default : $value; … … 101 98 public function has($key) 102 99 { 103 return !(false === $this->memcache->get($this-> prefix.$key));100 return !(false === $this->memcache->get($this->getOption('prefix').$key)); 104 101 } 105 102 … … 120 117 } 121 118 122 return $this->memcache->set($this-> prefix.$key, $data, false, $lifetime);119 return $this->memcache->set($this->getOption('prefix').$key, $data, false, $lifetime); 123 120 } 124 121 … … 128 125 public function remove($key) 129 126 { 130 $this->memcache->delete($this-> prefix.'_metadata'.self::SEPARATOR.$key);131 132 return $this->memcache->delete($this-> prefix.$key);127 $this->memcache->delete($this->getOption('prefix').'_metadata'.self::SEPARATOR.$key); 128 129 return $this->memcache->delete($this->getOption('prefix').$key); 133 130 } 134 131 … … 180 177 } 181 178 182 $regexp = self::patternToRegexp($this-> prefix.$pattern);179 $regexp = self::patternToRegexp($this->getOption('prefix').$pattern); 183 180 184 181 foreach ($this->getCacheInfo() as $key) … … 197 194 { 198 195 $values = array(); 199 foreach ($this->memcache->get(array_map(create_function('$k', 'return "'.$this-> prefix.'".$k;'), $keys)) as $key => $value)200 { 201 $values[str_replace($this-> prefix, '', $key)] = $value;196 foreach ($this->memcache->get(array_map(create_function('$k', 'return "'.$this->getOption('prefix').'".$k;'), $keys)) as $key => $value) 197 { 198 $values[str_replace($this->getOption('prefix'), '', $key)] = $value; 202 199 } 203 200 … … 214 211 protected function getMetadata($key) 215 212 { 216 return $this->memcache->get($this-> prefix.'_metadata'.self::SEPARATOR.$key);213 return $this->memcache->get($this->getOption('prefix').'_metadata'.self::SEPARATOR.$key); 217 214 } 218 215 … … 225 222 protected function setMetadata($key, $lifetime) 226 223 { 227 $this->memcache->set($this-> prefix.'_metadata'.self::SEPARATOR.$key, array('lastModified' => time(), 'timeout' => time() + $lifetime), false, $lifetime);224 $this->memcache->set($this->getOption('prefix').'_metadata'.self::SEPARATOR.$key, array('lastModified' => time(), 'timeout' => time() + $lifetime), false, $lifetime); 228 225 } 229 226 … … 235 232 protected function setCacheInfo($key) 236 233 { 237 $keys = $this->memcache->get($this-> prefix.'_metadata');234 $keys = $this->memcache->get($this->getOption('prefix').'_metadata'); 238 235 if (!is_array($keys)) 239 236 { 240 237 $keys = array(); 241 238 } 242 $keys[] = $this-> prefix.$key;243 $this->memcache->set($this-> prefix.'_metadata', $keys, 0);239 $keys[] = $this->getOption('prefix').$key; 240 $this->memcache->set($this->getOption('prefix').'_metadata', $keys, 0); 244 241 } 245 242 … … 251 248 protected function getCacheInfo() 252 249 { 253 $keys = $this->memcache->get($this-> prefix.'_metadata');250 $keys = $this->memcache->get($this->getOption('prefix').'_metadata'); 254 251 if (!is_array($keys)) 255 252 { trunk/lib/cache/sfSQLiteCache.class.php
r6363 r6365 19 19 class sfSQLiteCache extends sfCache 20 20 { 21 protected $dbh = null;22 23 protected$database = '';21 protected 22 $dbh = null, 23 $database = ''; 24 24 25 25 /** … … 82 82 public function set($key, $data, $lifetime = null) 83 83 { 84 if ($this->getOption('automatic CleaningFactor') > 0 && rand(1, $this->getOption('automaticCleaningFactor')) == 1)84 if ($this->getOption('automatic_cleaning_factor') > 0 && rand(1, $this->getOption('automatic_cleaning_factor')) == 1) 85 85 { 86 86 $this->clean(sfCache::OLD); trunk/lib/cache/sfXCacheCache.class.php
r6363 r6365 19 19 class sfXCacheCache extends sfCache 20 20 { 21 protected $prefix = '';22 23 21 /** 24 22 * Initializes this sfCache instance. … … 38 36 throw new sfInitializationException('You must have XCache installed and enabled to use sfXCacheCache class.'); 39 37 } 40 41 $this->prefix = md5(sfConfig::get('sf_app_dir')).self::SEPARATOR;42 38 } 43 39 … … 47 43 public function get($key, $default = null) 48 44 { 49 return xcache_isset($this-> prefix.$key) ? substr(xcache_get($this->prefix.$key), 12) : $default;45 return xcache_isset($this->getOption('prefix').$key) ? substr(xcache_get($this->getOption('prefix').$key), 12) : $default; 50 46 } 51 47 … … 55 51 public function has($key) 56 52 { 57 return xcache_isset($this-> prefix.$key);53 return xcache_isset($this->getOption('prefix').$key); 58 54 } 59 55 … … 65 61 $lifetime = $this->getLifetime($lifetime); 66 62 67 return xcache_set($this-> prefix.$key, str_pad(time() + $lifetime, 12, 0, STR_PAD_LEFT).$data, $lifetime);63 return xcache_set($this->getOption('prefix').$key, str_pad(time() + $lifetime, 12, 0, STR_PAD_LEFT).$data, $lifetime); 68 64 } 69 65 … … 73 69 public function remove($key) 74 70 { 75 return xcache_unset($this-> prefix.$key);71 return xcache_unset($this->getOption('prefix').$key); 76 72 } 77 73 … … 104 100 public function getLastModified($key) 105 101 { 106 if (!xcache_isset($this-> prefix.$key))102 if (!xcache_isset($this->getOption('prefix').$key)) 107 103 { 108 104 return 0; … … 122 118 public function getTimeout($key) 123 119 { 124 return xcache_isset($this-> prefix.$key) ? intval(substr(xcache_get($this->prefix.$key), 0, 12)) : 0;120 return xcache_isset($this->getOption('prefix').$key) ? intval(substr(xcache_get($this->getOption('prefix').$key), 0, 12)) : 0; 125 121 } 126 122 … … 132 128 $this->checkAuth(); 133 129 134 $regexp = self::patternToRegexp($this-> prefix.$pattern);130 $regexp = self::patternToRegexp($this->getOption('prefix').$pattern); 135 131 136 132 for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) … … 164 160 foreach ($infos['cache_list'] as $info) 165 161 { 166 if ($this-> prefix.$key == $info['name'])162 if ($this->getOption('prefix').$key == $info['name']) 167 163 { 168 164 return $info; trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/backend/config/config.php
r2369 r6365 7 7 require_once($sf_symfony_lib_dir.'/util/sfCore.class.php'); 8 8 sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir); 9 10 // insert your own autoloading callables here 11 12 if (sfConfig::get('sf_debug')) 13 { 14 spl_autoload_register(array(sfAutoload::getInstance(), 'autoloadAgain')); 15 } trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/backend/config/factories.yml
r4890 r6365 1 prod: 2 logger: 3 class: sfNoLogger 4 param: 5 level: err 6 loggers: ~ 1 7 cli: 2 8 controller: trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/backend/config/settings.yml
r5384 r6365 1 1 prod: 2 2 .settings: 3 logging_enabled: off 3 4 no_script_name: off 4 5 trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/crud/config/config.php
r2369 r6365 7 7 require_once($sf_symfony_lib_dir.'/util/sfCore.class.php'); 8 8 sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir); 9 10 // insert your own autoloading callables here 11 12 if (sfConfig::get('sf_debug')) 13 { 14 spl_autoload_register(array(sfAutoload::getInstance(), 'autoloadAgain')); 15 } trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/crud/config/factories.yml
r4890 r6365 1 prod: 2 logger: 3 class: sfNoLogger 4 param: 5 level: err 6 loggers: ~ 1 7 cli: 2 8 controller: trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/apps/crud/config/settings.yml
r5384 r6365 1 1 prod: 2 2 .settings: 3 logging_enabled: off 3 4 no_script_name: off 4 5 trunk/lib/plugins/sfPropelPlugin/test/functional/fixtures/config/propel.ini
r5103 r6365 40 40 propel.builder.addComments = false 41 41 propel.packageObjectModel = true 42 43 propel.defaultTimeStampFormat = Y-m-d H:i:s 44 propel.defaultTimeFormat = H:i:s 45 propel.defaultDateFormat = Y-m-d trunk/lib/task/project/upgrade1.1/sfAutoloadingUpgrade.class.php
r5260 r6365 31 31 $content = str_replace("'sfAutoload'", 'sfAutoload::getInstance()', $content); 32 32 33 $this-> log($this->formatter->formatSection('config.php', sprintf('Migrating %s', $file)));33 $this->dispatcher->notify(new sfEvent($this, 'command.log', array($this->formatter->formatSection('config.php', sprintf('Migrating %s', $file))))); 34 34 file_put_contents($file, $content); 35 35 } … … 43 43 if (sfConfig::get('sf_debug')) 44 44 { 45 spl_autoload_register(array('sfAutoload ', 'autoloadAgain'));45 spl_autoload_register(array('sfAutoload::getInstance()', 'autoloadAgain')); 46 46 } 47 47 EOF; trunk/test/functional/fixtures/project/apps/cache/config/config.php
r2369 r6365 7 7 require_once($sf_symfony_lib_dir.'/util/sfCore.class.php'); 8 8 sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir); 9 10 // insert your own autoloading callables here 11 12 if (sfConfig::get('sf_debug')) 13 { 14 spl_autoload_register(array(sfAutoload::getInstance(), 'autoloadAgain')); 15 } trunk/test/functional/fixtures/project/apps/cache/config/factories.yml
r4890 r6365 1 prod: 2 logger: 3 class: sfNoLogger 4 param: 5 level: err 6 loggers: ~ 1 7 cli: 2 8 controller: trunk/test/functional/fixtures/project/apps/cache/config/settings.yml
r2794 r6365 1 1 prod: 2 2 .settings: 3 logging_enabled: off 3 4 no_script_name: off 4 5 trunk/test/functional/fixtures/project/apps/frontend/config/config.php
r2369 r6365 7 7 require_once($sf_symfony_lib_dir.'/util/sfCore.class.php'); 8 8 sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir); 9 10 // insert your own autoloading callables here 11 12 if (sfConfig::get('sf_debug')) 13 { 14 spl_autoload_register(array(sfAutoload::getInstance(), 'autoloadAgain')); 15 } trunk/test/functional/fixtures/project/apps/frontend/config/factories.yml
r4890 r6365 1 prod: 2 logger: 3 class: sfNoLogger 4 param: 5 level: err 6 loggers: ~ 1 7 cli: 2 8 controller: trunk/test/functional/fixtures/project/apps/frontend/config/settings.yml
r2802 r6365 1 1 prod: 2 2 .settings: 3 logging_enabled: off 3 4 no_script_name: on 4 5 trunk/test/functional/fixtures/project/apps/i18n/config/config.php
r2740 r6365 7 7 require_once($sf_symfony_lib_dir.'/util/sfCore.class.php'); 8 8 sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir); 9 10 // insert your own autoloading callables here 11 12 if (sfConfig::get('sf_debug')) 13 { 14 spl_autoload_register(array(sfAutoload::getInstance(), 'autoloadAgain')); 15 } trunk/test/functional/fixtures/project/apps/i18n/config/factories.yml
r4890 r6365 1 prod: 2 logger: 3 class: sfNoLogger 4 param: 5 level: err 6 loggers: ~ 1 7 cli: 2 8 controller: trunk/test/functional/fixtures/project/apps/i18n/config/settings.yml
r2794 r6365 1 1 prod: 2 2 .settings: 3 logging_enabled: off 3 4 no_script_name: off 4 5 trunk/test/functional/fixtures/project/config/propel.ini
r2543 r6365 25 25 26 26 ; builder settings 27 propel.builder.peer.class = addon.propel.builder.SfPeerBuilder28 propel.builder.object.class = addon.propel.builder.SfObjectBuilder27 propel.builder.peer.class = plugins.sfPropelPlugin.lib.propel.builder.SfPeerBuilder 28 propel.builder.object.class = plugins.sfPropelPlugin.lib.propel.builder.SfObjectBuilder 29 29 30 propel.builder.objectstub.class = addon.propel.builder.SfExtensionObjectBuilder31 propel.builder.peerstub.class = addon.propel.builder.SfExtensionPeerBuilder32 propel.builder.objectmultiextend.class = addon.propel.builder.SfMultiExtendObjectBuilder33 propel.builder.mapbuilder.class = addon.propel.builder.SfMapBuilderBuilder30 propel.builder.objectstub.class = plugins.sfPropelPlugin.lib.propel.builder.SfExtensionObjectBuilder 31 propel.builder.peerstub.class = plugins.sfPropelPlugin.lib.propel.builder.SfExtensionPeerBuilder 32 propel.builder.objectmultiextend.class = plugins.sfPropelPlugin.lib.propel.builder.SfMultiExtendObjectBuilder 33 propel.builder.mapbuilder.class = plugins.sfPropelPlugin.lib.propel.builder.SfMapBuilderBuilder 34 34 propel.builder.interface.class = propel.engine.builder.om.php5.PHP5InterfaceBuilder 35 35 propel.builder.node.class = propel.engine.builder.om.php5.PHP5NodeBuilder … … 41 41 propel.builder.addComments = false 42 42 propel.packageObjectModel = true 43 44 propel.defaultTimeStampFormat = Y-m-d H:i:s 45 propel.defaultTimeFormat = H:i:s 46 propel.defaultDateFormat = Y-m-d trunk/test/unit/cache/sfCacheDriverTests.class.php
r6363 r6365 64 64 65 65 $cache->clean(); 66 $cache->setOption('automatic CleaningFactor', 1);66 $cache->setOption('automatic_cleaning_factor', 1); 67 67 $cache->set('foo', $data); 68 68 $cache->set('foo', $data); 69 69 $cache->set('foo', $data); 70 $cache->setOption('automatic CleaningFactor', 1000);70 $cache->setOption('automatic_cleaning_factor', 1000); 71 71 72 72 // ->remove() trunk/test/unit/cache/sfFileCacheTest.php
r4957 r6365 16 16 // setup 17 17 sfConfig::set('sf_logging_enabled', false); 18 $temp = tempnam('/tmp/cache dir', 'tmp');18 $temp = tempnam('/tmp/cache_dir', 'tmp'); 19 19 unlink($temp); 20 20 mkdir($temp); … … 25 25 { 26 26 $cache = new sfFileCache(); 27 $t->fail('->initialize() throws an sfInitializationException exception if you don\'t pass a "cache Dir" parameter');27 $t->fail('->initialize() throws an sfInitializationException exception if you don\'t pass a "cache_dir" parameter'); 28 28 } 29 29 catch (sfInitializationException $e) 30 30 { 31 $t->pass('->initialize() throws an sfInitializationException exception if you don\'t pass a "cache Dir" parameter');31 $t->pass('->initialize() throws an sfInitializationException exception if you don\'t pass a "cache_dir" parameter');