Skip to content
GitLab
Explore
Sign in
project
drupal
Compare revisions
8af9db2338ae1e2febebe5cd5abae547d81d37a5 to 8.2.x
Commits on Source (126)
c1667f37
Issue
#2737719
by Wim Leers, dawehner: EntityResource: Provide comprehensive...
Nov 29, 2016
889f09f5
Issue
#2502195
by vijaycs85, larowlan:...
Nov 29, 2016
22334761
Revert "Issue
#2737719
by Wim Leers, dawehner: EntityResource: Provide...
Nov 29, 2016
16850db6
Issue
#2826389
by alexpott, kmoll, Robin Monks, Berdir, tbonomelli: Draggable...
Nov 29, 2016
4faed7fa
Issue
#2785997
by chanderbhushan, faline, mallezie, dawehner, mr.baileys:...
Nov 29, 2016
9d41d1cd
Issue
#2609252
by eiriksm, Ginovski, lokapujya, toncic, Arla, Berdir, chx:...
Nov 30, 2016
5d59627d
Issue
#2817115
by tstoeckler, dawehner, cilefen:...
Nov 30, 2016
4b1327d1
Issue
#2737719
by Wim Leers, dawehner: EntityResource: Provide comprehensive...
Nov 30, 2016
3b8e52ae
Issue
#2828319
by mradcliffe, Wim Leers, neclimdul: [regression] REST in...
Nov 30, 2016
c1a0b23d
Issue
#2830485
by klausi, michielnugter:...
Dec 01, 2016
410c1ff1
Issue
#2831525
by Berdir: Add DependencySerializationTrait to ContextDefinition
Dec 01, 2016
ec3d56ce
Issue
#2824576
by Wim Leers: Delete old REST test coverage:...
Dec 01, 2016
d34d9dc3
Issue
#2832013
by Wim Leers, michielnugter, catch:...
Dec 02, 2016
4253f4a1
Issue
#2811841
by hchonov, tstoeckler, Berdir: Add test coverage ensuring user...
Dec 02, 2016
41e5767e
Issue
#2830485
by klausi, catch, michielnugter:...
Dec 02, 2016
8ab9f5cd
Issue
#2810621
by Gábor Hojtsy, dawehner, xjm, jhodgdon, klausi, Wim Leers:...
Dec 05, 2016
b66cc869
Issue
#2826763
by tedbow, samuel.mortenson: Outside In motion selectors not scoped down enough
Dec 05, 2016
c10b035c
Issue
#2820200
by altrugon, bkosborne, thpoul: Display resize icon for CKEditor on Seven theme
Dec 05, 2016
0290c9c5
Issue
#2698909
by Berdir, andypost, jibran, tim.plunkett, lauriii, tstoeckler,...
Dec 05, 2016
5fc86bc2
Issue
#2756401
by claudiu.cristea, pfrenssen, sandervd, gielfeldt, alexpott,...
Dec 05, 2016
4ac6c3b6
Issue
#2827656
by maxocub, aditya.n: Once a process plugin returns multiple...
Dec 05, 2016
d9197f4b
Issue
#2717969
by Wim Leers, benelori, dawehner: REST views: Views field is...
Dec 06, 2016
0f9261cd
Issue
#2824165
by tim.plunkett: Remove brittleness from ConfigEntityStorageTest
Dec 06, 2016
52133682
Issue
#2726803
by hussainweb, jmuzz, Jo Fitzgerald: Field formatters with...
Dec 06, 2016
7b4d0650
Drupal 8.2.4
Dec 07, 2016
3736aba9
Back to dev.
Dec 07, 2016
a3863545
Issue
#2833462
by alexpott, tim.plunkett, Berdir: hook_requirements($phase =...
Dec 08, 2016
8d80f369
Issue
#2814035
by klausi, dawehner: Make $modules property protected on...
Dec 08, 2016
ebe5340e
Issue
#2309695
by quietone, alexpott, mikeryan, benjy: Add query batching to SqlBase
Dec 08, 2016
563340fb
Issue
#2826200
by claudiu.cristea, pfrenssen: Don't let the whole migration...
Dec 09, 2016
b912db19
Issue
#2130277
by phenaproxima, michaellenahan, Jo Fitzgerald, David...
Dec 09, 2016
607ae50a
Issue
#2828559
by amateescu, alexpott: More random fails in UpdatePathTestBase...
Dec 09, 2016
1af393a7
Issue
#2832246
by dangur: d6_profile_values.yml contains obsolete configuration
Dec 09, 2016
f3b493ff
Issue
#2830333
by Wim Leers, tedbow: All REST update path test coverage...
Dec 09, 2016
5971e539
Issue
#2834453
by dixon_: Remove dixon_ as maintainer for Comment module
Dec 12, 2016
18229750
Issue
#2829759
by ruloweb: Wrong @return doc comment in...
Dec 12, 2016
4e9c9440
Issue
#2822881
by Jo Fitzgerald, tstoeckler: Improve Entity URI checking in menu link migration
Dec 12, 2016
9d4b3684
Issue
#2835604
by Wim Leers, effulgentsia: BigPipe provides functionality, not...
Dec 14, 2016
36fe2d4e
Issue
#2746671
by Jo Fitzgerald, stella, andrewmacpherson, hussainweb, tom...
Dec 14, 2016
fa8939cc
Issue
#2729663
by dmsmidt, thpoul, SKAUGHT, Wim Leers, Lendude, droplet,...
Dec 14, 2016
1656c67d
Issue
#2781927
by pguillard, kiamlaluno, Eda, kiwimind: Improve description of...
Dec 14, 2016
5d0814d6
Issue
#2548713
by yongt9412, larowlan, Berdir, swentel, subhojit777,...
Dec 15, 2016
d0271bdc
Issue
#2828438
by Adita, Sam152, rachel_norfolk, timmillwood, jp.stacey:...
Dec 15, 2016
5e0a62dc
Revert "Issue
#2828438
by Adita, Sam152, rachel_norfolk, timmillwood,...
Dec 15, 2016
b062c68e
Issue
#2822296
by shashikant_chauhan, jp.stacey, xjm: Wrong fully qualified...
Dec 15, 2016
d237cfc4
Issue
#2828542
by claudiu.cristea, pfrenssen, cebasqueira, heddn, alexpott:...
Dec 15, 2016
05f0225a
Issue
#2836434
by alexpott, oriol_e9g, NickWilde, bradjones1, AdamPS,...
Dec 16, 2016
dae89165
Issue
#2823955
by Jo Fitzgerald, benjy, quietone, claudiu.cristea, mikeryan:...
Dec 19, 2016
23160fc5
Issue
#2651328
by aerozeppelin, GeduR: Views Handler Filter InOperator exposed...
Dec 19, 2016
69089e27
Issue
#2721725
by Vinay15, snehi, zerbash, er.pushpinderrana, jhodgdon, xjm,...
Dec 19, 2016
9924b5eb
Issue
#2830485
by michielnugter, klausi, tedbow, xjm, catch, tim.plunkett,...
Dec 19, 2016
f5c79614
Issue
#2836381
by phenaproxima, Wim Leers: Seven's entity-add-list template omits link attributes
Dec 21, 2016
54cec24c
Revert "Issue
#2836381
by phenaproxima, Wim Leers: Seven's entity-add-list...
Dec 22, 2016
4cc325fa
Issue
#2797169
by Wim Leers, Fabianx: Mark BigPipe as stable/non-experimental
Dec 23, 2016
df540a9f
Revert "Issue
#2797169
by Wim Leers, Fabianx: Mark BigPipe as stable/non-experimental"
Dec 23, 2016
e1c5a1e5
Issue
#2838678
by andrewmacpherson: Typo in documentation of ArgumentPluginBase - bellow
Dec 23, 2016
cc4a86da
Issue
#2837645
by cburschka: Views::viewsDataHelper declares the wrong return type
Jan 03, 2017
5a4db566
Issue
#2838954
by damiankloip: Ignore 'Transfer-Encoding' header in EntityResourceTestBase::testGet
Jan 03, 2017
6d42807a
Drupal 8.2.5
Jan 04, 2017
7a78e8bf
Back to dev.
Jan 04, 2017
eb237ea7
Issue
#2829484
by vegantriathlete, 20th, xjm: Incorrect spelling of possessive...
Jan 05, 2017
a43fe507
Issue
#2838205
by 20th, panshulk, Damien Flament: Invalid YAML syntax in code...
Jan 05, 2017
feea4699
Issue
#2786443
by alexpott, Berdir, RKopacz, milos.kroulik, generalconsensus:...
Jan 06, 2017
6663917e
Issue
#2623568
by yanniboi, claudiu.cristea, himanshugautam, anil280988,...
Jan 10, 2017
e6904359
Issue
#2828559
by tacituseu, alexpott, mpdonadio, amateescu, hchonov, catch,...
Jan 10, 2017
308e0d77
Issue
#2794699
by Jo Fitzgerald, klausi, phenaproxima:...
Jan 10, 2017
8f380cf2
Issue
#2824827
by damiankloip, dawehner, Wim Leers, klausi:...
Jan 10, 2017
73503a05
Issue
#2599956
by claudiu.cristea, apmsooner: Handler admin summary is double escaped
Jan 11, 2017
fba87506
Issue
#2841948
by Mile23, dawehner: Modify run-tests.sh to show file paths of all discovered tests
Jan 11, 2017
9e042459
Issue
#2838968
by Ginovski, Berdir: BlockContentListBuilder should use...
Jan 11, 2017
b1a9fe3f
Issue
#2838095
by cilefen, pjcdawkins: Only one site slogan character in site...
Jan 11, 2017
0a429dd9
Issue
#2842763
by alexpott: views_ui_preprocess_views_view() broken in PHP 7.1
Jan 11, 2017
7bf8e2f7
Issue
#2842741
by alexpott: Fix MigrateExecutable for PHP7.1
Jan 11, 2017
e0d1869b
Issue
#2827644
by maxocub, phenaproxima: Fix path alias migration of translated nodes [D6]
Jan 11, 2017
35fa851b
Issue
#2842952
: Fix Drupal\taxonomy\Tests\TermTest in PHP7.1
Jan 12, 2017
7097e66d
Issue
#2842942
by alexpott: Fix tempnam() usage in PHP7.1
Jan 12, 2017
28730b16
Issue
#2842982
by alexpott: Fix Drupal\system\Tests\System\UncaughtExceptionTest in PHP7.1
Jan 12, 2017
8090be65
Issue
#2842910
by Lendude: Views module contains several bad namespace in a @see
Jan 13, 2017
c1c293c4
Issue
#2489606
by 20th, slashrsm: hook_file_download() docblock refers to a...
Jan 13, 2017
f0286aee
Issue
#2840596
by alexpott, catch, dawehner: Update Symfony components to ~2.8.16
Jan 13, 2017
0391e315
Issue
#2828438
by Adita, timmillwood, Sam152, rachel_norfolk, jp.stacey:...
Jan 13, 2017
b093322b
Issue
#2839951
by chiranjeeb2410, badjava: API docs...
Jan 13, 2017
a716dcba
Revert "Issue
#2828438
by Adita, timmillwood, Sam152, rachel_norfolk,...
Jan 13, 2017
935bd28e
Issue
#2782915
by tedbow, droplet, nickgs, drpal, xjm, tkoleary, cashwilliams,...
Jan 13, 2017
256756ed
Issue
#2801097
by dawehner, Berdir: Converting feed to absolute URLs fails on...
Jan 14, 2017
05c29b2d
Issue
#1867030
by larowlan, Berdir, Oleksiy, andypost, fil00dl: Contact...
Jan 14, 2017
412b615a
Issue
#2837072
by BarisW: Incorrect closing of the t() call in the help pages
Jan 15, 2017
22aa4508
Issue
#2840596
by alexpott, catch, dawehner: Update Symfony components to ~2.8.16
Jan 15, 2017
c8290734
Issue
#2784571
by tedbow, drpal, nod_, naveenvalecha, miteshmap, droplet,...
Jan 16, 2017
c1060953
Issue
#2793849
by tedbow, drpal, alexpott, tim.plunkett, phenaproxima, Wim...
Jan 16, 2017
5fc68ed4
Issue
#2843074
by tim.plunkett, alexpott, claudiu.cristea, denutkarsh,...
Jan 16, 2017
f93219d0
Revert "Issue
#2793849
by tedbow, drpal, alexpott, tim.plunkett, phenaproxima,...
Jan 16, 2017
1e44659b
Issue
#2731419
by hgoto, michielnugter, pareshpatel, tocab, Chernous_dn,...
Jan 17, 2017
66c3d8df
Issue
#2843358
by alexpott, mallezie, dawehner: Postgres fail in...
Jan 17, 2017
7e087cf6
Issue
#2325463
by claudiu.cristea, swentel, GroovyCarrot, bircher, Berdir,...
Jan 17, 2017
453f74e1
Issue
#2673960
by Jo Fitzgerald, hussainweb, phenaproxima, mikeryan, quietone,...
Jan 17, 2017
333a973f
Issue
#2834316
by Berdir, claudiu.cristea: Node preview shows and defaults to...
Jan 17, 2017
be832f3b
Issue
#2817727
by Wim Leers: Add test coverage to prove controller is called...
Jan 17, 2017
77b8f3af
Issue
#2843828
by alexpott, timmillwood:...
Jan 17, 2017
12fbebb1
Issue
#2840595
by amateescu, Berdir: The 'Source feed' field of aggregator...
Jan 17, 2017
26 additional commits have been omitted to prevent performance issues.
Expand all
Hide whitespace changes
Inline
Side-by-side
composer.lock
View file @
55845022
This diff is collapsed.
Click to expand it.
core/CHANGELOG.txt
View file @
55845022
Drupal 8.2.8, 2017-04-19
------------------------
- Fixed security issues. See SA-CORE-2017-002.
Drupal 8.2.7, 2017-03-15
------------------------
- Fixed security issues. See SA-CORE-2017-001.
Drupal 8.2.3, 2016-11-16
------------------------
- Fixed security issues. See SA-CORE-2016-005.
...
...
core/MAINTAINERS.txt
View file @
55845022
...
...
@@ -123,7 +123,6 @@ Color
- ?
Comment
- Dick Olsson 'dixon_' https://www.drupal.org/u/dixon_
- Lee Rowlands 'larowlan' https://www.drupal.org/u/larowlan
- Andrey Postnikov 'andypost' https://www.drupal.org/u/andypost
...
...
core/composer.json
View file @
55845022
...
...
@@ -40,7 +40,7 @@
"jcalderonzumba/gastonjs"
:
"~1.0.2"
,
"jcalderonzumba/mink-phantomjs-driver"
:
"~0.3.1"
,
"mikey179/vfsStream"
:
"~1.2"
,
"phpunit/phpunit"
:
"
~
4.8"
,
"phpunit/phpunit"
:
"
>=
4.8
.28 <5
"
,
"symfony/css-selector"
:
"~2.8"
},
"replace"
:
{
...
...
core/core.api.php
View file @
55845022
...
...
@@ -1073,8 +1073,9 @@
* yourmodule/tests/src/Unit directory, according to the PSR-4 standard.
* - Your test class needs a phpDoc comment block with a description and
* a @group annotation, which gives information about the test.
* - Methods in your test class whose names start with 'test' are the actual
* test cases. Each one should test a logical subset of the functionality.
* - Add test cases by adding method names that start with 'test' and have no
* arguments, for example testYourTestCase(). Each one should test a logical
* subset of the functionality.
* For more details, see:
* - https://www.drupal.org/phpunit for full documentation on how to write
* PHPUnit tests for Drupal.
...
...
@@ -1110,9 +1111,9 @@
* set up content types and similar procedures.
* - In some cases, you may need to write a test module to support your test;
* put such modules under the yourmodule/tests/modules directory.
* -
Methods in your
test c
l
ass
whose
names start with 'test'
,
and
which
have
*
no
arguments,
are the actual test c
ase
s
. Each one should test a logical
* subset of the functionality
, and each one
runs in a new, isolated test
* -
Add
test cas
e
s
by adding method
names
that
start with 'test' and have
no
* arguments,
for example testYourTestC
ase
()
. Each one should test a logical
* subset of the functionality
. Each method
runs in a new, isolated test
* environment, so it can only rely on the setUp() method, not what has
* been set up by other test methods.
* For more details, see:
...
...
@@ -1121,6 +1122,52 @@
* - @link oo_conventions Object-oriented programming topic @endlink for more
* on PSR-4, namespaces, and where to place classes.
*
* @section write_functional_phpunit Write functional PHP tests (phpunit)
* Functional tests extend the BrowserTestBase base class, and use PHPUnit as
* their underlying framework. They use a simulated browser, in which the test
* can click links, visit URLs, post to forms, etc. To write a functional test:
* - Extend \Drupal\Tests\BrowserTestBase.
* - Place the test in the yourmodule/tests/src/Functional/ directory and use
* the \Drupal\Tests\yourmodule\Functional namespace.
* - Add a @group annotation. For example, if the test is for a Drupal 6
* migration process, the group core uses is migrate_drupal_6. Use yourmodule
* as the group name if the test does not belong to another larger group.
* - You may also override the default setUp() method, which can be used to set
* up content types and similar procedures. Don't forget to call the parent
* method.
* - In some cases, you may need to write a test module to support your test;
* put such modules under the yourmodule/tests/modules directory.
* - Add test cases by adding method names that start with 'test' and have no
* arguments, for example testYourTestCase(). Each one should test a logical
* subset of the functionality. Each method runs in a new, isolated test
* environment, so it can only rely on the setUp() method, not what has
* been set up by other test methods.
* For more details, see:
* - https://www.drupal.org/docs/8/phpunit/phpunit-browser-test-tutorial for
* a full tutorial on how to write functional PHPUnit tests for Drupal.
* - https://www.drupal.org/phpunit for the full documentation on how to write
* PHPUnit tests for Drupal.
*
* @section write_jsfunctional_phpunit Write functional JavaScript tests (phpunit)
* To write a functional test that relies on JavaScript:
* - Extend \Drupal\FunctionalJavaScriptTests\JavascriptTestBase.
* - Place the test into the yourmodule/tests/src/FunctionalJavascript/
* directory and use the \Drupal\Tests\yourmodule\FunctionalJavascript
* namespace.
* - Add a @group annotation. Use yourmodule as the group name if the test does
* not belong to another larger group.
* - Set up PhantomJS; see http://phantomjs.org/download.html.
* - To run tests, see core/tests/README.md.
* - When clicking a link/button with Ajax behavior attached, keep in mind that
* the underlying browser might take time to deliver changes to the HTML. Use
* $this->assertSession()->assertWaitOnAjaxRequest() to wait for the Ajax
* request to finish.
* For more details, see:
* - https://www.drupal.org/docs/8/phpunit/phpunit-javascript-testing-tutorial
* for a full tutorial on how to write PHPUnit JavaScript tests for Drupal.
* - https://www.drupal.org/phpunit for the full documentation on how to write
* PHPUnit tests for Drupal.
*
* @section running Running tests
* You can run both Simpletest and PHPUnit tests by enabling the core Testing
* module (core/modules/simpletest). Once that module is enabled, tests can be
...
...
core/includes/install.core.inc
View file @
55845022
...
...
@@ -20,6 +20,7 @@
use
Drupal\Core\Site\Settings
;
use
Drupal\Core\StringTranslation\Translator\FileTranslation
;
use
Drupal\Core\StackMiddleware\ReverseProxyMiddleware
;
use
Drupal\Core\StreamWrapper\PublicStream
;
use
Drupal\Core\Extension\ExtensionDiscovery
;
use
Drupal\Core\DependencyInjection\ContainerBuilder
;
use
Drupal\Core\Url
;
...
...
@@ -1036,6 +1037,21 @@ function install_base_system(&$install_state) {
// Install system.module.
drupal_install_system
(
$install_state
);
// Prevent the installer from using the system temporary directory after the
// system module has been installed.
if
(
drupal_valid_test_ua
())
{
// While the temporary directory could be preset/enforced in settings.php
// like the public files directory, some tests expect it to be configurable
// in the UI. If declared in settings.php, they would no longer be
// configurable. The temporary directory needs to match what is set in each
// test types ::prepareEnvironment() step.
$temporary_directory
=
dirname
(
PublicStream
::
basePath
())
.
'/temp'
;
file_prepare_directory
(
$temporary_directory
,
FILE_MODIFY_PERMISSIONS
|
FILE_CREATE_DIRECTORY
);
\Drupal
::
configFactory
()
->
getEditable
(
'system.file'
)
->
set
(
'path.temporary'
,
$temporary_directory
)
->
save
();
}
// Call file_ensure_htaccess() to ensure that all of Drupal's standard
// directories (e.g., the public files directory and config directory) have
// appropriate .htaccess files. These directories will have already been
...
...
core/includes/install.inc
View file @
55845022
...
...
@@ -1044,10 +1044,11 @@ function drupal_check_module($module) {
*
* Example of .info.yml file:
* @code
* name = Minimal
* description = Start fresh, with only a few modules enabled.
* dependencies[] = block
* dependencies[] = dblog
* name: Minimal
* description: Start fresh, with only a few modules enabled.
* dependencies:
* - block
* - dblog
* @endcode
*
* @param $profile
...
...
core/includes/schema.inc
View file @
55845022
...
...
@@ -74,7 +74,7 @@ function drupal_get_schema_versions($module) {
* module is not installed.
*/
function
drupal_get_installed_schema_version
(
$module
,
$reset
=
FALSE
,
$array
=
FALSE
)
{
static
$versions
=
array
();
$versions
=
&
drupal_static
(
__FUNCTION__
,
array
()
)
;
if
(
$reset
)
{
$versions
=
array
();
...
...
core/lib/Drupal.php
View file @
55845022
...
...
@@ -81,7 +81,7 @@ class Drupal {
/**
* The current system version.
*/
const
VERSION
=
'8.2.
4
-dev'
;
const
VERSION
=
'8.2.
8
-dev'
;
/**
* Core API compatibility.
...
...
@@ -556,8 +556,7 @@ public static function linkGenerator() {
* Renders a link with a given link text and Url object.
*
* This method is a convenience wrapper for the link generator service's
* generate() method. For detailed documentation, see
* \Drupal\Core\Routing\LinkGeneratorInterface::generate().
* generate() method.
*
* @param string $text
* The link text for the anchor tag.
...
...
core/lib/Drupal/Component/Render/FormattableMarkup.php
View file @
55845022
...
...
@@ -147,7 +147,7 @@ public function jsonSerialize() {
* A call like:
* @code
* $string = "%output_text";
* $arguments = ['output_text' => 'text output here.'];
* $arguments = ['
%
output_text' => 'text output here.'];
* $this->placeholderFormat($string, $arguments);
* @endcode
* makes the following HTML code:
...
...
core/lib/Drupal/Core/Config/ConfigManager.php
View file @
55845022
...
...
@@ -297,7 +297,7 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
$dependency_manager
=
$this
->
getConfigDependencyManager
();
$dependents
=
$this
->
findConfigEntityDependentsAsEntities
(
$type
,
$names
,
$dependency_manager
);
$original_dependencies
=
$dependents
;
$delete_uuids
=
$update_uuids
=
[];
$delete_uuids
=
[];
$return
=
[
'update'
=>
[],
...
...
@@ -305,6 +305,13 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
'unchanged'
=>
[],
];
// Create a map of UUIDs to $original_dependencies key so that we can remove
// fixed dependencies.
$uuid_map
=
[];
foreach
(
$original_dependencies
as
$key
=>
$entity
)
{
$uuid_map
[
$entity
->
uuid
()]
=
$key
;
}
// Try to fix any dependencies and find out what will happen to the
// dependency graph. Entities are processed in the order of most dependent
// first. For example, this ensures that Menu UI third party dependencies on
...
...
@@ -340,8 +347,9 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
}
}
if
(
$fixed
)
{
// Remove the fixed dependency from the list of original dependencies.
unset
(
$original_dependencies
[
$uuid_map
[
$dependent
->
uuid
()]]);
$return
[
'update'
][]
=
$dependent
;
$update_uuids
[]
=
$dependent
->
uuid
();
}
}
// If the entity cannot be fixed then it has to be deleted.
...
...
@@ -354,8 +362,8 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
}
// Use the lists of UUIDs to filter the original list to work out which
// configuration entities are unchanged.
$return
[
'unchanged'
]
=
array_filter
(
$original_dependencies
,
function
(
$dependent
)
use
(
$delete_uuids
,
$update_uuids
)
{
return
!
(
in_array
(
$dependent
->
uuid
(),
$delete_uuids
)
||
in_array
(
$dependent
->
uuid
(),
$update_uuids
)
);
$return
[
'unchanged'
]
=
array_filter
(
$original_dependencies
,
function
(
$dependent
)
use
(
$delete_uuids
)
{
return
!
(
in_array
(
$dependent
->
uuid
(),
$delete_uuids
));
});
return
$return
;
...
...
core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
View file @
55845022
...
...
@@ -34,6 +34,11 @@ abstract class DraggableListBuilder extends ConfigEntityListBuilder implements F
*/
protected
$weightKey
=
FALSE
;
/**
* {@inheritdoc}
*/
protected
$limit
=
FALSE
;
/**
* The form builder.
*
...
...
core/lib/Drupal/Core/DrupalKernel.php
View file @
55845022
...
...
@@ -1031,8 +1031,17 @@ protected function initializeSettings(Request $request) {
$prefix
=
Settings
::
getApcuPrefix
(
'class_loader'
,
$this
->
root
);
$apc_loader
=
new
ApcClassLoader
(
$prefix
,
$this
->
classLoader
);
$this
->
classLoader
->
unregister
();
$apc_loader
->
register
();
// The optimized classloader might be persistent and store cache misses.
// For example, once a cache miss is stored in APCu clearing it on a
// specific web-head will not clear any other web-heads. Therefore
// fallback to the composer class loader that only statically caches
// misses.
$old_loader
=
$this
->
classLoader
;
$this
->
classLoader
=
$apc_loader
;
// Our class loaders are preprended to ensure they come first like the
// class loader they are replacing.
$old_loader
->
register
(
TRUE
);
$apc_loader
->
register
(
TRUE
);
}
}
...
...
core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
View file @
55845022
...
...
@@ -348,13 +348,10 @@ public static function getEntityLabels(array $entities) {
public
static
function
extractEntityIdFromAutocompleteInput
(
$input
)
{
$match
=
NULL
;
// Take "label (entity id)', match the ID from parenthesis when it's a
// number.
if
(
preg_match
(
"/.+\s\((\d+)\)/"
,
$input
,
$matches
))
{
$match
=
$matches
[
1
];
}
// Match the ID when it's a string (e.g. for config entity types).
elseif
(
preg_match
(
"/.+\s\(([\w.]+)\)/"
,
$input
,
$matches
))
{
// Take "label (entity id)', match the ID from inside the parentheses.
// @todo Add support for entities containing parentheses in their ID.
// @see https://www.drupal.org/node/2520416
if
(
preg_match
(
"/.+\s\(([^\)]+)\)/"
,
$input
,
$matches
))
{
$match
=
$matches
[
1
];
}
...
...
core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
View file @
55845022
...
...
@@ -303,6 +303,19 @@ public function fieldAccess($operation, FieldDefinitionInterface $field_definiti
// Get the default access restriction that lives within this field.
$default
=
$items
?
$items
->
defaultAccess
(
$operation
,
$account
)
:
AccessResult
::
allowed
();
// Explicitly disallow changing the entity ID and entity UUID.
if
(
$operation
===
'edit'
)
{
if
(
$field_definition
->
getName
()
===
$this
->
entityType
->
getKey
(
'id'
))
{
return
$return_as_object
?
AccessResult
::
forbidden
(
'The entity ID cannot be changed'
)
:
FALSE
;
}
elseif
(
$field_definition
->
getName
()
===
$this
->
entityType
->
getKey
(
'uuid'
))
{
// UUIDs can be set when creating an entity.
if
(
$items
&&
(
$entity
=
$items
->
getEntity
())
&&
!
$entity
->
isNew
())
{
return
$return_as_object
?
AccessResult
::
forbidden
(
'The entity UUID cannot be changed'
)
->
addCacheableDependency
(
$entity
)
:
FALSE
;
}
}
}
// Get the default access restriction as specified by the access control
// handler.
$entity_default
=
$this
->
checkFieldAccess
(
$operation
,
$field_definition
,
$account
,
$items
);
...
...
core/lib/Drupal/Core/Entity/EntityViewBuilder.php
View file @
55845022
...
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Field\FieldItemListInterface
;
use
Drupal\Core\Language\LanguageManagerInterface
;
use
Drupal\Core\Render\Element
;
use
Drupal\Core\Theme\Registry
;
use
Drupal\Core\TypedData\TranslatableInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
...
...
@@ -54,6 +55,13 @@ class EntityViewBuilder extends EntityHandlerBase implements EntityHandlerInterf
*/
protected
$languageManager
;
/**
* The theme registry.
*
* @var \Drupal\Core\Theme\Registry
*/
protected
$themeRegistry
;
/**
* The EntityViewDisplay objects created for individual field rendering.
*
...
...
@@ -72,12 +80,15 @@ class EntityViewBuilder extends EntityHandlerBase implements EntityHandlerInterf
* The entity manager service.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Drupal\Core\Theme\Registry $theme_registry
* The theme registry.
*/
public
function
__construct
(
EntityTypeInterface
$entity_type
,
EntityManagerInterface
$entity_manager
,
LanguageManagerInterface
$language_manager
)
{
public
function
__construct
(
EntityTypeInterface
$entity_type
,
EntityManagerInterface
$entity_manager
,
LanguageManagerInterface
$language_manager
,
Registry
$theme_registry
=
NULL
)
{
$this
->
entityTypeId
=
$entity_type
->
id
();
$this
->
entityType
=
$entity_type
;
$this
->
entityManager
=
$entity_manager
;
$this
->
languageManager
=
$language_manager
;
$this
->
themeRegistry
=
$theme_registry
?:
\Drupal
::
service
(
'theme.registry'
);
}
/**
...
...
@@ -87,7 +98,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI
return
new
static
(
$entity_type
,
$container
->
get
(
'entity.manager'
),
$container
->
get
(
'language_manager'
)
$container
->
get
(
'language_manager'
),
$container
->
get
(
'theme.registry'
)
);
}
...
...
@@ -148,7 +160,6 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
$this
->
moduleHandler
()
->
alter
(
'entity_view_mode'
,
$view_mode
,
$entity
,
$context
);
$build
=
array
(
'#theme'
=>
$this
->
entityTypeId
,
"#
{
$this
->
entityTypeId
}
"
=>
$entity
,
'#view_mode'
=>
$view_mode
,
// Collect cache defaults for this entity.
...
...
@@ -159,6 +170,11 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
),
);
// Add the default #theme key if a template exists for it.
if
(
$this
->
themeRegistry
->
getRuntime
()
->
has
(
$this
->
entityTypeId
))
{
$build
[
'#theme'
]
=
$this
->
entityTypeId
;
}
// Cache the rendered output if permitted by the view mode and global entity
// type configuration.
if
(
$this
->
isViewModeCacheable
(
$view_mode
)
&&
!
$entity
->
isNew
()
&&
$entity
->
isDefaultRevision
()
&&
$this
->
entityType
->
isRenderCacheable
())
{
...
...
core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
View file @
55845022
...
...
@@ -1257,7 +1257,11 @@ protected function saveToDedicatedTables(ContentEntityInterface $entity, $update
foreach
(
$storage_definition
->
getColumns
()
as
$column
=>
$attributes
)
{
$column_name
=
$table_mapping
->
getFieldColumnName
(
$storage_definition
,
$column
);
// Serialize the value if specified in the column schema.
$record
[
$column_name
]
=
!
empty
(
$attributes
[
'serialize'
])
?
serialize
(
$item
->
$column
)
:
$item
->
$column
;
$value
=
$item
->
$column
;
if
(
!
empty
(
$attributes
[
'serialize'
]))
{
$value
=
serialize
(
$value
);
}
$record
[
$column_name
]
=
drupal_schema_get_field_value
(
$attributes
,
$value
);
}
$query
->
values
(
$record
);
if
(
$this
->
entityType
->
isRevisionable
())
{
...
...
core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php
View file @
55845022
...
...
@@ -44,7 +44,16 @@ public function onResponse(FilterResponseEvent $event) {
*/
protected
function
transformRootRelativeUrlsToAbsolute
(
$rss_markup
,
Request
$request
)
{
$rss_dom
=
new
\DOMDocument
();
// Load the RSS, if there are parsing errors, abort and return the unchanged
// markup.
$previous_value
=
libxml_use_internal_errors
(
TRUE
);
$rss_dom
->
loadXML
(
$rss_markup
);
$errors
=
libxml_get_errors
();
libxml_use_internal_errors
(
$previous_value
);
if
(
$errors
)
{
return
$rss_markup
;
}
// Invoke Html::transformRootRelativeUrlsToAbsolute() on all HTML content
// embedded in this RSS feed.
...
...
core/lib/Drupal/Core/Field/FieldConfigStorageBase.php
View file @
55845022
...
...
@@ -21,8 +21,12 @@ abstract class FieldConfigStorageBase extends ConfigEntityStorage {
* {@inheritdoc}
*/
protected
function
mapFromStorageRecords
(
array
$records
)
{
foreach
(
$records
as
&
$record
)
{
foreach
(
$records
as
$id
=>
&
$record
)
{
$class
=
$this
->
fieldTypeManager
->
getPluginClass
(
$record
[
'field_type'
]);
if
(
empty
(
$class
))
{
$config_id
=
$this
->
getPrefix
()
.
$id
;
throw
new
\RuntimeException
(
"Unable to determine class for field type '
{
$record
[
'field_type'
]
}
' found in the '
$config_id
' configuration"
);
}
$record
[
'settings'
]
=
$class
::
fieldSettingsFromConfigData
(
$record
[
'settings'
]);
}
return
parent
::
mapFromStorageRecords
(
$records
);
...
...
core/lib/Drupal/Core/File/file.api.php
View file @
55845022
...
...
@@ -26,7 +26,7 @@
* file is not controlled by the current module, the return value should be
* NULL.
*
* @see
file_
download()
* @see
\Drupal\system\FileDownloadController::
download()
*/
function
hook_file_download
(
$uri
)
{
// Check to see if this is a config download.
...
...
Prev
1
2
3
4
5
…
17
Next