diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md
index cf90bc2e50f34..f5471bf653f4b 100644
--- a/CHANGELOG-2.7.md
+++ b/CHANGELOG-2.7.md
@@ -7,6 +7,10 @@ in 2.7 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1
+* 2.7.31 (2017-07-05)
+
+ * bug #23378 [FrameworkBundle] Do not remove files from assets dir (1ed)
+
* 2.7.30 (2017-07-03)
* bug #23341 [DoctrineBridge][Security][Validator] do not validate empty values (xabbuh)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 0b695308c528f..3e670f8d67e90 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -70,9 +70,9 @@ Symfony is the result of the work of many people who made the code better
- Deni
- Henrik Westphal (snc)
- Dariusz Górecki (canni)
+ - Jáchym Toušek (enumag)
- Titouan Galopin (tgalopin)
- Douglas Greenshields (shieldo)
- - Jáchym Toušek (enumag)
- Konstantin Myakshin (koc)
- Lee McDermott
- Brandon Turner
@@ -99,11 +99,12 @@ Symfony is the result of the work of many people who made the code better
- Baptiste Clavié (talus)
- Vladimir Reznichenko (kalessil)
- marc.weistroff
+ - Yonel Ceruto González (yonelceruto)
- lenar
- Włodzimierz Gajda (gajdaw)
- - Yonel Ceruto González (yonelceruto)
- Alexander Schwenn (xelaris)
- Jacob Dreesen (jdreesen)
+ - Tobias Nyholm (tobias)
- Florian Voutzinos (florianv)
- Colin Frei
- Adrien Brault (adrienbrault)
@@ -111,7 +112,6 @@ Symfony is the result of the work of many people who made the code better
- Peter Kokot (maastermedia)
- David Buchmann (dbu)
- excelwebzone
- - Tobias Nyholm (tobias)
- Tomáš Votruba (tomas_votruba)
- Fabien Pennequin (fabienpennequin)
- Gordon Franke (gimler)
@@ -133,12 +133,15 @@ Symfony is the result of the work of many people who made the code better
- Guilherme Blanco (guilhermeblanco)
- Pablo Godel (pgodel)
- Jérémie Augustin (jaugustin)
+ - Dany Maillard (maidmaid)
- Andréia Bohner (andreia)
- Rafael Dohms (rdohms)
- Arnaud Kleinpeter (nanocom)
- jwdeitch
+ - David Maicher (dmaicher)
- Mikael Pajunen
- Joel Wurtz (brouznouf)
+ - Grégoire Paris (greg0ire)
- Philipp Wahala (hifi)
- Vyacheslav Pavlov
- Richard van Laak (rvanlaak)
@@ -147,11 +150,9 @@ Symfony is the result of the work of many people who made the code better
- Thomas Rabaix (rande)
- Rouven Weßling (realityking)
- Teoh Han Hui (teohhanhui)
- - David Maicher (dmaicher)
- Jérôme Vasseur (jvasseur)
- Clemens Tolboom
- Helmer Aaviksoo
- - Grégoire Paris (greg0ire)
- Hiromi Hishida (77web)
- Matthieu Ouellette-Vachon (maoueh)
- Michał Pipa (michal.pipa)
@@ -234,7 +235,6 @@ Symfony is the result of the work of many people who made the code better
- Arjen Brouwer (arjenjb)
- Katsuhiro OGAWA
- Patrick McDougle (patrick-mcdougle)
- - Dany Maillard (maidmaid)
- Alif Rachmawadi
- Kristen Gilden (kgilden)
- Pierre-Yves LEBECQ (pylebecq)
@@ -620,6 +620,7 @@ Symfony is the result of the work of many people who made the code better
- develop
- ReenExe
- Mark Sonnabaum
+ - Maxime Veber (nek-)
- Richard Quadling
- jochenvdv
- Arturas Smorgun (asarturas)
@@ -642,6 +643,7 @@ Symfony is the result of the work of many people who made the code better
- Trent Steel (trsteel88)
- Yuen-Chi Lian
- Besnik Br
+ - Jose Gonzalez
- Dariusz Ruminski
- Joshua Nye
- Claudio Zizza
@@ -1081,7 +1083,6 @@ Symfony is the result of the work of many people who made the code better
- Max Summe
- WedgeSama
- Felds Liscia
- - Maxime Veber (nek-)
- Sullivan SENECHAL
- Tadcka
- Beth Binkovitz
@@ -1092,12 +1093,12 @@ Symfony is the result of the work of many people who made the code better
- Tomaz Ahlin
- Marcus Stöhr (dafish)
- Emmanuel Vella (emmanuel.vella)
+ - Adam Szaraniec (mimol)
- Carsten Nielsen (phreaknerd)
- Mathieu Rochette
- Jay Severson
- René Kerner
- Nathaniel Catchpole
- - Jose Gonzalez
- Adrien Samson (adriensamson)
- Samuel Gordalina (gordalina)
- Max Romanovsky (maxromanovsky)
@@ -1258,6 +1259,7 @@ Symfony is the result of the work of many people who made the code better
- Aarón Nieves Fernández
- Mike Meier
- Kirill Saksin
+ - Julien Pauli
- Koalabaerchen
- michalmarcinkowski
- Warwick
@@ -1305,6 +1307,7 @@ Symfony is the result of the work of many people who made the code better
- klemens
- dened
- Dmitry Korotovsky
+ - mcorteel
- Michael van Tricht
- Sam Ward
- Walther Lalk
@@ -1335,6 +1338,7 @@ Symfony is the result of the work of many people who made the code better
- Jan Marek (janmarek)
- Mark de Haan (markdehaan)
- Dan Patrick (mdpatrick)
+ - Pedro Magalhães (pmmaga)
- Rares Vlaseanu (raresvla)
- tante kinast (tante)
- Vincent LEFORT (vlefort)
@@ -1542,6 +1546,7 @@ Symfony is the result of the work of many people who made the code better
- Abdulkadir N. A.
- Yevgen Kovalienia
- Lebnik
+ - Shude
- Ondřej Führer
- Sema
- Elan Ruusamäe
diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
index 0a3ea2871deb3..27cccd869e9a0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
@@ -92,7 +92,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$validAssetDirs = array();
foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) {
if (is_dir($originDir = $bundle->getPath().'/Resources/public')) {
- $targetDir = $bundlesDir.preg_replace('/bundle$/', '', strtolower($bundle->getName()));
+ $assetDir = preg_replace('/bundle$/', '', strtolower($bundle->getName()));
+ $targetDir = $bundlesDir.$assetDir;
+ $validAssetDirs[] = $assetDir;
$output->writeln(sprintf('Installing assets for %s into %s', $bundle->getNamespace(), $targetDir));
@@ -132,15 +134,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$this->hardCopy($originDir, $targetDir);
}
- $validAssetDirs[] = $targetDir;
}
}
+
// remove the assets of the bundles that no longer exist
- foreach (new \FilesystemIterator($bundlesDir) as $dir) {
- if (!in_array($dir, $validAssetDirs)) {
- $filesystem->remove($dir);
- }
- }
+ $dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir);
+ $filesystem->remove($dirsToRemove);
}
/**
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
index 3abfd9585f159..5996415e10a64 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
@@ -78,27 +78,27 @@ public function testSecurityConfigurationForMultipleIPAddresses($config)
$this->assertRestricted($barredClient, '/secured-by-two-ips');
}
- /**
- * @dataProvider getConfigs
- */
- public function testSecurityConfigurationForExpression($config)
- {
- $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0'));
- $this->assertAllowed($allowedClient, '/protected-via-expression');
-
- $barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
- $this->assertRestricted($barredClient, '/protected-via-expression');
-
- $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
-
- $allowedClient->request('GET', '/protected-via-expression');
- $form = $allowedClient->followRedirect()->selectButton('login')->form();
- $form['_username'] = 'johannes';
- $form['_password'] = 'test';
- $allowedClient->submit($form);
- $this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression');
- $this->assertAllowed($allowedClient, '/protected-via-expression');
- }
+ /**
+ * @dataProvider getConfigs
+ */
+ public function testSecurityConfigurationForExpression($config)
+ {
+ $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0'));
+ $this->assertAllowed($allowedClient, '/protected-via-expression');
+
+ $barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
+ $this->assertRestricted($barredClient, '/protected-via-expression');
+
+ $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
+
+ $allowedClient->request('GET', '/protected-via-expression');
+ $form = $allowedClient->followRedirect()->selectButton('login')->form();
+ $form['_username'] = 'johannes';
+ $form['_password'] = 'test';
+ $allowedClient->submit($form);
+ $this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression');
+ $this->assertAllowed($allowedClient, '/protected-via-expression');
+ }
private function assertAllowed($client, $path)
{
diff --git a/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php b/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php
index 6d4e57e984504..8ef97bfd58822 100644
--- a/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php
+++ b/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php
@@ -43,17 +43,17 @@ public function testConstructor()
$this->assertEquals($loader->findFile('\LegacyApc\Namespaced\FooBar'), apcu_fetch('test.prefix.\LegacyApc\Namespaced\FooBar'), '__construct() takes a prefix as its first argument');
}
- /**
- * @dataProvider getLoadClassTests
- */
- public function testLoadClass($className, $testClassName, $message)
- {
- $loader = new ApcUniversalClassLoader('test.prefix.');
- $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
- $loader->registerPrefix('LegacyApc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
- $loader->loadClass($testClassName);
- $this->assertTrue(class_exists($className), $message);
- }
+ /**
+ * @dataProvider getLoadClassTests
+ */
+ public function testLoadClass($className, $testClassName, $message)
+ {
+ $loader = new ApcUniversalClassLoader('test.prefix.');
+ $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
+ $loader->registerPrefix('LegacyApc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
+ $loader->loadClass($testClassName);
+ $this->assertTrue(class_exists($className), $message);
+ }
public function getLoadClassTests()
{
@@ -63,19 +63,19 @@ public function getLoadClassTests()
);
}
- /**
- * @dataProvider getLoadClassFromFallbackTests
- */
- public function testLoadClassFromFallback($className, $testClassName, $message)
- {
- $loader = new ApcUniversalClassLoader('test.prefix.fallback');
- $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
- $loader->registerPrefix('LegacyApc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
- $loader->registerNamespaceFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/fallback'));
- $loader->registerPrefixFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/fallback'));
- $loader->loadClass($testClassName);
- $this->assertTrue(class_exists($className), $message);
- }
+ /**
+ * @dataProvider getLoadClassFromFallbackTests
+ */
+ public function testLoadClassFromFallback($className, $testClassName, $message)
+ {
+ $loader = new ApcUniversalClassLoader('test.prefix.fallback');
+ $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
+ $loader->registerPrefix('LegacyApc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
+ $loader->registerNamespaceFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/fallback'));
+ $loader->registerPrefixFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/fallback'));
+ $loader->loadClass($testClassName);
+ $this->assertTrue(class_exists($className), $message);
+ }
public function getLoadClassFromFallbackTests()
{
@@ -87,18 +87,18 @@ public function getLoadClassFromFallbackTests()
);
}
- /**
- * @dataProvider getLoadClassNamespaceCollisionTests
- */
- public function testLoadClassNamespaceCollision($namespaces, $className, $message)
- {
- $loader = new ApcUniversalClassLoader('test.prefix.collision.');
- $loader->registerNamespaces($namespaces);
+ /**
+ * @dataProvider getLoadClassNamespaceCollisionTests
+ */
+ public function testLoadClassNamespaceCollision($namespaces, $className, $message)
+ {
+ $loader = new ApcUniversalClassLoader('test.prefix.collision.');
+ $loader->registerNamespaces($namespaces);
- $loader->loadClass($className);
+ $loader->loadClass($className);
- $this->assertTrue(class_exists($className), $message);
- }
+ $this->assertTrue(class_exists($className), $message);
+ }
public function getLoadClassNamespaceCollisionTests()
{
@@ -138,17 +138,17 @@ public function getLoadClassNamespaceCollisionTests()
);
}
- /**
- * @dataProvider getLoadClassPrefixCollisionTests
- */
- public function testLoadClassPrefixCollision($prefixes, $className, $message)
- {
- $loader = new ApcUniversalClassLoader('test.prefix.collision.');
- $loader->registerPrefixes($prefixes);
-
- $loader->loadClass($className);
- $this->assertTrue(class_exists($className), $message);
- }
+ /**
+ * @dataProvider getLoadClassPrefixCollisionTests
+ */
+ public function testLoadClassPrefixCollision($prefixes, $className, $message)
+ {
+ $loader = new ApcUniversalClassLoader('test.prefix.collision.');
+ $loader->registerPrefixes($prefixes);
+
+ $loader->loadClass($className);
+ $this->assertTrue(class_exists($className), $message);
+ }
public function getLoadClassPrefixCollisionTests()
{
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index 93be7003c1b37..6233186a48e22 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -58,11 +58,11 @@ abstract class Kernel implements KernelInterface, TerminableInterface
protected $startTime;
protected $loadClassCache;
- const VERSION = '2.7.30';
- const VERSION_ID = 20730;
+ const VERSION = '2.7.31';
+ const VERSION_ID = 20731;
const MAJOR_VERSION = 2;
const MINOR_VERSION = 7;
- const RELEASE_VERSION = 30;
+ const RELEASE_VERSION = 31;
const EXTRA_VERSION = '';
const END_OF_MAINTENANCE = '05/2018';