Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
e3ee1b07
Commit
e3ee1b07
authored
May 25, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3575 from yiisoft/extensions-autoloading
Fixes #3542: Removed requirement to specify `extensions` in application config
parents
ee2b968b
d9a3f399
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
4 deletions
+9
-4
main.php
apps/advanced/common/config/main.php
+0
-1
console.php
apps/basic/config/console.php
+0
-1
web.php
apps/basic/config/web.php
+0
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Application.php
framework/base/Application.php
+8
-1
No files found.
apps/advanced/common/config/main.php
View file @
e3ee1b07
<?php
<?php
return
[
return
[
'vendorPath'
=>
dirname
(
dirname
(
__DIR__
))
.
'/vendor'
,
'vendorPath'
=>
dirname
(
dirname
(
__DIR__
))
.
'/vendor'
,
'extensions'
=>
require
(
__DIR__
.
'/../../vendor/yiisoft/extensions.php'
),
'components'
=>
[
'components'
=>
[
'cache'
=>
[
'cache'
=>
[
'class'
=>
'yii\caching\FileCache'
,
'class'
=>
'yii\caching\FileCache'
,
...
...
apps/basic/config/console.php
View file @
e3ee1b07
...
@@ -10,7 +10,6 @@ return [
...
@@ -10,7 +10,6 @@ return [
'basePath'
=>
dirname
(
__DIR__
),
'basePath'
=>
dirname
(
__DIR__
),
'bootstrap'
=>
[
'log'
],
'bootstrap'
=>
[
'log'
],
'controllerNamespace'
=>
'app\commands'
,
'controllerNamespace'
=>
'app\commands'
,
'extensions'
=>
require
(
__DIR__
.
'/../vendor/yiisoft/extensions.php'
),
'components'
=>
[
'components'
=>
[
'cache'
=>
[
'cache'
=>
[
'class'
=>
'yii\caching\FileCache'
,
'class'
=>
'yii\caching\FileCache'
,
...
...
apps/basic/config/web.php
View file @
e3ee1b07
...
@@ -6,7 +6,6 @@ $config = [
...
@@ -6,7 +6,6 @@ $config = [
'id'
=>
'basic'
,
'id'
=>
'basic'
,
'basePath'
=>
dirname
(
__DIR__
),
'basePath'
=>
dirname
(
__DIR__
),
'bootstrap'
=>
[
'log'
],
'bootstrap'
=>
[
'log'
],
'extensions'
=>
require
(
__DIR__
.
'/../vendor/yiisoft/extensions.php'
),
'components'
=>
[
'components'
=>
[
'cache'
=>
[
'cache'
=>
[
'class'
=>
'yii\caching\FileCache'
,
'class'
=>
'yii\caching\FileCache'
,
...
...
framework/CHANGELOG.md
View file @
e3ee1b07
...
@@ -56,6 +56,7 @@ Yii Framework 2 Change Log
...
@@ -56,6 +56,7 @@ Yii Framework 2 Change Log
-
Enh #3472: Added configurable option to encode spaces in dropDownLists and listBoxes (kartik-v)
-
Enh #3472: Added configurable option to encode spaces in dropDownLists and listBoxes (kartik-v)
-
Enh #3518:
`yii\helpers\Html::encode()`
now replaces invalid code sequences with "?" (DaSourcerer)
-
Enh #3518:
`yii\helpers\Html::encode()`
now replaces invalid code sequences with "?" (DaSourcerer)
-
Enh #3521: Added
`yii\filters\HttpCache::sessionCacheLimiter`
(qiangxue)
-
Enh #3521: Added
`yii\filters\HttpCache::sessionCacheLimiter`
(qiangxue)
-
Enh #3542: Removed requirement to specify
`extensions`
in application config (samdark)
-
Enh #3574: Add integrity check support for SQLite (zeeke)
-
Enh #3574: Add integrity check support for SQLite (zeeke)
-
Enh: Added support for using sub-queries when building a DB query with
`IN`
condition (qiangxue)
-
Enh: Added support for using sub-queries when building a DB query with
`IN`
condition (qiangxue)
-
Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
-
Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
...
...
framework/base/Application.php
View file @
e3ee1b07
...
@@ -151,8 +151,11 @@ abstract class Application extends Module
...
@@ -151,8 +151,11 @@ abstract class Application extends Module
* The "bootstrap" class listed above will be instantiated during the application
* The "bootstrap" class listed above will be instantiated during the application
* [[bootstrap()|bootstrapping process]]. If the class implements [[BootstrapInterface]],
* [[bootstrap()|bootstrapping process]]. If the class implements [[BootstrapInterface]],
* its [[BootstrapInterface::bootstrap()|bootstrap()]] method will be also be called.
* its [[BootstrapInterface::bootstrap()|bootstrap()]] method will be also be called.
*
* If not set explicitily in the application config, this property will be populated with the contents of
* `@vendor/yiisoft/extensions.php`.
*/
*/
public
$extensions
=
[]
;
public
$extensions
;
/**
/**
* @var array list of components that should be run during the application [[bootstrap()|bootstrapping process]].
* @var array list of components that should be run during the application [[bootstrap()|bootstrapping process]].
*
*
...
@@ -262,6 +265,10 @@ abstract class Application extends Module
...
@@ -262,6 +265,10 @@ abstract class Application extends Module
*/
*/
protected
function
bootstrap
()
protected
function
bootstrap
()
{
{
if
(
$this
->
extensions
===
null
)
{
$file
=
Yii
::
getAlias
(
'@vendor/yiisoft/extensions.php'
);
$this
->
extensions
=
is_file
(
$file
)
?
include
(
$file
)
:
[];
}
foreach
(
$this
->
extensions
as
$extension
)
{
foreach
(
$this
->
extensions
as
$extension
)
{
if
(
!
empty
(
$extension
[
'alias'
]))
{
if
(
!
empty
(
$extension
[
'alias'
]))
{
foreach
(
$extension
[
'alias'
]
as
$name
=>
$path
)
{
foreach
(
$extension
[
'alias'
]
as
$name
=>
$path
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment