Skip to content

Commit d9c9e0c

Browse files
Merge branch '3.4' into 4.1
* 3.4: (21 commits) Added the Code of Conduct file do not override custom access decision configs [Security] Do not deauthenticate user when the first refreshed user has changed invalidate stale commits for PRs too add missing cache prefix seed attribute to XSD fix command description Fix class documentation [Validator] Add a missing translation [FrameworkBundle] Fix 3.4 tests [DI] fix dumping inline services again Fix phpdocs [EventDispatcher] Remove template method in test case Added LB translation for symfony#27993 (UUID validator message translation) Replace deprecated validateValue with validate [FWBundle] Automatically enable PropertyInfo when using Flex [Process] fix locking of pipe files on Windows Correct PHPDoc type for float ttl bumped Symfony version to 3.4.18 updated VERSION for 3.4.17 updated CHANGELOG for 3.4.17 ...
2 parents 5ee954c + 68e54f0 commit d9c9e0c

File tree

31 files changed

+606
-104
lines changed

31 files changed

+606
-104
lines changed

.github/rm-invalid-lowest-lock-files.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ function getContentHash(array $composerJson)
104104
}
105105
}
106106

107-
if (!$referencedCommits || (isset($_SERVER['TRAVIS_PULL_REQUEST']) && 'false' !== $_SERVER['TRAVIS_PULL_REQUEST'])) {
108-
// cached commits cannot be stale for PRs
107+
if (!$referencedCommits) {
109108
return;
110109
}
111110

CODE_OF_CONDUCT.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Code of Conduct
2+
===============
3+
4+
Our Pledge
5+
----------
6+
7+
In the interest of fostering an open and welcoming environment, we as
8+
contributors and maintainers pledge to making participation in our project and
9+
our community a harassment-free experience for everyone, regardless of age, body
10+
size, disability, ethnic origin, gender identity and expression, level of
11+
experience, education, socio-economic status, nationality, personal appearance,
12+
religion, or sexual identity and orientation.
13+
14+
Our Standards
15+
-------------
16+
17+
Examples of behavior that contributes to creating a positive environment
18+
include:
19+
20+
* Using welcoming and inclusive language
21+
* Being respectful of differing viewpoints and experiences
22+
* Gracefully accepting constructive criticism
23+
* Focusing on what is best for the community
24+
* Showing empathy towards other community members
25+
26+
Examples of unacceptable behavior by participants include:
27+
28+
* The use of sexualized language or imagery and unwelcome sexual attention or
29+
advances
30+
* Trolling, insulting/derogatory comments, and personal or political attacks
31+
* Public or private harassment
32+
* Publishing others' private information, such as a physical or electronic
33+
address, without explicit permission
34+
* Other conduct which could reasonably be considered inappropriate in a
35+
professional setting
36+
37+
Our Responsibilities
38+
--------------------
39+
40+
[CoC Active Response Ensurers, or CARE][1], are responsible for clarifying the
41+
standards of acceptable behavior and are expected to take appropriate and fair
42+
corrective action in response to any instances of unacceptable behavior.
43+
44+
CARE team members have the right and responsibility to remove, edit, or reject
45+
comments, commits, code, wiki edits, issues, and other contributions that are
46+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
47+
contributor for other behaviors that they deem inappropriate, threatening,
48+
offensive, or harmful.
49+
50+
Scope
51+
-----
52+
53+
This Code of Conduct applies both within project spaces and in public spaces
54+
when an individual is representing the project or its community. Examples of
55+
representing a project or community include using an official project e-mail
56+
address, posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event. Representation of a project may be
58+
further defined and clarified by CARE team members.
59+
60+
Enforcement
61+
-----------
62+
63+
Instances of abusive, harassing, or otherwise unacceptable behavior
64+
[may be reported][2] by contacting the [CARE team members][1].
65+
All complaints will be reviewed and investigated and will result in a response
66+
that is deemed necessary and appropriate to the circumstances. The CARE team is
67+
obligated to maintain confidentiality with regard to the reporter of an
68+
incident. Further details of specific enforcement policies may be posted
69+
separately.
70+
71+
CARE team members who do not follow or enforce the Code of Conduct in good
72+
faith may face temporary or permanent repercussions as determined by the
73+
[core team][3].
74+
75+
Attribution
76+
-----------
77+
78+
This Code of Conduct is adapted from the [Contributor Covenant version 1.4][4].
79+
80+
[1]: https://symfony.com/doc/current/contributing/code_of_conduct/care_team.html
81+
[2]: https://symfony.com/doc/current/contributing/code_of_conduct/reporting_guidelines.html
82+
[3]: https://symfony.com/doc/current/contributing/code/core_team.html
83+
[4]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Symfony\Component\Lock\Lock;
2323
use Symfony\Component\Lock\Store\SemaphoreStore;
2424
use Symfony\Component\Messenger\MessageBusInterface;
25+
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
2526
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
2627
use Symfony\Component\Serializer\Serializer;
2728
use Symfony\Component\Translation\Translator;
@@ -833,7 +834,7 @@ private function addPropertyInfoSection(ArrayNodeDefinition $rootNode)
833834
->children()
834835
->arrayNode('property_info')
835836
->info('Property info configuration')
836-
->canBeEnabled()
837+
->{!class_exists(FullStack::class) && interface_exists(PropertyInfoExtractorInterface::class) ? 'canBeDisabled' : 'canBeEnabled'}()
837838
->end()
838839
->end()
839840
;

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@
260260
<xsd:element name="default-memcached-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
261261
<xsd:element name="pool" type="cache_pool" minOccurs="0" maxOccurs="unbounded" />
262262
</xsd:sequence>
263+
264+
<xsd:attribute name="prefix-seed" type="xsd:string" />
263265
</xsd:complexType>
264266

265267
<xsd:complexType name="cache_pool">

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ protected static function getBundleDefaultConfig()
218218
'throw_exception_on_invalid_index' => false,
219219
),
220220
'property_info' => array(
221-
'enabled' => false,
221+
'enabled' => !class_exists(FullStack::class),
222222
),
223223
'router' => array(
224224
'enabled' => false,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,6 @@ public function testSerializerServiceIsNotRegisteredWhenDisabled()
11551155
$this->assertFalse($container->hasDefinition('serializer'));
11561156
}
11571157

