File tree Expand file tree Collapse file tree 2 files changed +34
-6
lines changed
src/AsseticBundle/CacheBuster Expand file tree Collapse file tree 2 files changed +34
-6
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace AsseticBundle \CacheBuster ;
4
+
5
+ use Assetic \Asset \AssetInterface ,
6
+ Assetic \Factory \Worker \WorkerInterface ,
7
+ Assetic \Factory \AssetFactory ;
8
+
9
+ class NoCache implements WorkerInterface
10
+ {
11
+ public function process (AssetInterface $ asset , AssetFactory $ factory )
12
+ {
13
+ }
14
+ }
Original file line number Diff line number Diff line change 2
2
3
3
namespace AsseticBundle \CacheBuster ;
4
4
5
- use Assetic \Asset \AssetInterface ,
6
- Assetic \Factory \Worker \WorkerInterface ,
7
- Assetic \Factory \AssetFactory ;
8
-
9
- class Null implements WorkerInterface
5
+ /**
6
+ * Stub class for backwards compatibility.
7
+ *
8
+ * Since PHP 7 adds "null" as a reserved keyword, we can no longer have a class
9
+ * named that and retain PHP 7 compatibility. The original class has been
10
+ * renamed to "NoCache", and this class is now an extension of it. It raises an
11
+ * E_USER_DEPRECATED to warn users to migrate.
12
+ *
13
+ * @deprecated
14
+ */
15
+ class Null extends NoCache
10
16
{
11
- public function process ( AssetInterface $ asset , AssetFactory $ factory )
17
+ public function __construct ( )
12
18
{
19
+ trigger_error (
20
+ sprintf (
21
+ 'The class %s has been deprecated; please use %s \\NoCache ' ,
22
+ __CLASS__ ,
23
+ __NAMESPACE__
24
+ ),
25
+ E_USER_DEPRECATED
26
+ );
13
27
}
14
28
}
You can’t perform that action at this time.
0 commit comments