mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	psr-4 change.
This commit is contained in:
		@ -97,24 +97,24 @@
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	"autoload": {
 | 
						"autoload": {
 | 
				
			||||||
		"psr-4": {
 | 
							"psr-4": {
 | 
				
			||||||
 | 
								"yii\\apidoc\\": "extensions/apidoc/",
 | 
				
			||||||
 | 
								"yii\\authclient\\": "extensions/authclient/",
 | 
				
			||||||
 | 
								"yii\\bootstrap\\": "extensions/bootstrap/",
 | 
				
			||||||
 | 
								"yii\\codeception\\": "extensions/codeception/",
 | 
				
			||||||
 | 
								"yii\\debug\\": "extensions/debug/",
 | 
				
			||||||
 | 
								"yii\\elasticsearch\\": "extensions/elasticsearch/",
 | 
				
			||||||
			"yii\\faker\\": "extensions/faker/",
 | 
								"yii\\faker\\": "extensions/faker/",
 | 
				
			||||||
 | 
								"yii\\gii\\": "extensions/gii/",
 | 
				
			||||||
 | 
								"yii\\imagine\\" : "extensions/imagine/",
 | 
				
			||||||
 | 
								"yii\\jui\\": "extensions/jui/",
 | 
				
			||||||
 | 
								"yii\\mongodb\\": "extensions/mongodb/",
 | 
				
			||||||
 | 
								"yii\\redis\\": "extensions/redis/",
 | 
				
			||||||
 | 
								"yii\\smarty\\": "extensions/smarty/",
 | 
				
			||||||
 | 
								"yii\\swiftmailer\\": "extensions/swiftmailer/",
 | 
				
			||||||
 | 
								"yii\\sphinx\\": "extensions/sphinx/",
 | 
				
			||||||
			"yii\\twig\\": "extensions/twig/"
 | 
								"yii\\twig\\": "extensions/twig/"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		"psr-0": {
 | 
							"psr-0": {
 | 
				
			||||||
			"yii\\apidoc\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\authclient\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\bootstrap\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\codeception\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\debug\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\elasticsearch\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\gii\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\imagine\\" : "extensions/",
 | 
					 | 
				
			||||||
			"yii\\jui\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\mongodb\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\redis\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\smarty\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\swiftmailer\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\sphinx\\": "extensions/",
 | 
					 | 
				
			||||||
			"yii\\": "framework/"
 | 
								"yii\\": "framework/"
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
@ -81,7 +81,7 @@ Autoloading
 | 
				
			|||||||
All classes, interfaces and traits are loaded automatically at the moment they are used. There's no need to use
 | 
					All classes, interfaces and traits are loaded automatically at the moment they are used. There's no need to use
 | 
				
			||||||
`include` or `require`. It is, as well, true for Composer-loaded packages and Yii extensions.
 | 
					`include` or `require`. It is, as well, true for Composer-loaded packages and Yii extensions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Autoloader works according to [PSR-0](). That means namespaces and class, interface and trait
 | 
					Autoloader works according to [PSR-4](). That means namespaces and class, interface and trait
 | 
				
			||||||
names should correspond to file system paths except root namespace path that is defined by an alias.
 | 
					names should correspond to file system paths except root namespace path that is defined by an alias.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For example, if standard alias `@app` refers to `/var/www/example.com/` then `\app\models\User` will be loaded from
 | 
					For example, if standard alias `@app` refers to `/var/www/example.com/` then `\app\models\User` will be loaded from
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
Yii2 class loader
 | 
					Yii2 class loader
 | 
				
			||||||
=================
 | 
					=================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Yii 2 class loader is PSR-0 compliant. That means it can handle most of the PHP
 | 
					Yii 2 class loader is PSR-4 compliant. That means it can handle most of the PHP
 | 
				
			||||||
libraries and frameworks out there.
 | 
					libraries and frameworks out there.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In order to autoload a library you need to set a root alias for it.
 | 
					In order to autoload a library you need to set a root alias for it.
 | 
				
			||||||
 | 
				
			|||||||
@ -23,8 +23,7 @@
 | 
				
			|||||||
		"phpdocumentor/reflection": "1.0.2"
 | 
							"phpdocumentor/reflection": "1.0.2"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"autoload": {
 | 
						"autoload": {
 | 
				
			||||||
		"psr-0": { "yii\\apidoc\\": "" }
 | 
							"psr-4": { "yii\\apidoc\\": "" }
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"target-dir": "yii/apidoc",
 | 
					 | 
				
			||||||
	"bin": ["apidoc"]
 | 
						"bin": ["apidoc"]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -22,7 +22,6 @@
 | 
				
			|||||||
		"ext-curl": "*"
 | 
							"ext-curl": "*"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"autoload": {
 | 
						"autoload": {
 | 
				
			||||||
		"psr-0": { "yii\\authclient\\": "" }
 | 
							"psr-4": { "yii\\authclient\\": "" }
 | 
				
			||||||
	},
 | 
						}
 | 
				
			||||||
	"target-dir": "yii/authclient"
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
		 Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB  | 
@ -22,7 +22,6 @@
 | 
				
			|||||||
		"twbs/bootstrap": "3.0.*"
 | 
							"twbs/bootstrap": "3.0.*"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"autoload": {
 | 
						"autoload": {
 | 
				
			||||||
		"psr-0": { "yii\\bootstrap\\": "" }
 | 
							"psr-4": { "yii\\bootstrap\\": "" }
 | 
				
			||||||
	},
 | 
						}
 | 
				
			||||||
	"target-dir": "yii/bootstrap"
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -20,7 +20,6 @@
 | 
				
			|||||||
		"yiisoft/yii2": "*"
 | 
							"yiisoft/yii2": "*"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"autoload": {
 | 
						"autoload": {
 | 
				
			||||||
		"psr-0": { "yii\\codeception\\": "" }
 | 
							"psr-4": { "yii\\codeception\\": "" }
 | 
				
			||||||
	},
 | 
						}
 | 
				
			||||||
	"target-dir": "yii/codeception"
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user