1158-
public function testPropertyInfoDisabled()
1159-
{
1160-
$container = $this->createContainerFromFile('default_config');
1161-
$this->assertFalse($container->has('property_info'));
1162-
}
1163-
11641158
public function testPropertyInfoEnabled()
11651159
{
11661160
$container = $this->createContainerFromFile('property_info');

src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ public function getConfigTreeBuilder()
5858
return false;
5959
})
6060
->then(function ($v) {
61-
$v['access_decision_manager'] = array(
62-
'strategy' => AccessDecisionManager::STRATEGY_AFFIRMATIVE,
63-
);
61+
$v['access_decision_manager']['strategy'] = AccessDecisionManager::STRATEGY_AFFIRMATIVE;
6462

6563
return $v;
6664
})

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,22 @@ public function testCustomAccessDecisionManagerService()
438438

439439
/**
440440
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
441-
* @expectedExceptionMessage "strategy" and "service" cannot be used together.
441+
* @expectedExceptionMessage Invalid configuration for path "security.access_decision_manager": "strategy" and "service" cannot be used together.
442442
*/
443443
public function testAccessDecisionManagerServiceAndStrategyCannotBeUsedAtTheSameTime()
444444
{
445-
$container = $this->getContainer('access_decision_manager_service_and_strategy');
445+
$this->getContainer('access_decision_manager_service_and_strategy');
446+
}
447+
448+
public function testAccessDecisionManagerOptionsAreNotOverriddenByImplicitStrategy()
449+
{
450+
$container = $this->getContainer('access_decision_manager_customized_config');
451+
452+
$accessDecisionManagerDefinition = $container->getDefinition('security.access.decision_manager');
453+
454+
$this->assertSame(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $accessDecisionManagerDefinition->getArgument(1));
455+
$this->assertTrue($accessDecisionManagerDefinition->getArgument(2));
456+
$this->assertFalse($accessDecisionManagerDefinition->getArgument(3));
446457
}
447458

448459
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
$container->loadFromExtension('security', array(
4+
'access_decision_manager' => array(
5+
'allow_if_all_abstain' => true,
6+
'allow_if_equal_granted_denied' => false,
7+
),
8+
'providers' => array(
9+
'default' => array(
10+
'memory' => array(
11+
'users' => array(
12+
'foo' => array('password' => 'foo', 'roles' => 'ROLE_USER'),
13+
),
14+
),
15+
),
16+
),
17+
'firewalls' => array(
18+
'simple' => array('pattern' => '/login', 'security' => false),
19+
),
20+
));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<srv:container xmlns="http://symfony.com/schema/dic/security"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:srv="http://symfony.com/schema/dic/services"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
6+
7+
<config>
8+
<access-decision-manager allow-if-all-abstain="true" allow-if-equal-granted-denied="false" />
9+
10+
<provider name="default">
11+
<memory>
12+
<user name="foo" password="foo" roles="ROLE_USER" />
13+
</memory>
14+
</provider>
15+
16+
<firewall name="simple" pattern="/login" security="false" />
17+
</config>
18+
</srv:container>

0 commit comments

Comments
 (0)