Skip to content

Commit 425862a

Browse files
committed
Fixing license header, adding license file, updating namespace
1 parent 134468a commit 425862a

27 files changed

+284
-395
lines changed

Diff for: .gush.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Gush configuration file, any comments will be lost.
2+
repo_adapter: github
3+
issue_tracker: github
4+
repo_org: php-cache
5+
repo_name: cache-bundle
6+
issue_project_org: php-cache
7+
issue_project_name: cache-bundle
8+
meta-header: "This file is part of php-cache\\cache-bundle package.\n\n(c) 2015-2015 Aaron Scherer <[email protected]>\n\nThis source file is subject to the MIT license that is bundled\nwith this source code in the file LICENSE."

Diff for: LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Aaron Scherer
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

Diff for: README.md

+15-28
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
Aequasi cache-bundle [![Build Status](https://travis-ci.org/aequasi/cache-bundle.png?branch=master)](https://travis-ci.org/aequasi/cache-bundle)
1+
PHP-Cache cache-bundle [![Build Status](https://travis-ci.org/php-cache/cache-bundle.png?branch=master)](https://travis-ci.org/php-cache/cache-bundle)
22
====================
33

44
#### Cache Bundle for Symfony 2
55

6-
Creates services in Symfony 2, for cache, that can also be used with doctrines three cache types (metadata, result, and query). It also provides functionality for session handler support, and Router support.
6+
Symfony 2 library providing PSR-6 compliant cache services for the user.
7+
It also lets you cache your sessions and routes.
78

89
The respective cache extensions will be required for your project.
910

@@ -19,33 +20,19 @@ Redis uses the php redis extension.
1920

2021
Run the following in your project root, assuming you have composer set up for your project
2122
```sh
22-
composer.phar require aequasi/cache-bundle
23+
composer.phar require cache/cache-bundle
2324
```
2425

2526
Add the bundle to app/AppKernel.php
2627

2728
```php
2829
$bundles(
2930
...
30-
new Aequasi\Bundle\CacheBundle\AequasiCacheBundle(),
31+
new Cache\CacheBundle\CacheBundle(),
3132
...
3233
);
33-
```
34-
35-
Then add parameters (probably in config.yml) for your servers, and options
36-
37-
```yml
38-
aequasi_cache:
39-
instances:
40-
default:
41-
persistent: true # Boolean or persistent_id
42-
namespace: mc
43-
type: memcached
44-
hosts:
45-
- { host: localhost, port: 11211 }
46-
```
4734

48-
To see all the config options, run `php app/console config:dump-reference aequasi_cache` to view the config settings
35+
To see all the config options, run `php app/console config:dump-reference cache` to view the config settings
4936

5037

5138
#### Doctrine
@@ -55,16 +42,16 @@ This bundle allows you to use its services for Doctrine's caching methods of met
5542
If you want doctrine to use this as the result and query cache, add this
5643

5744
```yml
58-
aequasi_cache:
45+
cache:
5946
doctrine:
6047
enabled: true
6148
metadata:
6249
instance: default
63-
entity_managers: [ default ] # the name of your entity_manager connection
50+
entity_managers: [ default ] # the name of your entity_manager connection
6451
document_managers: [ default ] # the name of your document_manager connection
6552
result:
6653
instance: default
67-
entity_managers: [ default, read ] # you may specify multiple entity_managers
54+
entity_managers: [ default, read ] # you may specify multiple entity_managers
6855
query:
6956
instance: default
7057
entity_managers: [ default ]
@@ -75,7 +62,7 @@ aequasi_cache:
7562
This bundle even allows you to store your session data in one of your cache clusters. To enable:
7663

7764
```yml
78-
aequasi_cache:
65+
cache:
7966
session:
8067
enabled: true
8168
instance: default
@@ -88,7 +75,7 @@ aequasi_cache:
8875
This bundle also provides router caching, to help speed that section up. To enable:
8976
9077
```yml
91-
aequasi_cache:
78+
cache:
9279
router:
9380
enabled: true
9481
instance: default
@@ -103,15 +90,15 @@ To use this with doctrine's entity manager, just make sure you have `useResultCa
10390

10491
```php
10592
// Change default to the name of your instance
106-
$cache = $container->get( 'aequasi_cache.instance.default' );
93+
$cache = $container->get( 'cache.instance.default' );
10794
// Or
108-
$cache = $container->get( 'aequasi_cache.default' );
95+
$cache = $container->get( 'cache.default' );
10996
```
11097

11198
Here is an example usage of the service:
11299

113100
```php
114-
$cache = $this->get( 'aequasi_cache.instance.default' );
101+
$cache = $this->get( 'cache.instance.default' );
115102
$item = $cache->getItem('test');
116103
if ($item->isHit()) {
117104
var_dump($item->get());
@@ -124,4 +111,4 @@ $cache->saveItem('test', $em->find('AcmeDemoBundle:User', 1), 3600);
124111

125112
### Need Help?
126113

127-
Create an issue if you've found a bug, or ping me on twitter: @aequasi
114+
Create an issue if you've found a bug, or ping one of us on twitter: @aequasi or @TobiasNyholm

Diff for: composer.json

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
{
2-
"name": "aequasi/cache-bundle",
2+
"name": "cache/cache-bundle",
33
"type": "library",
4-
"description": "Creates services in Symfony 2, for cache, that can also be used with doctrines three cache types. It also provides functionality for session handler support, and Router support.",
4+
"description": "Symfony 2 library providing PSR-6 compliant cache services for the user. Many other features.",
55
"keywords": [
66
"php",
77
"cache",
88
"redis",
9-
"memcached"
9+
"memcached",
10+
"router",
11+
"session"
1012
],
11-
"homepage": "https://github.com/aequasi/cache-bundle",
12-
"license": "Apache v2",
13+
"homepage": "https://github.com/php-cache/cache-bundle",
14+
"license": "MIT",
1315
"authors": [
1416
{
1517
"name": "Aaron Scherer",
1618
"email": "[email protected]",
1719
"homepage": "https://github.com/aequasi"
20+
},
21+
{
22+
"name": "Tobias Nyholm",
23+
"email": "[email protected]",
24+
"homepage": "https://github.com/nyholm"
1825
}
1926
],
2027
"support": {
2128
"email": "[email protected]"
2229
},
2330
"require": {
24-
"php": "^5.5|^7",
25-
"symfony/framework-bundle": "^2.7|^3.0",
26-
"doctrine/cache": "^1.3",
27-
"aequasi/psr-6-doctrine-bridge": "^1.2",
28-
"psr/cache-implementation": "~1.0"
31+
"php": "^5.5|^7",
32+
"symfony/framework-bundle": "^2.7|^3.0",
33+
"psr/cache-implementation": "~1.0"
2934
},
3035
"require-dev": {
31-
"phpunit/phpunit": "^5.1|^4.0"
36+
"phpunit/phpunit": "^5.1|^4.0",
37+
"cache/doctrine-cache": "dev-master@dev",
38+
"psr/cache": "dev-master"
3239
},
3340
"repositories": [
3441
{
@@ -42,12 +49,12 @@
4249
},
4350
"autoload": {
4451
"psr-4": {
45-
"Aequasi\\Bundle\\CacheBundle\\": "src/"
52+
"Cache\\CacheBundle\\": "src/"
4653
}
4754
},
4855
"autoload-dev": {
4956
"psr-4": {
50-
"Aequasi\\Bundle\\CacheBundle\\Tests\\": "tests/"
57+
"Cache\\CacheBundle\\Tests\\": "tests/"
5158
}
5259
}
5360
}

Diff for: src/Cache/LoggingCachePool.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22

3-
/**
4-
* This file is part of cache-bundle
3+
/*
4+
* This file is part of php-cache\cache-bundle package.
55
*
6-
* (c) Aaron Scherer <[email protected]>
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>
77
*
8-
* This source file is subject to the license that is bundled
9-
* with this source code in the file LICENSE
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
1010
*/
1111

12-
namespace Aequasi\Bundle\CacheBundle\Cache;
12+
namespace Cache\CacheBundle\Cache;
1313

1414
use Aequasi\Cache\CacheItem;
1515
use Aequasi\Cache\CachePool;

Diff for: src/Cache/Memcached.php

-32
This file was deleted.

Diff for: src/AequasiCacheBundle.php renamed to src/CacheBundle.php

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
<?php
22

3-
/**
4-
* @author Aaron Scherer <[email protected]>
5-
* @date 2013
6-
* @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
710
*/
811

9-
namespace Aequasi\Bundle\CacheBundle;
12+
namespace Cache\CacheBundle;
1013

1114
use Symfony\Component\HttpKernel\Bundle\Bundle;
1215
use Symfony\Component\DependencyInjection\ContainerBuilder;
13-
use Aequasi\Bundle\CacheBundle\DependencyInjection\Compiler;
16+
use Cache\CacheBundle\DependencyInjection\Compiler;
1417

1518
/**
1619
* Class AequasiCacheBundle
1720
*
1821
* @author Aaron Scherer <[email protected]>
1922
*/
20-
class AequasiCacheBundle extends Bundle
23+
class CacheBundle extends Bundle
2124
{
2225
/**
2326
* {@inheritDoc}

Diff for: src/Command/CacheFlushCommand.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22

3-
/**
4-
* @author Aaron Scherer
5-
* @date 12/10/13
6-
* @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
710
*/
811

9-
namespace Aequasi\Bundle\CacheBundle\Command;
12+
namespace Cache\CacheBundle\Command;
1013

1114
use Psr\Cache\CacheItemPoolInterface;
1215
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;

Diff for: src/DataCollector/CacheDataCollector.php

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
<?php
22

3-
/**
4-
* @author Aaron Scherer
5-
* @date 12/9/13
6-
* @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
710
*/
811

9-
namespace Aequasi\Bundle\CacheBundle\DataCollector;
12+
namespace Cache\CacheBundle\DataCollector;
1013

11-
use Aequasi\Bundle\CacheBundle\Cache\LoggingCachePool;
12-
use Aequasi\Bundle\CacheBundle\Service\CacheService;
14+
use Cache\CacheBundle\Cache\LoggingCachePool;
15+
use Cache\CacheBundle\Service\CacheService;
1316
use Symfony\Component\HttpFoundation\Request;
1417
use Symfony\Component\HttpFoundation\Response;
1518
use Symfony\Component\HttpKernel\DataCollector\DataCollector;

Diff for: src/DependencyInjection/Builder/BaseBuilder.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22

3-
/**
4-
* @author Aaron Scherer
5-
* @date 12/6/13
6-
* @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
710
*/
811

9-
namespace Aequasi\Bundle\CacheBundle\DependencyInjection\Builder;
12+
namespace Cache\CacheBundle\DependencyInjection\Builder;
1013

1114
use Symfony\Component\DependencyInjection\ContainerBuilder;
1215

0 commit comments

Comments
 (0)