From 3850f575f0a1d863bbb3ee41b99a9ce792b78817 Mon Sep 17 00:00:00 2001 From: Maxime Dizerens Date: Sat, 7 Apr 2012 00:03:33 +0300 Subject: [PATCH 1/6] Misspelt word corrected! --- .../database/eloquent/relationships/has_many_and_belongs_to.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/database/eloquent/relationships/has_many_and_belongs_to.php b/laravel/database/eloquent/relationships/has_many_and_belongs_to.php index 7453a02f..9fecb66d 100644 --- a/laravel/database/eloquent/relationships/has_many_and_belongs_to.php +++ b/laravel/database/eloquent/relationships/has_many_and_belongs_to.php @@ -21,7 +21,7 @@ class Has_Many_And_Belongs_To extends Relationship { protected $other; /** - * The columns on the joining tbale that should be fetched. + * The columns on the joining table that should be fetched. * * @var array */ From 201732135d58b37b79cdd82ed949a46b2d5a7b17 Mon Sep 17 00:00:00 2001 From: Joe Wallace Date: Mon, 9 Apr 2012 11:02:11 -0500 Subject: [PATCH 2/6] Resolver::resolve() uses Str::classify() to determine class names Signed-off-by: Joe Wallace --- laravel/cli/tasks/migrate/resolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/cli/tasks/migrate/resolver.php b/laravel/cli/tasks/migrate/resolver.php index f139195c..0e144b4a 100644 --- a/laravel/cli/tasks/migrate/resolver.php +++ b/laravel/cli/tasks/migrate/resolver.php @@ -116,7 +116,7 @@ protected function resolve($migrations) // naming collisions with other bundle's migrations. $prefix = Bundle::class_prefix($bundle); - $class = $prefix.substr($name, 18); + $class = $prefix.\Laravel\Str::classify(substr($name, 18)); $migration = new $class; From f7aee0ca2aef2bd6585f596ffa25884cc8d5aa97 Mon Sep 17 00:00:00 2001 From: Joe Wallace Date: Mon, 9 Apr 2012 11:28:40 -0500 Subject: [PATCH 3/6] Model::table() uses class_basename() helper - which properly discards namespaces on *nix systems Signed-off-by: Joe Wallace --- laravel/database/eloquent/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index d9c88396..966a00c4 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -465,7 +465,7 @@ public function dirty() */ public function table() { - return static::$table ?: strtolower(Str::plural(basename(get_class($this)))); + return static::$table ?: strtolower(Str::plural(class_basename($this))); } /** From 53e8f9b77469025e74910823265cede331d32ed6 Mon Sep 17 00:00:00 2001 From: Keith Loy Date: Mon, 9 Apr 2012 21:11:54 -0500 Subject: [PATCH 4/6] Fixing bug where custom validation messages in bundle language files were not getting picked up. --- laravel/validator.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/laravel/validator.php b/laravel/validator.php index b238ce13..b18bf512 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -559,7 +559,7 @@ protected function validate_url($attribute, $value) protected function validate_active_url($attribute, $value) { $url = str_replace(array('http://', 'https://', 'ftp://'), '', Str::lower($value)); - + return checkdnsrr($url); } @@ -608,7 +608,7 @@ protected function validate_alpha_num($attribute, $value) */ protected function validate_alpha_dash($attribute, $value) { - return preg_match('/^([-a-z0-9_-])+$/i', $value); + return preg_match('/^([-a-z0-9_-])+$/i', $value); } /** @@ -657,7 +657,7 @@ protected function validate_mimes($attribute, $value, $parameters) protected function validate_before($attribute, $value, $parameters) { return (strtotime($value) < strtotime($parameters[0])); - } + } /** * Validate the date is after a given date. @@ -670,7 +670,7 @@ protected function validate_before($attribute, $value, $parameters) protected function validate_after($attribute, $value, $parameters) { return (strtotime($value) > strtotime($parameters[0])); - } + } /** * Get the proper error message for an attribute and rule. @@ -692,7 +692,7 @@ protected function message($attribute, $rule) { return $this->messages[$custom]; } - elseif (Lang::has($custom = "validation.custom.{$custom}", $this->language)) + elseif (Lang::has($custom = "{$bundle}validation.custom.{$custom}", $this->language)) { return Lang::line($custom)->get($this->language); } @@ -753,7 +753,7 @@ protected function size_message($bundle, $attribute, $rule) $line = 'string'; } - return Lang::line("{$bundle}validation.{$rule}.{$line}")->get($this->language); + return Lang::line("{$bundle}validation.{$rule}.{$line}")->get($this->language); } /** @@ -929,7 +929,7 @@ protected function replace_before($message, $attribute, $rule, $parameters) protected function replace_after($message, $attribute, $rule, $parameters) { return str_replace(':date', $parameters[0], $message); - } + } /** * Get the displayable name for a given attribute. @@ -988,7 +988,7 @@ protected function parse($rule) { $parameters = array(); - // The format for specifying validation rules and parameters follows a + // The format for specifying validation rules and parameters follows a // {rule}:{parameters} formatting convention. For instance, the rule // "max:3" specifies that the value may only be 3 characters long. if (($colon = strpos($rule, ':')) !== false) From 60b5e38ca0cda1dada316cb67498fba8438ab662 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 10 Apr 2012 09:48:54 -0500 Subject: [PATCH 5/6] return after loading mapped class in autoloader. --- changes.md | 10 ++++++++++ laravel/autoloader.php | 2 ++ 2 files changed, 12 insertions(+) diff --git a/changes.md b/changes.md index 44a8ac40..7da4495e 100644 --- a/changes.md +++ b/changes.md @@ -2,6 +2,8 @@ ## Laravel Change Log ## Contents +- [Laravel 3.1.7](#3.1.7) +- [Upgrading From 3.1.6](#upgrade-3.1.7) - [Laravel 3.1.6](#3.1.6) - [Upgrading From 3.1.5](#upgrade-3.1.6) - [Laravel 3.1.5](#3.1.5) @@ -17,6 +19,14 @@ ## Contents - [Laravel 3.1](#3.1) - [Upgrading From 3.0](#upgrade-3.1) + +## Laravel 3.1.7 + +- Fixes custom validation language line loading from bundles. +- Fixes double-loading of classes when overriding the core. +- Classify migration names. +- + ## Laravel 3.1.6 diff --git a/laravel/autoloader.php b/laravel/autoloader.php index 20634fea..f2d40072 100644 --- a/laravel/autoloader.php +++ b/laravel/autoloader.php @@ -61,6 +61,8 @@ class_alias(static::$aliases[$class], $class); elseif (isset(static::$mappings[$class])) { require static::$mappings[$class]; + + return; } // If the class namespace is mapped to a directory, we will load the From cb9050844ad90e74d16478b9c45660737a822fef Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 10 Apr 2012 10:09:34 -0500 Subject: [PATCH 6/6] incremented version. --- artisan | 2 +- changes.md | 6 +++++- paths.php | 2 +- public/index.php | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/artisan b/artisan index 689b7615..d8e05547 100644 --- a/artisan +++ b/artisan @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.6 + * @version 3.1.7 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/changes.md b/changes.md index 7da4495e..d751ae5e 100644 --- a/changes.md +++ b/changes.md @@ -25,7 +25,11 @@ ## Laravel 3.1.7 - Fixes custom validation language line loading from bundles. - Fixes double-loading of classes when overriding the core. - Classify migration names. -- + + +## Upgrading From 3.1.6 + +- Replace the **laravel** folder. ## Laravel 3.1.6 diff --git a/paths.php b/paths.php index fd94f574..fe4fbfa7 100644 --- a/paths.php +++ b/paths.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.6 + * @version 3.1.7 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/public/index.php b/public/index.php index 5dff5e4c..8a6217ce 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.6 + * @version 3.1.7 * @author Taylor Otwell * @link http://laravel.com */