merged branch willdurand/filesystem-component (PR #2949)
Commits -------4afc6ac
Updated CHANGELOG-2.13d3239c
Added Filesystem Component mention in composer.json5775a0a
Added composer.jsonb26ae4a
Added READMEfbe9507
Added LICENSE818a332
[Component] Moved Filesystem class to its own component Discussion ---------- Filesystem component Related to #2946 William --------------------------------------------------------------------------- by stof at 2011/12/22 10:58:25 -0800 you need to add the new component in the ``replace`` section of the main composer.json, and you also need to add it as a dependency for FrameworkBundle as it defines a service using it. --------------------------------------------------------------------------- by stof at 2011/12/22 10:59:34 -0800 and you need to update the changelog file --------------------------------------------------------------------------- by willdurand at 2011/12/22 11:06:04 -0800 @stof thanks. Is it ok ? --------------------------------------------------------------------------- by stof at 2011/12/22 11:13:31 -0800 mentioning the move only once in the changelog would probably be enough (and it is especially not needed in the FrameworkBundle section IMO) but otherwise it's fine
This commit is contained in:
commit
b498138471
@ -33,6 +33,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||
* [BC BREAK] assets_base_urls and base_urls merging strategy has changed
|
||||
* changed the default profiler storage to use the filesystem instead of SQLite
|
||||
* added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
|
||||
* added Filesystem component as a dependency
|
||||
|
||||
### SecurityBundle
|
||||
|
||||
@ -128,6 +129,10 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||
* added a reference to the EventDispatcher on the Event
|
||||
* added a reference to the Event name on the event
|
||||
|
||||
### Filesystem
|
||||
|
||||
* created this new component
|
||||
|
||||
### Finder
|
||||
|
||||
* Finder::exclude() now supports an array of directories as an argument
|
||||
@ -160,6 +165,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||
* improved extensibility between bundles
|
||||
* added a File-based profiler storage
|
||||
* added a MongoDB-based profiler storage
|
||||
* moved Filesystem class to its own component
|
||||
|
||||
### Locale
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
"symfony/dependency-injection": "self.version",
|
||||
"symfony/dom-crawler": "self.version",
|
||||
"symfony/event-dispatcher": "self.version",
|
||||
"symfony/filesystem": "self.version",
|
||||
"symfony/finder": "self.version",
|
||||
"symfony/form": "self.version",
|
||||
"symfony/http-foundation": "self.version",
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parameters>
|
||||
<parameter key="event_dispatcher.class">Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher</parameter>
|
||||
<parameter key="http_kernel.class">Symfony\Bundle\FrameworkBundle\HttpKernel</parameter>
|
||||
<parameter key="filesystem.class">Symfony\Component\HttpKernel\Util\Filesystem</parameter>
|
||||
<parameter key="filesystem.class">Symfony\Component\Filesystem\Filesystem</parameter>
|
||||
<parameter key="cache_warmer.class">Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate</parameter>
|
||||
<parameter key="cache_clearer.class">Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer</parameter>
|
||||
<parameter key="file_locator.class">Symfony\Component\HttpKernel\Config\FileLocator</parameter>
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
|
@ -30,8 +30,8 @@ while ($dir !== $lastDir) {
|
||||
$dir = dirname($dir);
|
||||
}
|
||||
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Translation;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
|
||||
use Symfony\Component\Translation\MessageCatalogue;
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\Translation\MessageSelector;
|
||||
|
||||
class TranslatorTest extends \PHPUnit_Framework_TestCase
|
||||
|
@ -20,6 +20,7 @@
|
||||
"php": ">=5.3.2",
|
||||
"symfony/event-dispatcher": "self.version",
|
||||
"symfony/http-kernel": "self.version",
|
||||
"symfony/filesystem": "self.version",
|
||||
"symfony/routing": "self.version",
|
||||
"symfony/templating": "self.version",
|
||||
"symfony/translator": "self.version",
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
|
@ -30,8 +30,8 @@ while ($dir !== $lastDir) {
|
||||
$dir = dirname($dir);
|
||||
}
|
||||
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Util;
|
||||
namespace Symfony\Component\Filesystem;
|
||||
|
||||
/**
|
||||
* Provides basic utility to manipulate the file system.
|
19
src/Symfony/Component/Filesystem/LICENSE
Normal file
19
src/Symfony/Component/Filesystem/LICENSE
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2004-2011 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
29
src/Symfony/Component/Filesystem/README.md
Normal file
29
src/Symfony/Component/Filesystem/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
Filesystem Component
|
||||
====================
|
||||
|
||||
Filesystem provides basic utility to manipulate the file system:
|
||||
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
|
||||
$filesystem->copy($originFile, $targetFile, $override = false);
|
||||
|
||||
$filesystem->mkdir($dirs, $mode = 0777);
|
||||
|
||||
$filesystem->touch($files);
|
||||
|
||||
$filesystem->remove($files);
|
||||
|
||||
$filesystem->chmod($files, $mode, $umask = 0000);
|
||||
|
||||
$filesystem->rename($origin, $target);
|
||||
|
||||
$filesystem->symlink($originDir, $targetDir, $copyOnWindows = false);
|
||||
|
||||
$filesystem->makePathRelative($endPath, $startPath);
|
||||
|
||||
$filesystem->mirror($originDir, $targetDir, \Traversable $iterator = null, $options = array());
|
||||
|
||||
$filesystem->isAbsolutePath($file);
|
||||
|
26
src/Symfony/Component/Filesystem/composer.json
Normal file
26
src/Symfony/Component/Filesystem/composer.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"type": "library",
|
||||
"description": "Symfony Filesystem Component",
|
||||
"keywords": [],
|
||||
"homepage": "http://symfony.com",
|
||||
"version": "2.1.0",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Symfony\\Component\\Filesystem": "" }
|
||||
},
|
||||
"target-dir": "Symfony/Component/Filesystem"
|
||||
}
|
Reference in New Issue
Block a user